Bibliothek / Code, Git & Entwicklertools
Code, Git & Entwicklertools
n8n-Workflows über eine Webhook-Manager-API ausführen
Geht eine Webhook-Anfrage ein, führt der Workflow über die n8n-API einen Ziel-Workflow aus und gibt eine Erfolgs- oder Fehlermeldung zurück.
Was sie bewirkt
## ▶️ 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.
Die Schritte
- 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
Insgesamt 19 Schritte.
Ähnliche Automatisierungen
Web Scraping & RechercheUber-Eats-Pizzaangebote mit Bright Data finden4 SchritteKI-Agenten & AssistentenTelegram-Manager-Agent für Kalender, Gmail und Social Posts18 SchritteCode, Git & Entwicklertoolsn8n-Workflows über die n8n-API zwischen Instanzen klonen33 SchritteCode, Git & Entwicklertoolsn8n-Workflows mit der n8n-API zwischen Instanzen klonen14 Schritte