
n8n Workflow Manager API
Description
Categories
🔧 Engineering
Nodes Used
n8n-nodes-base.ifn8n-nodes-base.ifn8n-nodes-base.n8nn8n-nodes-base.n8nn8n-nodes-base.n8nn8n-nodes-base.n8nn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.switch
PriceGratuit
Views0
Last Updated11/28/2025
workflow.json
{
"meta": {
"instanceId": "1eec3d74182f3fda9f29f20c85422320a70882840e1b07acd098d5b4a836392a",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "ab47d0ba-0544-4540-a462-70a2ce87143f",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-1120,
-440
],
"webhookId": "26f7b45b-d6c6-4d26-a72b-28fe0d59c9f3",
"parameters": {
"path": "workflow-manager",
"options": {},
"responseMode": "responseNode",
"authentication": "headerAuth",
"multipleMethods": true
},
"credentials": {
"httpHeaderAuth": {
"id": "N5JJ2pCqy9s6SMWZ",
"name": "Header Auth account"
}
},
"typeVersion": 2
},
{
"id": "479e7d11-4d29-43d7-9b51-4f15e760a117",
"name": "Map webhook request to fields",
"type": "n8n-nodes-base.set",
"notes": "dont forget to add logic to triggered workflow if you use custom data.",
"onError": "continueErrorOutput",
"position": [
-820,
-340
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "c66c5a75-22a3-4b56-b40c-8403ed2dfbd4",
"name": "targetWorkflowId",
"type": "string",
"value": "={{ $json.query.workflowId }}"
},
{
"id": "88ec0d2f-4d99-4307-ae5e-c5d3c1b75b98",
"name": "workflowInputData",
"type": "object",
"value": "={{ $json.body }}"
}
]
}
},
"typeVersion": 3.4,
"alwaysOutputData": false
},
{
"id": "6a685048-6a64-4888-b66b-a3ecb6319ac7",
"name": "Execute Workflow",
"type": "n8n-nodes-base.executeWorkflow",
"onError": "continueErrorOutput",
"position": [
-440,
-360
],
"parameters": {
"options": {
"waitForSubWorkflow": true
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Map webhook request to fields').item.json.targetWorkflowId }}"
},
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
}
},
"typeVersion": 1.2
},
{
"id": "db3a0115-179b-4a70-8c27-aa126bfa43a0",
"name": "return succes message",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
20,
-460
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.2
},
{
"id": "327b7437-e4fa-4b82-97d2-4adf077df5d8",
"name": "return problem executing workflow",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
20,
-280
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "{\n \"status\": \"problem_executing_workflow\"\n}"
},
"typeVersion": 1.2
},
{
"id": "331ce2d8-016f-40ed-8b74-8e75be54fac6",
"name": "Return problem handling request",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
20,
-80
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "{\n \"status\": \"problem_handling_request\"\n}"
},
"typeVersion": 1.2
},
{
"id": "eff4c9d9-5031-4d25-87c7-2fcd5a28ada5",
"name": "Map key workflow info",
"type": "n8n-nodes-base.set",
"position": [
1060,
-1140
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "87d4b5e7-540e-441c-9598-921d6d223e20",
"name": "name",
"type": "string",
"value": "={{ $json.name }}"
},
{
"id": "b3749a8f-0418-4409-8c0f-e8ca2bec9414",
"name": "id",
"type": "string",
"value": "={{ $json.id }}"
},
{
"id": "1db3eaca-95d2-4b5b-9fca-e6ca44eb4bc0",
"name": "createdAt",
"type": "string",
"value": "={{ $json.createdAt }}"
},
{
"id": "a42273df-e9c7-40a3-9f02-63792c0f6da5",
"name": "updatedAt",
"type": "string",
"value": "={{ $json.updatedAt }}"
},
{
"id": "7799575a-df04-4c29-8ee7-b8a6dc9d98d6",
"name": "active",
"type": "boolean",
"value": "={{ $json.active }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "fb406e55-9df4-43ac-b8b7-040e1438b925",
"name": "map parameters",
"type": "n8n-nodes-base.set",
"notes": "dont forget to add logic to triggered workflow if you use custom data.",
"onError": "continueErrorOutput",
"position": [
-820,
-600
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "c66c5a75-22a3-4b56-b40c-8403ed2dfbd4",
"name": "mode",
"type": "string",
"value": "={{ $json.query.mode }}"
},
{
"id": "88ec0d2f-4d99-4307-ae5e-c5d3c1b75b98",
"name": "workflowId",
"type": "string",
"value": "={{ $json.query.workflowId }}"
},
{
"id": "219d8188-71da-41a7-b849-a3f45877a94b",
"name": "includedWorkflows",
"type": "string",
"value": "={{ $json.query.includedWorkflows }}"
}
]
}
},
"typeVersion": 3.4,
"alwaysOutputData": false
},
{
"id": "84934ca3-eb86-4bda-b16c-1bdbf7b7073e",
"name": "Return problem handling get request",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1340,
-680
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "{\n \"status\": \"problem_handling_request\"\n}"
},
"typeVersion": 1.2
},
{
"id": "bfd7b91d-4972-48be-8f6d-887995f3e62d",
"name": "return all workflow info",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1320,
-1300
],
"parameters": {
"options": {
"responseCode": 200
},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.2
},
{
"id": "6f481e40-a8c1-40bc-a410-8e3606ac419b",
"name": "return summarized workflow info",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1320,
-1140
],
"parameters": {
"options": {
"responseCode": 200
},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.2
},
{
"id": "4d4bc237-c0e4-456f-acdf-fdaeec203693",
"name": "Get specific workflowid",
"type": "n8n-nodes-base.n8n",
"onError": "continueErrorOutput",
"position": [
400,
-1240
],
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.workflowId }}"
},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"id": "3N1mURaRanSDYYnV",
"name": "n8n account"
}
},
"typeVersion": 1
},
{
"id": "559e5e24-200f-44d1-a8e4-b5605afe81b3",
"name": "Included Workflows",
"type": "n8n-nodes-base.switch",
"position": [
0,
-940
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "inactive",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6daea568-2be3-45ca-be56-ae0207a4f86d",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.includedWorkflows }}",
"rightValue": "inactive"
}
]
},
"renameOutput": true
},
{
"outputKey": "active",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5a4debdd-03ac-4c1d-b2b5-ea8192d61717",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.includedWorkflows }}",
"rightValue": "active"
}
]
},
"renameOutput": true
},
{
"outputKey": "all",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "98ec6e1b-e5b5-4a9c-b505-23f237cabf9f",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.includedWorkflows }}",
"rightValue": "all"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra",
"renameFallbackOutput": "Fallback"
}
},
"typeVersion": 3.2
},
{
"id": "259f7da5-cd06-44a3-805c-bf5e29b6924c",
"name": "get all inactive workflows",
"type": "n8n-nodes-base.n8n",
"onError": "continueErrorOutput",
"position": [
400,
-1100
],
"parameters": {
"filters": {
"activeWorkflows": "={{ false }}"
},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"id": "3N1mURaRanSDYYnV",
"name": "n8n account"
}
},
"typeVersion": 1
},
{
"id": "30102b45-b578-437a-a6b3-49b39c18d7fa",
"name": "get all active workflows",
"type": "n8n-nodes-base.n8n",
"onError": "continueErrorOutput",
"position": [
400,
-940
],
"parameters": {
"filters": {
"activeWorkflows": true
},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"id": "3N1mURaRanSDYYnV",
"name": "n8n account"
}
},
"typeVersion": 1
},
{
"id": "7eba5bb1-c863-4d0b-b157-5d5844860134",
"name": "get all workflows",
"type": "n8n-nodes-base.n8n",
"onError": "continueErrorOutput",
"position": [
400,
-780
],
"parameters": {
"filters": {},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"id": "3N1mURaRanSDYYnV",
"name": "n8n account"
}
},
"typeVersion": 1
},
{
"id": "cd37d7c6-0a39-4d0d-81d0-29b530834429",
"name": "full mode",
"type": "n8n-nodes-base.if",
"position": [
820,
-1240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "44f3564e-83bf-46fc-9de7-1c9179029967",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('map parameters').item.json.mode }}",
"rightValue": "full"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "47260845-2b55-47f2-a8ad-e4dc1d18a087",
"name": "return problem getting workflow error",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1320,
-900
],
"parameters": {
"options": {
"responseCode": 404
},
"respondWith": "json",
"responseBody": "{\n \"status\": \"problem_getting_workflows\"\n}"
},
"typeVersion": 1.2
},
{
"id": "5e8a5ddc-ce4c-4a4a-99ab-ade961a18158",
"name": "Does workflowId Exist",
"type": "n8n-nodes-base.if",
"position": [
-420,
-960
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "53bb0221-a526-477f-bf31-7e26ad825f2b",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.workflowId }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "323d3126-fc6f-476f-978c-00f3c01f9e03",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1780,
-620
],
"parameters": {
"color": 5,
"width": 580,
"height": 480,
"content": "## 🚀 Workflow Trigger: Webhook\n\nThis workflow starts with a **Webhook node** that can be triggered by both `GET` and `POST` HTTP requests.\n\n**Authentication:**\n* Uses **Header Authentication**.\n* To set this up in n8n:\n 1. Go to Credentials > New.\n 2. Select \"Header Auth\".\n 3. For the \"Name\" field (Header Name for Authentication), use `Authorization`.\n 4. For the \"Value\" field (Header Value for Authentication), use `Bearer YOUR_STRONG_SECRET_KEY`. Replace `YOUR_STRONG_SECRET_KEY` with a secure key.\n* The webhook will respond using a dedicated **Respond to Webhook** node further down the flow, depending on the request type and outcome.\n\n**Path:** `workflow-manager`\n*(Remember to adjust the path in the Webhook node if needed for your setup.)*"
},
"typeVersion": 1
},
{
"id": "941bf6d3-b6b3-4e1f-8c1e-4e52fd809881",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-820,
-160
],
"parameters": {
"color": 6,
"width": 740,
"height": 460,
"content": "## ▶️ POST Route: Execute a Target Workflow\n\nThis branch handles `POST` requests to dynamically execute another n8n workflow.\n\n### 1. Map Webhook Request to Fields:\n* Extracts `workflowId` from the incoming request's query parameters (e.g., `?workflowId=YOUR_TARGET_WORKFLOW_ID`).\n* Extracts the entire `body` of the POST request to be passed as `workflowInputData` to the target workflow.\n * **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).\n\n### 2. Execute Workflow:\n* The `workflowId` to execute is dynamically set using the value from the previous step:\n `{{ $('Map webhook request to fields').item.json.targetWorkflowId }}`\n* **Wait for Completion:** This node is configured to wait until the sub-workflow (the one being executed) finishes before continuing.\n* Handles success and error responses separately."
},
"typeVersion": 1
},
{
"id": "d65a14e3-151e-4328-90a4-73cf4e845c52",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-380,
-1480
],
"parameters": {
"color": 4,
"width": 720,
"height": 480,
"content": "## 📄 GET Route: Fetch Workflow Info\n\nRetrieves n8n workflow details via `GET`. Uses n8n API (requires \"n8n API\" credentials).\n\n**Query Parameters:**\n\n* `workflowId=<ID>`: Fetches a single workflow by its ID.\n* `includedWorkflows=<active|inactive|all>`: If `workflowId` is absent, filters workflows by status. Defaults to `all`.\n* `mode=<full|summary>`:\n * `full`: Returns complete workflow JSON.\n * **Default (`summary` or other):** Returns key info (name, id, created/updated dates, active status).\n\n**Key Logic:**\n\n* The flow prioritizes `workflowId` if provided.\n* The `mode` parameter dictates the output verbosity.\n\nFor n8n API details: [https://docs.n8n.io/integrations/apis/n8n-api/](https://docs.n8n.io/integrations/apis/n8n-api/)"
},
"typeVersion": 1
},
{
"id": "f914af41-3f8f-4b0c-af7d-bad82aad6a29",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1780,
-120
],
"parameters": {
"width": 580,
"height": 240,
"content": "## 💡 Usage Example\n\nI used this workflow as the backend for a small Raycast extension. This extension lets me search and execute n8n workflows directly from Raycast.\n\nYou can check out the Raycast extension's code here:\n[n8n Manager for Raycast GitHub Repository](https://github.com/jwa91/n8n-manager-raycast/)"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "map parameters",
"type": "main",
"index": 0
}
],
[
{
"node": "Map webhook request to fields",
"type": "main",
"index": 0
}
]
]
},
"full mode": {
"main": [
[
{
"node": "return all workflow info",
"type": "main",
"index": 0
}
],
[
{
"node": "Map key workflow info",
"type": "main",
"index": 0
}
]
]
},
"map parameters": {
"main": [
[
{
"node": "Does workflowId Exist",
"type": "main",
"index": 0
}
],
[
{
"node": "Return problem handling get request",
"type": "main",
"index": 0
}
]
]
},
"Execute Workflow": {
"main": [
[
{
"node": "return succes message",
"type": "main",
"index": 0
}
],
[
{
"node": "return problem executing workflow",
"type": "main",
"index": 0
}
]
]
},
"get all workflows": {
"main": [
[
{
"node": "full mode",
"type": "main",
"index": 0
}
],
[
{
"node": "return problem getting workflow error",
"type": "main",
"index": 0
}
]
]
},
"Included Workflows": {
"main": [
[
{
"node": "get all inactive workflows",
"type": "main",
"index": 0
}
],
[
{
"node": "get all active workflows",
"type": "main",
"index": 0
}
],
[
{
"node": "get all workflows",
"type": "main",
"index": 0
}
],
[
{
"node": "get all active workflows",
"type": "main",
"index": 0
}
]
]
},
"Does workflowId Exist": {
"main": [
[
{
"node": "Get specific workflowid",
"type": "main",
"index": 0
}
],
[
{
"node": "Included Workflows",
"type": "main",
"index": 0
}
]
]
},
"Map key workflow info": {
"main": [
[
{
"node": "return summarized workflow info",
"type": "main",
"index": 0
}
]
]
},
"Get specific workflowid": {
"main": [
[
{
"node": "full mode",
"type": "main",
"index": 0
}
],
[
{
"node": "return problem getting workflow error",
"type": "main",
"index": 0
}
]
]
},
"get all active workflows": {
"main": [
[
{
"node": "full mode",
"type": "main",
"index": 0
}
],
[
{
"node": "return problem getting workflow error",
"type": "main",
"index": 0
}
]
]
},
"get all inactive workflows": {
"main": [
[
{
"node": "full mode",
"type": "main",
"index": 0
}
],
[
{
"node": "return problem getting workflow error",
"type": "main",
"index": 0
}
]
]
},
"Map webhook request to fields": {
"main": [
[
{
"node": "Execute Workflow",
"type": "main",
"index": 0
}
],
[
{
"node": "Return problem handling request",
"type": "main",
"index": 0
}
]
]
}
}
}