Overview This workflow exposes an HTTP endpoint (webhook) that accepts a JSON definition of an n8n workflow, validates it, and—if everything is correct—dynamically creates that workflow in the n8n instance via its internal API. If any validation fails or the API call encounters an error, an explanatory message with details is returned. Workflow Diagram Step-by-Step Details 1. Webhook Type: Webhook (POST) Path: /webhook/create-workflow Purpose: Expose a URL to receive a JSON definition of a wo

Overview This workflow exposes an HTTP endpoint (webhook) that accepts a JSON definition of an n8n workflow, validates it, and—if everything is correct—dynamically creates that workflow in the n8n instance via its internal API. If any validation fails or the API call encounters an error, an explanatory message with details is returned. Workflow Diagram Step-by-Step Details 1. Webhook Type: Webhook (POST) Path: /webhook/create-workflow Purpose: Expose a URL to receive a JSON definition of a workflow. Expected Input: JSON containing the main workflow fields (name, nodes, connections, settings). 2. Validate JSON Type: Code Node (JavaScript) Validations Performed: Ensure that payload exists and contains both name and nodes. Verify that nodes is an array with at least one item. Check that each node includes the required fields: id, name, type, position. If missing, initialize connections, settings, parameters, and typeVersion. Output if Error: Output if Valid: 3. Validation Successful? Type: IF Node Condition: $json.success === true Branches: true: proceed to Create Workflow false: route to Validation Error 4. Create Workflow Type: HTTP Request (POST) URL: Authentication: Header Auth with internal credentials Body: The apiWorkflow object generated earlier Options: continueOnFail: true (to handle failures in the next IF) 5. API Successful? Type: IF Node Condition: $response.statusCode <= 299 Branches: true: proceed to Success Response false: route to API Error 6. Success Response Type: SET Node Output: 7. API Error Type: SET Node Output: 8. Validation Error Type: SET Node Output: Example Webhook Request Expected Success Response Validation Error Response API Error Response
Download the workflow JSON file after purchase.
Open n8n → click the menu → Import from File.
Select the downloaded JSON and import.
Set up credentials for each node that requires them.
Click Execute Workflow to test, then activate.
Setup guide included
Purchase to unlock the full step-by-step guide
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.