Перейти к содержанию
НОВОЕМаркетплейс и trig8n Agent: продавайте то, что создали, и получайте планы и изменения, проверенные до того, как вы их увидите. Что нового

Библиотека / Код, Git и инструменты разработчика

Код, Git и инструменты разработчика

Запуск рабочих процессов n8n через API менеджера вебхуков

При поступлении запроса на вебхук использует API n8n для запуска целевого рабочего процесса и возвращает сообщение об успехе или ошибке.

Что делает

## ▶️ 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.

Шаги

  1. Webhook
  2. Map webhook request to fields
  3. Execute Workflow
  4. return succes message
  5. return problem executing workflow
  6. Return problem handling request
  7. Map key workflow info
  8. map parameters
  9. Return problem handling get request
  10. return all workflow info
  11. return summarized workflow info
  12. Get specific workflowid
  13. Included Workflows
  14. get all inactive workflows

Всего шагов: 19.

Похожие автоматизации