n8n

How to Automate Gmail Pipedrive Lead Qualification?

Stop scanning cold email replies by hand. This setup reads replies from one or more Gmail inboxes and checks if the sender wants a meeting. When interest is clear, a new deal is created in your CRM so sales can follow up fast.

Two Gmail triggers check the Inbox every minute. A Set node grabs the email text. The flow looks up the sender in Pipedrive by email, pulls the person record, and continues only if the person is marked in_campaign True. OpenAI reviews the reply with a clear prompt and returns JSON with interested yes or no and a short reason. A Code node parses that JSON, and an If node sends only interested leads to deal creation.

Add Gmail, OpenAI, and Pipedrive credentials, and create a Person field in Pipedrive called in_campaign with True and False options. Expect faster triage, fewer missed leads, and cleaner CRM data. This design suits outbound teams and agencies that manage several mailboxes.

What are the key features?

  • Two Gmail triggers poll the Inbox every minute and can be duplicated to cover more mailboxes
  • A Set node extracts the plain text body of each email for analysis
  • Pipedrive search locates the person by the sender email address
  • The person record is loaded and filtered by the in_campaign custom field to avoid off-campaign noise
  • OpenAI GPT 4 decides if the reply shows interest and returns JSON with interested and reason
  • A Code node parses the AI output into clean fields for routing
  • An If node creates a Pipedrive deal titled with the contact name only when interest is yes

What are the benefits?

  • Reduce manual reply review from 60 minutes a day to 5 minutes
  • Automate up to 90% of reply triage across multiple inboxes
  • Improve CRM data quality by 80% by adding only qualified deals
  • Connect Gmail, OpenAI, and Pipedrive without switching tools
  • Handle 5 times more replies with the same team size

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, OpenAI and Pipedrive. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, double click each Gmail trigger node, open the Credential to connect with menu, click Create new credential, and follow the on screen steps to connect your Google account. In the node, set Label Names to Inbox and uncheck Simplify. Keep polling every minute and test the node to fetch a recent email.
  4. Double click the OpenAI node. In Credential to connect with, click Create new credential. In your OpenAI account, create an API key on the API Keys page and paste it into n8n. Select the GPT 4 model or a model available to your account.
  5. Open any Pipedrive node, choose Credential to connect with, and click Create new credential. In your Pipedrive account, find your API token under Personal preferences and API, then paste it into n8n. Name the credential clearly so your team can identify it.
  6. In your Pipedrive settings, create a Person custom field named in_campaign with True and False options. Mark your campaign contacts as True before you run the workflow.
  7. Open the Search Person node and confirm the Term uses the expression {{$json.from.value[0].address}}. Run a test item to verify that the correct person is found.
  8. Open the Get person node and keep Resolve Properties enabled so the Name field is available. Execute the node to confirm it returns the person name.
  9. Check the In campaign condition. Make sure it compares the in_campaign field to True. Update the condition if your field values differ.
  10. Review the OpenAI prompt so it returns strict JSON with interested and reason keys. Run a few sample replies and check the Code node output to see interested set to yes or no.
  11. Open the Create deal node and confirm the title uses the person name, for example {{$('Get person from CRM').item.json.Name}} Deal. Create a test reply that signals interest and confirm a deal appears in Pipedrive.
  12. Activate the workflow. Monitor Executions for errors. If a person is not found or the field is missing, ensure the contact exists in Pipedrive with in_campaign set to True, or add an extra If path or enable Continue On Fail on the Get person node.

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.