n8n Workflow Generator - Prompt to Importable JSON avatar

n8n Workflow Generator - Prompt to Importable JSON

Pricing

from $0.99 / workflow generated

Go to Apify Store
n8n Workflow Generator - Prompt to Importable JSON

n8n Workflow Generator - Prompt to Importable JSON

Describe an automation in plain English and get an n8n workflow JSON that imports cleanly. Every node type, typeVersion, parameter key, option value and AI sub-node connection is checked against n8n's own node definitions before you are charged - no invented nodes, no silently ignored settings.

Pricing

from $0.99 / workflow generated

Rating

0.0

(0)

Developer

Mediocre_Interest

Mediocre_Interest

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

23 days ago

Last modified

Categories

Share

The n8n workflow generator turns a plain-English description into an n8n workflow JSON that imports cleanly - an AI n8n workflow builder (text to n8n workflow, prompt to JSON) that checks every node type, typeVersion, parameter key, option value and AI sub-node connection against n8n's own node definitions before you are charged. No invented nodes, no silently ignored settings, no credentials in the file. Run it from the Apify Console, on a schedule, over the API, or from n8n itself; the result is one dataset row plus a workflow.json you can import from a URL.

What does the n8n Workflow Generator do?

You describe an automation: what starts it, what it should do, which apps are involved. The generator plans the workflow with an AI model, but the model never writes n8n JSON: it can only pick nodes, operations and settings that exist in the current n8n release - every built-in node, the LangChain AI nodes and the tool variants an AI Agent can call - and the workflow file itself is written from n8n's own node definitions, then checked the way n8n's editor would:

  • 🧩 every node type exists in the current n8n release and is not deprecated or removed
  • 🔢 every typeVersion is one that node actually has
  • 🗝️ every parameter key applies to that node, version, resource and operation - and every option value is in its list
  • 📎 resource locators, filters, assignments and column mappings have the shape n8n stores, and pass n8n's own value rules (a Google Sheets URL has to look like one)
  • 🔌 every connection uses a kind the source emits and the target accepts, at an output slot that exists; an AI Agent has exactly one chat model, at most one memory, and its tools are wired as tools
  • 🧭 there is a trigger, every node is reachable from it, and every $('Node name') in an expression refers to a node in the workflow
  • 🧪 every {{ }} expression, every Code node and every JSON body parses the way n8n parses it at run time, and a node that writes something (a sheet row, a database row, a response) has something to write

If a check fails, the generator corrects the workflow and checks it again; if it still does not pass, you get the best-effort JSON, the exact errors, and no charge.

Generated workflows also come with what a reviewer would add: retries on nodes that call external services, a timeout on HTTP Request nodes, and one sticky note that summarises each step, the credentials to attach, and anything to check before activating.

How is this different from asking ChatGPT for n8n JSON?

A chat model writing n8n JSON freehand produces files that import without error and quietly do nothing: a Slack node with channel: "#leads" (the real parameter is a resource locator called channelId), a node version that does not exist, an If node whose false branch is wired to output 2. n8n's importer tolerates all of it. This generator cannot produce those files: the model only ever names things that exist in n8n's definitions, and the JSON is written from those definitions, not by the model. What the model is good at - understanding what you want and writing the expressions, messages and prompts inside the nodes - is exactly what it is asked for.

How to generate an n8n workflow from a prompt

  1. Open the Actor in the Apify Console and describe your workflow in What should the workflow do? Name the trigger (a schedule, a webhook, a form, a chat message, a new row) and the apps involved. One workflow is generated per run.
  2. Click Start. Most workflows take 10-30 seconds; a long request can take a few minutes.
  3. Open the Output tab. The table shows the workflow name, whether it validated, its node count and types, the credentials to attach, and anything to check before activating.
  4. Download workflow.json from the run's key-value store (the Download JSON link in the table), or copy the workflow field from the dataset row.
  5. In n8n, create a new workflow and use Import from URL with the download link, Import from File, or paste the JSON straight onto the canvas. On n8n 1.x, Import from URL only accepts a link ending in .json, and the download link carries a signature after it - use Import from File there.
  6. Attach the credentials listed in Credentials to attach (n8n prompts for them on each node, exactly as it does for a template), replace any REPLACE_WITH_... placeholder the warnings point at, and activate.

What is in the output?

One row per generated workflow in the default dataset, plus workflow.json in the run's key-value store.

FieldWhat it holds
workflowNameThe name the workflow imports with
validtrue when every check above passed - the only state that is charged. It means the file imports and its nodes are configured the way n8n expects; it cannot vouch for what an external service will answer or for a design choice you meant differently - the warnings are for those
workflowThe complete n8n workflow JSON (name, nodes, connections, settings), also served as workflow.json
nodeCountExecutable nodes (the overview sticky note is not counted)
nodeTypesThe distinct node types used, e.g. n8n-nodes-base.slack
triggerTypesWhich of them start the workflow
credentialsNeededCredential types to attach after import, e.g. slackApi, googleSheetsOAuth2Api - never values
warningsThings to check before activating: placeholders to replace, HTTP endpoints to verify, assumed settings
errorsWhy the workflow did not validate; empty when valid is true
n8nVersionThe n8n release the workflow targets, e.g. 2.39.7
workflowJsonUrlThe workflow.json download link, usable with n8n's Import from URL (n8n 2.x)
generatedAtTimestamp

How much does it cost to generate an n8n workflow?

The Actor is pay per event with a single event, workflow-generated, charged once per run, after the workflow is written, and only when valid is true. A run that ends with an invalid workflow still gives you the best-effort JSON and the errors, and costs nothing. The current per-event price is on this Actor's Store page.

Input example

{
"prompt": "Every weekday at 9am, fetch the latest items from an RSS feed, keep only the items published in the last 24 hours, and post each one to a Slack channel with its title and link."
}

Output example

The row that input produces (the workflow field holds the full JSON; four executable nodes plus the overview note are shown by name here):

{
"prompt": "Every weekday at 9am, fetch the latest items from an RSS feed, keep only the items published in the last 24 hours, and post each one to a Slack channel with its title and link.",
"workflowName": "Weekday RSS to Slack Digest",
"valid": true,
"workflow": {
"name": "Weekday RSS to Slack Digest",
"nodes": ["Overview", "Schedule Trigger", "Read RSS Feed", "Filter Recent Items", "Post to Slack"],
"connections": { "...": "..." },
"settings": { "executionOrder": "v1" }
},
"nodeCount": 4,
"nodeTypes": [
"n8n-nodes-base.scheduleTrigger",
"n8n-nodes-base.rssFeedRead",
"n8n-nodes-base.filter",
"n8n-nodes-base.slack"
],
"triggerTypes": ["n8n-nodes-base.scheduleTrigger"],
"credentialsNeeded": ["slackApi"],
"warnings": ["Replace REPLACE_WITH_RSS_FEED_URL in \"Read RSS Feed\" › url before activating."],
"errors": [],
"n8nVersion": "2.39.7",
"workflowJsonUrl": "https://api.apify.com/v2/key-value-stores/.../records/workflow.json?signature=...",
"generatedAt": "2026-09-15T14:26:01.755Z"
}

The Slack node inside that file is what a hand-built one looks like - a resource locator for the channel, an expression for the text, retries on:

{
"name": "Post to Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.7,
"parameters": {
"resource": "message",
"operation": "post",
"select": "channel",
"channelId": { "__rl": true, "mode": "name", "value": "#general" },
"text": "=New Article: *{{ $json.title }}*\n{{ $json.link }}",
"otherOptions": {}
},
"retryOnFail": true,
"maxTries": 3,
"waitBetweenTries": 1000
}

How to call the n8n workflow generator from the API

One call, one workflow back. run-sync-get-dataset-items waits for the run and returns the dataset rows:

curl -X POST "https://api.apify.com/v2/acts/mediocre_interest~n8n-workflow-builder/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "prompt": "When a Stripe payment succeeds, add the customer email and amount to an Airtable base and post a short message to the #sales Slack channel." }'

The response is a JSON array with one row; .[0].workflow is the workflow JSON and .[0].workflowJsonUrl the download link.

  • Use it from n8n. Apify's official n8n integration lets an n8n workflow run this Actor and read the row - so an n8n workflow can generate other n8n workflows, and a Google Sheet of requests can become a folder of importable files.
  • Call it from the API. Start runs and fetch results with the Apify API, the Apify CLI (apify call mediocre_interest/n8n-workflow-builder), or the JavaScript and Python clients.
  • Schedule it. Add a schedule to regenerate a workflow whenever a request sheet changes.
  • Pipe it anywhere. Make, Zapier, webhooks, Slack, Google Sheets and the rest of the Apify integrations.

Which n8n nodes and versions are supported?

Every node shipped with n8n itself: the core nodes (triggers, apps, HTTP Request, Code, Set, If, Switch, Merge, Loop Over Items and the rest) and the LangChain AI nodes (AI Agent, chat models, memories, tools, vector stores, embeddings, document loaders, text splitters, output parsers). The node list and every node's settings follow the current n8n stable release - the n8nVersion field on every row says which - and each node is written at the version n8n's editor assigns when you add it today, so the JSON opens without "upgrade this node" prompts on a current n8n. Older n8n installations may not know the newest node versions; the file still imports, and n8n reports the node it cannot load.

Community nodes are not supported in this version: a service without a built-in node is handled with an HTTP Request node, and the row's warnings name the endpoint so you can verify it.

What other Actors work with this one?

FAQ

Does the generated workflow contain my credentials?

No. The file has no credentials block and no secrets anywhere in it. credentialsNeeded lists the credential types the nodes use; you attach your own in n8n after import, exactly as with a template from n8n's library. Where an API needs a key and no built-in node exists, the HTTP Request node is set up to use an n8n credential rather than a literal value.

Why does my workflow have REPLACE_WITH_... values?

When the request does not say which spreadsheet, channel, table or URL to use, the generator writes a clearly marked placeholder instead of inventing a real-looking identifier, and lists each one in warnings. Replace them in n8n before activating - or name the target in the prompt and they will not appear.

Why was my run not charged?

Because the workflow did not pass validation: valid is false, errors says why, and the best-effort JSON is still in workflow for inspection. This is rare - the generator corrects and re-checks its own work before giving up - and it is never billed.

Does it work with self-hosted n8n?

Yes. The output is a standard workflow export; import it into n8n Cloud or any self-hosted instance. Nothing is pushed to your instance and nothing is activated - you import, attach credentials, and activate when you are ready.

Can it create the workflow directly in my n8n instance?

Not in this version. The quickest route today is n8n's own Import from URL with the workflowJsonUrl link, or the n8n Apify node calling this Actor and passing workflow to n8n's REST API in the next step.

Where does my prompt go?

Your prompt is sent to a third-party AI model provider as the request to plan, and nowhere else; this Actor stores it only in the run's own input and dataset, which belong to your Apify account. The node definitions the model chooses from come from n8n, not from other users' workflows.

How long does a run take?

Ten to thirty seconds for a typical five-to-eight-node workflow, most of it model time. Long requests - a dozen nodes, AI agents, loops, vector stores, or a workflow that needs a second pass - can take two to four minutes. Repeating an identical prompt returns the same workflow instantly.

What does the prompt need to say?

The trigger, the steps, and the apps - "every Monday at 8am", "when a form is submitted", "when a chat message arrives"; "look up the row", "if the total is over 100", "post to #sales". Naming concrete things (a sheet id, a channel, an endpoint) puts them in the workflow instead of placeholders. Prompts are limited to 6,000 characters and workflows to 30 nodes.

Can the generated workflow be wrong even though it is valid?

Valid means n8n will import it and every node is configured with real parameters and real values. It does not mean a third-party API call has the right endpoint or body - that knowledge is not in n8n's definitions - which is why every HTTP Request host and every assumption appears in warnings for a look before activating.

Support

Open an issue on the Actor's Issues tab with the run id and the prompt, and include the errors from the row if the workflow did not validate. Requests for other node sets (community nodes, an older n8n release) or for a "push it into my n8n" option are welcome there too.