Kütüphane / Kod, Git ve Geliştirici Araçları
Kod, Git ve Geliştirici Araçları
Webhook yöneticisi API'si ile n8n iş akışlarını çalıştırma
Bir webhook isteği geldiğinde hedef iş akışını yürütmek için n8n API'sini kullanır ve başarı veya hata mesajı döndürür.
Ne yapar
## ▶️ POST Route: Execute a Target Workflow This branch handles POST requests to dynamically execute another n8n workflow. ### 1. Map Webhook Request to Fields: * Extracts workflowId from the incoming request's query parameters (e.g., ?workflowId=YOUR_TARGET_WORKFLOW_ID). * Extracts the entire body of the POST request to be passed as workflowInputData to the target workflow. * Note: If you send custom data in the body, ensure the triggered workflow is designed to receive and process it (e.g., via a "Workflow data" trigger node or by accessing $json.workflowInputData in its initial nodes). ### 2. Execute Workflow: * The workflowId to execute is dynamically set using the value from the previous step: {{ $('Map webhook request to fields').item.json.targetWorkflowId }} * Wait for Completion: This node is configured to wait until the sub-workflow (the one being executed) finishes before continuing. * Handles success and error responses separately.
Adımlar
- Webhook
- Map webhook request to fields
- Execute Workflow
- return succes message
- return problem executing workflow
- Return problem handling request
- Map key workflow info
- map parameters
- Return problem handling get request
- return all workflow info
- return summarized workflow info
- Get specific workflowid
- Included Workflows
- get all inactive workflows
Toplam 19 adım.
Benzer otomasyonlar
Kod, Git ve Geliştirici Araçların8n API ile n8n iş akışlarını örnekler arasında klonlama33 adımKod, Git ve Geliştirici Araçların8n için alt iş akışı bağımlılık grafiği ve otomatik etiketleme82 adımKod, Git ve Geliştirici Araçların8n API ile n8n İş Akışlarını Örnekler Arasında Klonlama14 adımKod, Git ve Geliştirici Araçların8n İş Akışlarını Telegram'dan Uzaktan Yönetme65 adım