Connecting ERPNext to n8n gives you a self-hosted automation layer on top of your ERP with no licence fee. ERPNext pushes events out with webhooks, n8n reads and writes back through the REST API, and you build the workflows visually in n8n, with no per-task pricing.
Short answer
Create a Webhook in ERPNext (Integrations > Webhook) that fires on a DocType event such as on_submit, and point it at an n8n Webhook node's production URL. To send data back, use n8n's ERPNext node or an HTTP Request node authenticated with an ERPNext API key and secret. Both ERPNext and n8n's Community Edition can be self-hosted with no licence fee.
I lead ERPNext and Frappe programmes at MithTech, a team of Frappe specialists in Bengaluru, and we set up ERPNext-to-n8n pipelines on client projects. This is the playbook: which trigger to pick, how to authenticate safely, and four automations to build first. n8n is a low-cost way to automate ERPNext, but its ERPNext node is thinner than people expect, so you will spend more time in the Webhook and HTTP Request nodes than in the ERPNext node.
What is ERPNext n8n integration and why use it?
It means wiring ERPNext to n8n, a source-available workflow automation tool, so that ERP events trigger actions and other systems can read or write ERP data. It replaces brittle custom scripts and per-task automation subscriptions with one visual layer you host.
The appeal is cost and control. Self-hosted n8n Community Edition has no licence fee under the Sustainable Use License, with unlimited workflows and executions for internal use, so you do not pay per run as on some SaaS platforms. With both ERPNext and n8n on your own servers, data passes between them without a third party; it leaves only when a workflow sends it on, to WhatsApp, a CRM or an AI model. I compare the tools in n8n vs Zapier vs Make for India.
Skimmable summary: a self-hosted automation layer that reacts to ERP events and syncs data with no per-task fee.
How does ERPNext connect to n8n?
In two directions. Outbound, ERPNext fires webhooks on DocType events and n8n catches them on a Webhook node. Inbound, n8n reads or writes ERPNext records with the ERPNext node or an HTTP Request node against the REST API. Most workflows use both.
Think of it as a loop: a document changes in ERPNext, ERPNext notifies n8n, n8n does the work (sends a WhatsApp, updates a CRM, sends an email), and often writes a result back into ERPNext.
| Direction | Mechanism | Where it lives | Use it for |
|---|---|---|---|
| ERPNext to n8n (trigger) | Webhook on a DocType event | ERPNext: Integrations > Webhook | Reacting to new/updated/submitted documents |
| n8n to ERPNext (read) | ERPNext node "Get" / "Get Many" or HTTP Request | n8n workflow | Fetching a customer, item, or invoice |
| n8n to ERPNext (write) | ERPNext node "Create"/"Update" or HTTP Request | n8n workflow | Creating leads, updating stock, posting payments |
Note the gap: n8n has no ERPNext trigger node, so every event-driven workflow starts from an ERPNext webhook (or from a schedule in n8n that polls the API). That shapes most of the design below. Whether to wait for events or poll for them is a design choice of its own, and webhooks or polling sets out the trade-off.
If n8n ends up joining several systems, point-to-point vs a hub counts the links for your own set and says when three or fewer do not need a hub. For more than that, we are building Holisto IEP, an event bus for ERPNext integrations; it is not available yet.
Skimmable summary: ERPNext webhooks trigger n8n; n8n's ERPNext or HTTP node reads and writes back; there is no native trigger node.
How do I set up an ERPNext webhook to trigger n8n?
Create a Webhook document in ERPNext that fires on a chosen DocType event and posts JSON to your n8n Webhook node's URL. You set the DocType, the event, the request URL and the security, then test with a real document.
Create the Webhook node in n8n
In n8n, add a Webhook node as your workflow trigger. Copy its production URL (not the test URL, which only listens while the editor is open). Set the HTTP method to POST.
Open Webhook setup in ERPNext
In ERPNext, go to Integrations > Webhook and create a new Webhook document. Search "Webhook" in the awesomebar if you cannot find it.
Pick the DocType and Doc Event
Set Document Type (for example Lead or Sales Invoice) and choose a Doc Event such as after_insert, on_update, on_submit, on_cancel or on_trash. Pick the narrowest event that captures what you need: for a new invoice, on_submit beats on_update. A Condition can narrow it further, for example only invoices above a value.
Set the request URL and payload
Paste the n8n production URL into Request URL, keep the method as POST, and list the fields to send (or send the whole document as JSON). Send only what the workflow needs.
Secure it
Set the Webhook's Webhook Secret: ERPNext then signs each payload with HMAC-SHA256 in an X-Frappe-Webhook-Signature header, which n8n can verify. A simpler alternative is a custom header such as X-Webhook-Secret with a long random value that n8n checks. Either way, the endpoint rejects forged requests.
Test with a real document
Trigger the event in ERPNext (create the lead, submit the invoice). Confirm the run appears in the workflow's Executions in n8n, then build the rest of the workflow. ERPNext's Webhook Request Log shows what it sent and the response.
Skimmable summary: an n8n Webhook node, then an ERPNext Webhook on the right DocType and event pointing at the production URL, signed or secret-protected.
How do I authenticate n8n to write back into ERPNext?
With an API key and API secret generated per user, sent as an Authorization: token api_key:api_secret header on each REST request. The ERPNext node stores these with your site URL; the HTTP Request node can send the same header.
Generate the credentials inside ERPNext, then plug them into n8n:
Generate the API key in ERPNext
Open your user profile (avatar > My Settings), scroll to API Access, and click Generate Keys. ERPNext shows the API Secret only once, so copy it immediately. The API Key stays visible.
Use a dedicated integration user
Create a separate ERPNext user (for example, n8n@yourcompany) with a role that grants only the permissions the workflows need. Never wire automations to an administrator account.
Store credentials in n8n
In n8n, add an ERPNext credential with your instance URL, API Key, and API Secret. Reuse it in both the ERPNext node and any HTTP Request nodes.
Call the REST API
The ERPNext node covers Create, Get, Get Many, Update, Delete. For anything it does not cover (submitting a document, calling a custom method), use the HTTP Request node against /api/resource/{DocType} or /api/method/{method} with the same token header.
The ERPNext node is minimal. To submit a document, run a report or call a whitelisted server method, use the HTTP Request node; that is the intended route, not a workaround.
Skimmable summary: a per-user API key and secret in ERPNext, stored once in n8n, and the HTTP Request node for anything the five-operation ERPNext node cannot do.
Which ERPNext n8n automations should you build first?
The ones that remove a daily copy-paste or a missed follow-up. Four patterns come up most: routing new leads, sending invoices over WhatsApp, alerting on low stock and confirming payments. Each has the same trigger-then-act shape.
Lead to CRM / notification
Trigger: ERPNext webhook on Lead, after_insert. Action: n8n formats the lead and pushes it to your CRM, a Google Sheet or a Slack or WhatsApp channel, so sales sees it straight away, not at the end of the day.
Invoice to WhatsApp
Trigger: webhook on Sales Invoice, on_submit. Action: n8n fetches the customer's number, adds the invoice PDF link, and sends an approved template through the WhatsApp Business Cloud node. Meta charges per delivered message: templates by category since 1 July 2025, and replies inside the 24-hour window since 1 October 2026, after a free monthly tier (Meta, checked 14 October 2026).
Low-stock alert
Trigger: a scheduled n8n check that queries /api/resource/Bin (a webhook on Bin fires on every stock movement, which is noisy). Action: when actual quantity drops below the reorder level, n8n messages the purchase team and can draft a Material Request in ERPNext. ERPNext's own auto-reorder can raise Material Requests too; use n8n for the alerting.
Payment confirmation
Trigger: webhook on Payment Entry, on_submit. Action: n8n thanks the customer over email or WhatsApp and updates a collections sheet, with no manual follow-up.
Here is invoice-to-WhatsApp as a worked example of the full loop:
ERPNext fires on new invoice
A Sales Invoice webhook on on_submit posts the invoice JSON to n8n's production URL, signed or with the secret header.
n8n verifies the request
An IF node (or a Code node checking the HMAC signature) verifies the request. Wrong value: stop the workflow.
n8n enriches the data
The ERPNext node "Get" pulls the linked Customer to fetch the mobile number and contact name.
n8n sends WhatsApp
The WhatsApp Business Cloud node sends an approved template with the invoice number, amount and a payment link.
n8n logs the result
An HTTP Request node writes a comment or custom field back on the invoice so staff can see the message went out.
ERPNext sends a webhook again if n8n is slow to answer, so a workflow can run twice for one invoice. Idempotent webhooks shows a repeat reaching a sample handler and how to make it harmless.
Skimmable summary: start with lead routing, invoice-to-WhatsApp, low-stock alerts and payment confirmations; each is a trigger plus a few n8n action nodes.
Is ERPNext n8n integration secure?
It is when you protect both directions. Outbound webhooks run over HTTPS and carry a signature or secret that n8n checks. Inbound API calls use a dedicated, least-privilege user with a key you rotate, never the Administrator account.
Practical hardening checklist:
- HTTPS everywhere. Run n8n behind TLS. Never post webhook data to a plain
http://URL. - Verify every webhook. Check the
X-Frappe-Webhook-Signatureor your secret header, and reject requests without it. - Least-privilege API user. Scope the integration user's roles to exactly the DocTypes it touches.
- Rotate keys. Regenerate the API secret periodically and after any team member with access leaves.
- Limit the payload. Send only the fields the workflow needs, not the entire document, to reduce data exposure.
- Restrict network access. If self-hosting, keep the n8n webhook endpoint reachable only from your ERPNext server where possible.
For AI steps in these workflows, remember that whatever a workflow sends to a model goes to that model's provider; see connecting ERPNext to ChatGPT and Claude via MCP and ERPNext's AI features.
Skimmable summary: HTTPS, verified webhooks, a least-privilege API user with rotated keys, minimal payloads, restricted network access.
Frequently asked questions
+Does n8n have a native ERPNext trigger node?
No. n8n's built-in ERPNext node is action-only, with Create, Get, Get Many, Update and Delete. To trigger n8n from ERP events, create a Webhook in ERPNext on a DocType event and point it at an n8n Webhook node's production URL.
+Is n8n free to use with ERPNext?
Self-hosted n8n Community Edition has no licence fee under the Sustainable Use License, with unlimited workflows and executions for internal business use, and ERPNext is open source. So the software costs nothing; you pay for the server and the upkeep. n8n Cloud and Enterprise plans are paid, and you do not need them for standard ERPNext automation.
+Which ERPNext version works with n8n?
Any version with webhooks and the REST API, which covers the current v15 and v16 lines. The integration relies on standard Frappe features, not version-specific behaviour, so it carries across upgrades; retest after each one.
+What authentication does the ERPNext n8n node use?
The ERPNext node uses an API key and API secret generated per user in ERPNext under API Access. n8n sends them as an Authorization: token api_key:api_secret header on each REST request. Generate the secret once (ERPNext shows it a single time), store it in an n8n ERPNext credential, and reuse that credential across nodes.
+Should I use the ERPNext node or the HTTP Request node in n8n?
The ERPNext node for its five basic operations, because it is quicker to set up. The HTTP Request node for everything else: submitting or cancelling documents, running reports or calling whitelisted server methods. Both can use the same API credentials, so mixing them in one workflow is normal.
+Can I sync ERPNext with WhatsApp using n8n?
Yes. A common setup triggers an n8n workflow from a Sales Invoice or Payment Entry webhook, fetches the customer's number with the ERPNext node, and sends an approved template through the WhatsApp Business Cloud node. The same works for order confirmations, delivery updates and payment reminders. See WhatsApp automation with n8n.
Comments & ratings
No comments yet. Start a new discussion.
Manoj · Published on 20 July 2026
Worked with us? Leave a Google review