# Automated lead processing from ERPNext: AI analysis and email notifications
This automation workflow handles incoming leads from ERPNext by triggering on webhook events, analyzing inquiry content with an AI agent (LangChain + OpenAI), and routing notifications to the right team members via email. It ensures faster response times and reduces the risk of missed or misrouted leads.
## Who it´s for
- Sales managers using ERPNext for lead management.
- Companies automating responses to website form submissions.
- Businesses leveraging AI to classify and route leads without manual intervention.
## What the automation does
- Triggers via HTTP webhook when a new lead is created in ERPNext.
- Extracts lead data: source, status, notes, and contact info.
- Sends inquiry text to an AI agent (LangChain + OpenAI) for relevance and topic analysis.
- Looks up responsible contacts in Google Sheets based on predefined rules.
- Drafts a personalized notification email and converts body to HTML.
- Sends email via Microsoft Outlook.
- Skips sending if the request is flagged as invalid (e.g., job inquiry).
## What´s included
- Ready-to-use workflow for n8n.
- Trigger and handler logic based on webhook.
- Integrations with ERPNext, Microsoft Outlook, Google Sheets, Google Docs, and HTTP API.
- Basic textual instructions for setup and adaptation.
## Requirements for setup
- n8n account with workflow deployment access.
- ERPNext instance with webhook configuration rights.
- Microsoft Outlook account (Business or personal) with email send permissions.
- Google Workspace account with access to Google Sheets and Google Docs.
- OpenAI API key.
## Benefits and outcomes
- Faster lead response through instant processing.
- Reduced workload for sales teams: no manual inquiry screening.
- Improved routing accuracy via centralized contact lookup.
- Fewer errors and missed leads thanks to AI-based filtering.
- Scalable: handles any volume of incoming leads.
- Transparent: all actions are logged across integrated systems.
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet