n8n

How to Automate Gmail to CRM Lead Qualification?

Turn cold email replies into qualified sales work. Replies from one or more Gmail inboxes are read, checked for interest, and turned into deals in your CRM when they are a good fit. This is helpful for SDR teams, founders, and agencies running outreach at scale.

New messages arrive from two Gmail inbox triggers that poll every minute. The email text is captured and the sender address is matched to a person in the CRM. Only contacts tagged as in campaign continue. An AI check using GPT 4 reads the reply and decides if the lead wants a meeting and gives a short reason. A small code step extracts the interested and reason values from the AI output. If interest equals yes, a deal is created in the CRM using the contact name in the title. You can add more inboxes by duplicating the Gmail trigger and linking it to the same flow.

Setup is simple. Connect Gmail, OpenAI, and Pipedrive, then add an in campaign person field in the CRM and set it to True for your targets. Expect faster triage and less manual sorting, often cutting hours each week and speeding first response. Useful for cold email reply handling, founder led sales, and agencies that manage multiple inboxes for clients.

What are the key features?

  • Two Gmail triggers watch inboxes and fetch new replies every minute
  • Set step captures the email body for downstream use
  • Pipedrive search matches the sender email to an existing person
  • Pipedrive get retrieves full person details with resolved properties
  • If check filters only contacts marked as in campaign
  • OpenAI GPT 4 classifies the reply as interested or not and provides a reason
  • Code step parses the AI response into interested and reason fields
  • Conditional route creates a deal only when interest equals yes
  • Deal creation uses the contact name to generate a clear deal title

What are the benefits?

  • Reduce manual reply triage from 2 hours a day to 10 minutes
  • Automate up to 90 percent of repetitive interest checks
  • Improve CRM data quality by creating deals in a consistent way
  • Handle up to 5 times more inbox volume without extra staff
  • Connect Gmail, OpenAI, and Pipedrive in one flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gmail, Pipedrive and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. In n8n, open each Gmail Trigger node, click Credential to connect with, choose Create new credential, and follow the on screen steps to grant access to the correct inbox.
  4. In each Gmail Trigger, set Label Names to Inbox and uncheck Simplify. Keep the polling set to every minute, then save.
  5. In your Pipedrive account, create a Person custom field named in_campaign with True and False options. Set it to True for people in your outreach list.
  6. In the n8n credentials manager, create a Pipedrive credential. Then open the Pipedrive nodes and select this credential for Search Person, Get person, and Create deal.
  7. Create an OpenAI credential in n8n using your API key from the OpenAI website. In the OpenAI node, select that credential and keep the model as GPT 4.
  8. Open the OpenAI node prompt and ensure it asks for a JSON output with interested and reason keys. If you change keys, update the Code step to match.
  9. Open the Code node named Get response and confirm it parses message.content as JSON and outputs interested and reason.
  10. Send a test reply from an email that matches a Pipedrive person set to in_campaign True with clear interest text like Yes, book a meeting. Check Executions in n8n to confirm a deal was created.
  11. To add more inboxes, duplicate a Gmail Trigger node and connect it to the Get email step. Assign the correct Gmail credential for each inbox.
  12. Troubleshoot: If no deals appear, check the If node condition for interested equals yes, verify the OpenAI output is valid JSON, confirm Gmail permissions, ensure the person exists in Pipedrive, and watch for rate limits.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Pipedrive

Sign up

Lite: US$14/user / mo (billed annually). API access included with every plan.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.