How to Build a Pipedrive to Gmail Automation in n8n
If you're using Pipedrive as your CRM and Gmail for outreach, you're probably doing a lot of manual work in between — copying contact details, drafting follow-up emails, checking deal stages before se
If you're using Pipedrive as your CRM and Gmail for outreach, you're probably doing a lot of manual work in between — copying contact details, drafting follow-up emails, checking deal stages before sending. n8n lets you eliminate that entirely by connecting both tools in a single automated workflow that runs without you touching it.
This guide walks through how to build a Pipedrive-to-Gmail automation in n8n: what triggers to use, how to structure the logic, and where most people get stuck.
What This Automation Does
The core use case is simple: when something happens in Pipedrive — a deal moves to a new stage, a contact is added, a task is marked done — n8n triggers automatically and sends a Gmail message to the right person with the right content. No copy-pasting. No delayed follow-ups. No missed leads.
Common variations of this workflow include:
- Send a welcome email when a new contact is added to Pipedrive
- Trigger a follow-up email when a deal moves to "Proposal Sent"
- Notify an internal team member when a deal is won or lost
- Send a re-engagement email when a deal has been idle for X days
Each of these follows the same structural pattern in n8n, which makes it easy to adapt once you understand the setup.
Setting Up the Pipedrive Trigger
In n8n, start with the Pipedrive Trigger node. This node listens for webhook events from Pipedrive and fires your workflow whenever the event matches.
To configure it:
- Connect your Pipedrive account using an API token (found in Pipedrive under Settings → Personal Preferences → API)
- Choose the event type —
deal.updatedfor stage changes,person.addedfor new contacts, oractivity.completedfor task-based triggers - Set up the webhook URL in Pipedrive under Settings → Webhooks, pointing to the URL n8n generates for this node
One thing that catches people: Pipedrive's webhook payload includes the current and previous values for most fields. If you're triggering on a deal stage change, you'll want to use an IF node right after the trigger to check that current.stage_id is different from previous.stage_id — otherwise the workflow fires on every deal update regardless of whether the stage actually changed.
Mapping Data and Building the Email
Once the trigger fires, you have access to the full Pipedrive payload. From there, use a Set node to extract the fields you need — contact name, email address, deal name, deal value, stage — and make them available as clean variables for the Gmail node.
For the email content, you have two options:
- Static templates: Write the email body directly in the Gmail node using Pipedrive fields as dynamic values (
{{ $json.person_name }},{{ $json.deal_title }}, etc.) - Dynamic generation: Route the data through a Code node or an AI node (like OpenAI) if you need the email to vary significantly based on context
Keep the Gmail node simple at first. Use the Gmail node in "Send Email" mode, map the recipient to the contact's email from Pipedrive, and write a clear subject line. Get the basic flow working before adding conditional logic.
Handling Edge Cases
Production workflows break on edge cases that testing doesn't catch. Here are the ones that appear most often with Pipedrive-to-Gmail automations:
- Missing email address: Pipedrive contacts don't always have an email. Add an IF node after your Set node to check that the email field is not empty before continuing — otherwise the Gmail node will fail silently or throw an error.
- Duplicate triggers: If a deal is updated multiple times quickly (common when updating via Pipedrive's API or bulk import), your workflow can fire multiple times. Use a deduplication approach — either check timestamps or store the last processed deal ID in a database or Google Sheet.
- Rate limits: Gmail has sending limits for regular accounts (500 emails/day). If you're expecting high volume, use a Google Workspace account or route through an SMTP service like SendGrid instead of the Gmail node directly.
- Timezone mismatches: Pipedrive stores timestamps in UTC. If your email content references dates or times, convert them using n8n's built-in date functions before displaying them to users.
Building this once and getting it right saves hours every week. If you'd rather skip the build-from-scratch step, there are ready-made n8n templates for Pipedrive workflows that come pre-configured with the trigger logic, data mapping, and error handling already done.
Testing Before You Go Live
Before activating the workflow, test it manually using n8n's "Execute Workflow" feature with a sample payload. Pipedrive also lets you send test webhook events from the Webhooks settings page — use that to simulate a deal stage change without actually moving a real deal.
Check that:
- The correct contact email is being pulled from the payload
- Dynamic fields in the email subject and body are resolving correctly
- The IF node conditions are filtering as expected
- Gmail is sending from the account you intended
Once testing passes, activate the workflow and monitor the execution log for the first few real triggers. n8n's execution history shows you exactly what data came in and where the workflow went — which makes debugging fast if something behaves unexpectedly in production.
A Pipedrive-to-Gmail automation built properly in n8n runs reliably for months without intervention. The upfront investment in handling edge cases and testing correctly is what separates a workflow that actually works from one that breaks on the third real lead.

Ja construimos isso pra voce
Nao comece do zero. O Pipedrive Stage - Follow-up Email e um workflow n8n pronto para instalar que faz exatamente isso — em minutos, nao horas.
Instalar por $39 →