AI agent for CRM and lead follow-up: how to build a working workflow in n8n
Every lead that gets followed up too late is potential revenue you're missing out on. Yet manual lead follow-up is still the norm in most small and medium-sized businesses: someone checks the CRM, sends an email, forgets to follow up, and the lead goes cold. With an AI agent for CRM and lead follow-up, you fix this structurally. In this article you'll learn how to build a working n8n CRM workflow step by step that automatically recognizes, qualifies and follows up new leads, without writing a single line of code. You'll learn which triggers to set up, how to add conditions and how to connect email and CRM data.
Why manual lead follow-up costs you money
Most CRM systems, whether you use HubSpot, Pipedrive or ActiveCampaign, contain the data you need. The problem isn't the information, it's the action that needs to follow. A new lead comes in through a web form, a LinkedIn connection or a demo request. Then someone has to see it, assess it, write the right email and send it at the right moment.
That sounds manageable until you have fifteen leads per week, three sales reps with packed calendars and a CRM that doesn't prioritize automatically. Then leads slip through. Research from Harvard Business Review shows that the chance of reaching a lead is seven times higher if you respond within an hour instead of after a day. Automatic lead follow-up through an AI agent isn't a luxury, it's a competitive advantage.
What an AI agent for CRM actually does
An AI agent isn't a simple autoresponder. It's an automated workflow that thinks and decides based on context. In n8n you combine a language model like GPT-4o or Claude with your CRM data, email system and possibly other tools like Slack or a calendar.
A working AI agent for lead follow-up does the following:
- Recognizes a new lead based on a trigger in your CRM
- Retrieves relevant data: name, company, industry, lead source
- Scores the lead based on criteria you define
- Drafts a personalized follow-up email via GPT-4o or Claude
- Sends the email through your email system and logs the action back into the CRM
- Schedules a follow-up task if there's no response after X days
This is what automating lead follow-up means in practice: not template emails that treat everyone the same, but contextual communication that feels personal.
Step by step: building an n8n CRM workflow
Step 1: choose your trigger
In n8n, every workflow starts with a trigger. This is the event that activates the AI agent. For lead follow-up, the most common triggers are:
- A webhook that fires as soon as a form on your website is submitted
- A CRM trigger via the HubSpot node or Pipedrive node that responds to a new contact
- An email trigger that responds to incoming mail with a specific label or sender
Choose the trigger that's closest to how you work today. If leads come in through a Typeform or a contact form on your website, use the Typeform node or a generic webhook. If your CRM is the primary source, use n8n's native CRM integration.
Step 2: retrieve CRM data
Once the trigger fires, you want to know more about the lead. Add an HTTP Request node or a CRM node that pulls the full contact details. Think: company name, job title, industry, which pages they visited and through which channel they came in.
You then use this data as input for the language model. The more context you provide, the more relevant the generated follow-up email becomes.
Step 3: set conditions with an IF node
Not every lead deserves the same approach. Use an IF node in n8n to branch based on lead quality or type. Examples of useful conditions:
- Is the company larger than ten employees? Route to the enterprise flow.
- Did the lead request a specific service? Activate a product-specific follow-up email.
- Is the lead from a priority industry? Queue a task for an immediate phone call.
With conditions, you prevent your AI agent for CRM from sending one generic message to everyone. You're essentially building a decision tree that segments before any communication happens.
Step 4: generate a personalized email with GPT-4o or Claude
This is the heart of the workflow. Add an OpenAI node or Anthropic node and give the language model a clear prompt. An effective prompt structure looks like this:
Give the model the role, the context and the instructions. For example: "You're a friendly sales rep at [company name]. Write a short, personal follow-up email for [name] from [company] who has shown interest in [service]. Keep it under 150 words, ask one concrete question and end with an invitation for a short call."
Fill in the variables dynamically from the CRM data you retrieved in step 2. n8n makes this easy through expressions like `{{ $json.contactName }}` or `{{ $json.companyName }}`.
GPT-4o is strong at quickly generating smooth, commercial copy. Claude from Anthropic is a good choice if you want the tone to be a bit more nuanced or careful. Both work very well in n8n through the available nodes.
Step 5: send the email and log the action
Connect a Gmail node, Outlook node or SMTP node to actually send the generated email. Then make sure you write the action back to your CRM: log the send date, the content of the email and the lead's status. This is crucial for reporting and for the next step in the workflow.
Step 6: automatic follow-up if there's no response
Building an AI agent that only sends the first email is good, but an agent that also monitors the follow-up is better. Add a wait step of, say, three business days. Then check via a CRM node whether the lead has responded or has already moved further down the pipeline. If not, trigger a second, shorter follow-up email or queue a task for someone to call.
Common mistakes when automating lead follow-up
The most common mistake is giving the language model too little context. If your prompt only says "write a follow-up email" without a name, company or context, you get generic output that feels like spam. So always give the agent the lead source, the company size and the service they're interested in, and have it reference those explicitly.
A second mistake is going fully autonomous from day one. For the first few weeks, let the agent prepare drafts that an employee approves with one click. Only when the quality is consistently good do you switch to automatic sending. And never skip step 5: an agent that doesn't write its actions back to the CRM makes your data less reliable instead of better.
Set up properly, this workflow pays for itself within weeks: faster follow-up, fewer missed leads and a CRM that keeps itself up to date. Want to see what this looks like for your sales process? In a discovery call we'll walk through it together and you'll see right away where the biggest gains are.
Ready to win back your time?
Book a free discovery call. We look at your business together and show you how much capacity you can win back with an AIOS.
Book a free call →