Huashu Design
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
An n8n workflow for ERPNext. A webhook sends each new website lead to an AI agent that reads your company files and a contact sheet, then emails the right person a summary through Outlook.
ERPNext website leads routed to the right contact by email is an n8n workflow in the Business category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.
New lead in ERPNext
It starts when ERPNext sends a new lead to the webhook, with:
The person who handles the inquiry gets an email with the customer’s details, a summary and a link to the lead in ERPNext
What you need before you start.
Leads
Sends each new lead to the webhook, and returns the full lead record when the workflow asks for it.
NeedsAn ERPNext API credential, and a webhook on the Lead doctype
Language model
Runs the agent that reads the inquiry, finds the contact and writes the notice.
NeedsOpenAI API key
Contacts and abbreviations
Gives the agent a contact sheet for who handles what, and a list of abbreviations to read.
NeedsA Google Sheets OAuth2 credential, and two sheets
Company information
Gives the agent your company profile and policies to judge the inquiry against.
NeedsA Google Docs OAuth2 credential, and two documents
Sends the notice from your own account to the contacts the agent picked.
NeedsA Microsoft Outlook OAuth2 credential
Checked by Mindket on 13 Nov 2026
This n8n workflow reads each new website lead in ERPNext and tells the right person about it by email. ERPNext calls a webhook when a lead is added. The workflow keeps only open website leads that carry notes, fetches the full lead and hands it to an AI agent. The agent reads your company profile and policies in Google Docs, an abbreviations list and a contact sheet. It decides whether the inquiry fits what you sell and who handles it. A valid inquiry becomes an email through Microsoft Outlook, with a link back to the lead. An invalid one stops there. The file holds 26 nodes, ten of them sticky notes. The original copy had stray text after its JSON, which Mindket’s copy drops.
Sales and support teams that run ERPNext, take leads from a website form and want each one sent to the person who knows the product. Skip it if you do not use ERPNext, or if you want to read each notice before it goes. As imported, the email leaves your Outlook account the moment the agent writes it.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Manufacturing | Sales managers | Send a website inquiry about one product line to the person who sells it | A packaging firm gets a quote request for custom boxes, and its box specialist is emailed. |
| IT services | Presales leads | Pass each demo or integration request to the matching consultant | An integrator gets a request about workflow software, and its automation consultant gets the summary. |
| Facility supplies | Account managers | Route a request for a site visit to the owner of that product | A cleaning supplier gets a floor-care request, and the floor-care account manager is emailed. |
| Professional services | Office managers | Keep stray messages, such as job requests, from reaching the sales team | A consultancy’s form also gets job requests, which the agent marks invalid and nobody is emailed. |
You need to know n8n and ERPNext: a webhook in ERPNext, five credentials, four Google files and a few gaps to fill in.
Any n8n that can reach your ERPNext, OpenAI, Google and Microsoft will run it. ERPNext has to reach the webhook’s address over the internet.
Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Make the four Google files first, since the agent reads them.
| Need | Detail |
|---|---|
| n8n | On n8n Cloud or on a server of your own |
| ERPNext | An API credential, and permission to add a webhook on the Lead doctype |
| OpenAI | An API key for the agent’s model |
| A Docs OAuth2 credential and a Sheets OAuth2 credential, with a company profile, a policies document, a list of abbreviations and a contact sheet | |
| Microsoft | An Outlook OAuth2 credential |
workflow.json.Get Lead Data from ERPNext. In that node’s address and in the link inside Microsoft Outlook, replace <YOUR_ERPNEXT_HOST> with your ERPNext address.OpenAI Chat Model.Abbriviations and Company Contact Database, select it and choose a document and a sheet.Company Profile and Company Policies, select it and replace you-must-provide-the-doc-id with the ID of each document.Microsoft Outlook.name, source and status. Use the Webhook test address first.Nothing to open once it is published. Add a lead in ERPNext, or let your website form add one. The workflow runs for each lead whose source is Website and whose status is Open, and ends quietly for the rest.
| To change | Where |
|---|---|
| Which leads count | Source Website and Status Open |
| How the agent decides and writes | The system message of Customer Lead AI Agent, with its email template |
| Who gets the email | The rows of the contact sheet |
| The email’s look | The HTML in Email Body for Outlook |
| What counts as invalid | Inquiry is Valid? |
A visitor fills the website form and asks for a floor-care contract for three offices, with a site visit first. ERPNext adds the lead and posts it to the webhook.
The agent finds the person who handles floor care in your sheet. It writes a notice with the customer’s name, company and contact details, a summary of the request and a line asking for a prompt reply. Outlook sends it, with a link to the lead at the end.
If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one runs in a line from the webhook to the email. The agent in the middle is one node that can look things up in four Google files before it answers. Test with a contact sheet that holds only your own address.
For experts. The agent’s answer is plain text with fixed labels, and two Code nodes read it back into fields.
| Node | What it does | What to know |
|---|---|---|
Source Website and Status Open | Passes only leads with body.source equal to Website and body.status equal to Open | Anything else ends the run with nothing sent |
Get Lead Data from ERPNext | Fetches the lead from ERPNext’s Lead resource by body.name | The agent reads data.lead_name, company_name, source, notes, city, country and mobile_no |
Fields for Outlook | Pulls the addresses, the subject and the message out of the answer by text patterns | The answer must keep the template’s labels |
Inquiry is Valid? | Passes an answer unless it contains Invalid Lead | Mindket changed it from an exact match on a bold sentence |
The webhook has no authentication, and the email goes out unchecked.
OpenAI Chat Model names no model, so n8n’s default applies, gpt-5-mini (read on 12 November 2026). OpenAI’s deprecations page lists it for shutdown on 11 December 2026, with gpt-5.6-terra as the replacementWebhook has no authentication set, so anyone who learns its address can post a fake lead. Add Header Auth in the node and in ERPNext**Email Address(es):**, _Subject: and Dear, or Microsoft Outlook gets no recipientAn n8n workflow for teams that run ERPNext. When a lead arrives from your website, an AI agent reads it against your
company documents and a contact sheet, decides whether it fits what you sell, and finds who should handle it. That person
gets a notification email from Outlook, with a link back to the lead.
workflow.json: the workflow as n8n exports it, 26 nodes. Ten are sticky notes that label its steps. It holds noREADME.md: these notes.Get Lead Data from ERPNext and Microsoft Outlook. It is now<YOUR_ERPNEXT_HOST>: put your own ERPNext address there, without https://.you-must-provide-the-doc-id text for you to replace.employee@example.com.Inquiry is Valid? compared the agent's answer with the invalid-lead sentence in bold, two asterisks on each side.Invalid Lead.workflow.json.Get Lead Data from ERPNext. In that node's address and in the linkMicrosoft Outlook, replace <YOUR_ERPNEXT_HOST> with your ERPNext address.OpenAI Chat Model.Abbriviations and Company Contact Database, select it and choose aCompany Profile and Company Policies, select it and replaceyou-must-provide-the-doc-id with the ID of each document.Microsoft Outlook.name, source and status. Use Webhook's test address first.| File | What the agent uses it for |
|---|---|
| Company Profile | Your products, services and solutions, so it can tell whether an inquiry fits |
| Company Policies | Rules it should respect when it writes the notice |
| Abbriviations | A list of abbreviations your team uses, so it reads them the way you do |
| Company Contact Database | One row for each person, with an email address and the products, solutions or services they deal with. Add that last column yourself |
Webhook receives the lead from ERPNext, and Source Website and Status Open lets through only leads whose sourcestatus is Open.Lead Body keeps the body, and Get Lead Data from ERPNext fetches the lead by its name.Inquiry has Notes ends the run for a lead with no notes.Customer Lead AI Agent gets the lead's name, company, source, notes, city, country and mobile number. It may look inInquiry is Valid? stops an answer that says the lead is invalid.Fields for Outlook reads the addresses, the subject and the message out of the answer with text patterns. `Email keeps the message, and Email Body for Outlook` turns it into HTML.Microsoft Outlook sends it to the addresses the agent found, with a link to the lead added at the end.Source Website and Status Open. Remove it to include every lead.Customer Lead AI Agent, with its email template.Email Body for Outlook.Microsoft Outlook with a WhatsApp or chat node.OpenAI Chat Model.OpenAI Chat Model names no model in the file, so the node uses its own default, gpt-5-mini (n8n's repository, readgpt-5-mini for shutdown on 11 Decembergpt-5.6-terra as its replacement. Pick a model in the node before then.Webhook has no authentication set, so anyone who learns its address can post a fake lead. Add Header Auth to the nodeFields for Outlook finds the recipients, the subject and the message by their labels, so the agent has to keep the**Email Address(es):**, _Subject: and Dear. An answer that drops them leaves Microsoft Outlook with noNOTICE.md 672 B README.md 6 KB workflow.json 23 KB
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
op7418 · Skill
Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
perplexity-ai · Kit
Picks the best option for a decision from text and images, such as which team should handle a request, with a probability for each choice, for developers who b…
numind · Kit
Reads documents as text or images and fills a JSON template with the fields you ask for, or converts the pages to Markdown. A 4B model for teams that process s…
nace-ai · Kit
Scores yes or no, multiple choice and rating questions about a document in one pass, with a probability for every option. An 8B decision model from Nace.AI tha…