Automation

ERPNext n8n Integration: Automate Your ERP (2026 Guide)

Step-by-step guide to connect ERPNext to n8n using webhooks, the REST API, and the community node — real automation examples, authentication, and security.

MManojJuly 20, 202611 min read
Share

Connecting ERPNext to n8n gives you a free, self-hosted automation layer on top of your ERP. You push events out of ERPNext with webhooks, pull data back with the REST API, and orchestrate everything visually inside n8n. No per-task pricing, no vendor lock-in.

Short answer

To integrate ERPNext with n8n, create a webhook in ERPNext (Integrations > Webhook) that fires on a DocType event like 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 are free and self-hostable.

I am Manoj, an ERPNext implementation consultant at Mith Tech in Bengaluru, and I set up ERPNext-to-n8n pipelines for Indian SMBs almost every month. This guide is the exact playbook I use on client projects: which trigger to pick, how to authenticate safely, and four automations that pay for themselves fast. My honest take: n8n is the cheapest, least regretful way to automate ERPNext, but the built-in node is thinner than people expect, so you will live in the Webhook and HTTP Request nodes more than the ERPNext node.

What is ERPNext n8n integration and why use it?

ERPNext n8n integration is the practice of wiring your ERPNext instance to n8n, an open-source workflow automation tool, so that ERP events trigger automated actions and external systems can read or write ERP data. The pairing replaces brittle custom scripts and expensive per-task automation subscriptions with one visual, self-hosted layer.

The appeal for Indian SMBs is cost and control. Self-hosted n8n Community Edition is free under the Sustainable Use License, with unlimited workflows and executions, so you are not paying per automation run the way you would on some SaaS platforms. Because both ERPNext and n8n can run on your own server, your customer and invoice data never leaves infrastructure you control. If you are weighing tools, I compared the options in n8n vs Zapier vs Make for India.

Skimmable summary: ERPNext n8n integration is a free, self-hosted automation layer that reacts to ERP events and syncs data without per-task fees.

How does ERPNext connect to n8n?

ERPNext connects to n8n in two directions. Outbound, ERPNext fires webhooks on DocType events and n8n catches them on a Webhook node. Inbound, n8n writes or reads ERPNext records using the ERPNext node or an HTTP Request node against the REST API. Most real workflows use both directions at once.

Think of it as a loop. A document changes in ERPNext, ERPNext notifies n8n, n8n does work (calls WhatsApp, updates a CRM, sends an email), and n8n often writes a result back into ERPNext. Here is how the pieces map:

DirectionMechanismWhere it livesUse it for
ERPNext to n8n (trigger)Webhook on a DocType eventERPNext: Integrations > WebhookReacting to new/updated/submitted documents
n8n to ERPNext (read)ERPNext node "Get" / "Get Many" or HTTP Requestn8n workflowFetching a customer, item, or invoice
n8n to ERPNext (write)ERPNext node "Create"/"Update" or HTTP Requestn8n workflowCreating leads, updating stock, posting payments

Note the gap: n8n has no ERPNext trigger node. Every trigger has to originate from an ERPNext webhook. That single fact shapes most of the design decisions below.

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?

Setting up an ERPNext webhook means creating a Webhook document in ERPNext that fires on a chosen DocType event and posts JSON to your n8n Webhook node's URL. You configure the target DocType, the doc event, the request URL, and any security headers, then test with a real document change.

1

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.

2

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.

3

Pick the DocType and Doc Event

Set Document Type (for example, Lead or Sales Invoice) and choose a Doc Event: on_update, after_insert, 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.

4

Set the request URL and payload

Paste your n8n production URL into Request URL, keep the method as POST, and define the webhook data fields you want to send (or send the full document). Only send the fields the workflow needs.

5

Add a security header

Under webhook Headers, add a custom header such as X-Webhook-Secret with a long random value. You will check this value inside n8n so the endpoint rejects forged requests.

6

Test with a real document

Trigger the event in ERPNext (create the lead, submit the invoice). Confirm the execution appears in the n8n Webhook node's Executions tab, then build the rest of the workflow.

Test URL vs production URL

The n8n Webhook node has two URLs. The test URL only fires while you have "Listen for Test Event" active in the editor. The production URL works once the workflow is saved and active. Configure ERPNext with the production URL, or your automation will silently do nothing in daily use.

Skimmable summary: Create an n8n Webhook node, then an ERPNext Webhook on the right DocType and Doc Event pointing at the production URL, secured with a secret header.

How do I authenticate n8n to write back into ERPNext?

n8n authenticates to 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 built-in ERPNext node stores these credentials plus your instance URL; the HTTP Request node can send the same header manually.

Generate the credentials inside ERPNext, then plug them into n8n:

1

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.

2

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.

3

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.

4

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 n8n ERPNext node is deliberately minimal. When you need to submit a document, run a report, or hit a whitelisted server method, drop to the HTTP Request node. It is not a workaround; it is the intended escape hatch, and n8n's docs point you to it explicitly.

Skimmable summary: Generate a per-user API key and secret in ERPNext, store them once in n8n, and fall back to the HTTP Request node for anything the five-operation ERPNext node cannot do.

What are the best ERPNext n8n automations to build first?

The best first automations are the ones that remove a daily manual copy-paste or a missed follow-up. Across my Mith Tech projects, four patterns deliver value in the first week: routing new leads, sending invoices over WhatsApp, alerting on low stock, and confirming payments. Each follows 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/WhatsApp channel so sales sees it in seconds, not at end of day.

Invoice to WhatsApp

Trigger: webhook on Sales Invoice, on_submit. Action: n8n fetches the customer's number, generates or attaches the invoice PDF link, and sends it via a WhatsApp Business API node. Faster delivery, faster payment.

Low-stock alert

Trigger: webhook on Bin or a scheduled n8n check that queries /api/resource/Bin. Action: when actual quantity drops below reorder level, n8n messages the purchase team and can draft a Material Request back in ERPNext.

Payment confirmation

Trigger: webhook on Payment Entry, on_submit. Action: n8n thanks the customer over email/WhatsApp and updates a collections dashboard, closing the loop without manual follow-up.

Here is the lead-to-WhatsApp automation as a concrete example of the full loop:

1

ERPNext fires on new invoice

Sales Invoice webhook on on_submit posts the invoice JSON to n8n's production URL with the secret header.

2

n8n verifies the request

An IF node checks X-Webhook-Secret. Wrong value, stop the workflow.

3

n8n enriches the data

The ERPNext node "Get" pulls the linked Customer to fetch the mobile number and contact name.

4

n8n sends WhatsApp

A WhatsApp Business API node sends a templated message with the invoice number, amount, and a payment link.

5

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.

5
operations in the built-in ERPNext node
Free
n8n Community Edition, self-hosted
0
native ERPNext trigger nodes (use webhooks)

Skimmable summary: Start with lead routing, invoice-to-WhatsApp, low-stock alerts, and payment confirmations; each is a webhook trigger plus a few n8n action nodes.

Is ERPNext n8n integration secure?

ERPNext n8n integration is secure when you protect both directions of traffic. Outbound webhooks must run over HTTPS and carry a secret header that n8n verifies. Inbound API calls must use a dedicated, least-privilege user with a rotating key, never the Administrator account. Get those two right and the surface area is small.

Practical hardening checklist:

  • HTTPS everywhere. Run n8n behind TLS. Never post webhook data to a plain http:// URL.
  • Verify a shared secret. Add a random header in ERPNext and reject any n8n execution that lacks 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-driven automations specifically, see how I connect ERPNext to LLMs safely in connecting ERPNext to ChatGPT and Claude via MCP, and what ERPNext already does natively in does ERPNext have AI features.

Skimmable summary: Use HTTPS, a verified secret header, and a least-privilege API user with rotating keys; send minimal payloads and restrict 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 operations. There is no ERPNext trigger node. To trigger n8n from ERP events, you create a webhook inside ERPNext on a DocType event and point it at an n8n Webhook node's production URL. This is the standard, documented pattern.

Is n8n free to use with ERPNext?

Yes, the self-hosted n8n Community Edition is free under the Sustainable Use License, with unlimited workflows and executions for internal business use. ERPNext itself is open source. So you can run the whole integration at no software cost on your own server. n8n Cloud and Enterprise plans are paid, but you do not need them for standard ERPNext automation.

Which ERPNext version works with n8n?

Any ERPNext version with webhooks and the REST API works, which covers the current v15 and v16 release lines. The integration relies on standard Frappe framework features — webhooks and the REST API — not version-specific behaviour, so it keeps working across upgrades.

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?

Use the ERPNext node for the five basic operations it supports, because it is faster to configure. Use the HTTP Request node for everything else: submitting or cancelling documents, running reports, or calling whitelisted server methods. Both use the same API key credential, so mixing them in one workflow is normal and expected.

Can I sync ERPNext with WhatsApp using n8n?

Yes. A common Mith Tech setup triggers an n8n workflow from a Sales Invoice or Payment Entry webhook, enriches it with the customer's number via the ERPNext node, and sends a templated message through a WhatsApp Business API node. You can do the same for order confirmations, delivery updates, and payment reminders.

About the author

I am Manoj, an ERPNext implementation consultant at Mith Tech, an independent open-source implementation studio in Bengaluru. I help Indian SMBs and mid-market teams deploy and automate ERPNext, Frappe, n8n, and Medusa. This guide reflects setups I build on real client projects.

Want a working ERPNext + n8n automation without the trial and error?

Free · By email

Get practical ERPNext & automation guides

New implementation guides, cost breakdowns and open-source tips for Indian businesses — occasionally, straight to your inbox. No spam.

M

Written by

Manoj

Founder of Mith Tech, an open-source ERP & automation studio. Hands-on ERPNext/Frappe implementation across multi-branch, multi-warehouse Indian operations — GST/TDS/PT compliance, branch-level permissions, and custom Frappe apps that give management real-time visibility.

Keep reading

See what this looks like for your business

Book a free 30-minute audit. We'll map your workflows, find where time and money leak, and design an open-source stack you actually own — no per-user licence fees.

Book a consultation
0 0
Published on 20 July 2026

Manoj

Comments

No comments yet. Start a new discussion.

Ctrl+Enter to add comment