How to Automate Email Reply Detected → Pipedrive Activity Log with n8n
Your sales rep sends 40 emails on Monday. By Thursday, 12 prospects have replied — but three of those replies landed in a shared inbox nobody watched, one came from a personal Gmail the rep didn't rec
Your sales rep sends 40 emails on Monday. By Thursday, 12 prospects have replied — but three of those replies landed in a shared inbox nobody watched, one came from a personal Gmail the rep didn't recognize, and two were from people who were never added to Pipedrive in the first place. The deals didn't stall because the product was wrong. They stalled because a reply sat unlogged and unanswered for 48 hours. This is the quiet leak in almost every outbound motion: the CRM only knows what someone remembers to type into it.
The problem: replies are the moment of highest intent, and they're invisible
A prospect replying to a cold or follow-up email is the strongest buying signal you get in outbound. It means someone read your message, cared enough to respond, and is — right now — thinking about your offer. Response speed is directly tied to conversion: the odds of qualifying a lead drop sharply after the first hour of silence.
Yet the reply lives in an inbox, not in your CRM. Pipedrive only shows the activity if a rep manually opens the deal, finds the contact, and logs a note. In practice three failure modes recur:
- Replies to unmatched contacts. The person replies from an address that isn't on any Pipedrive deal — a colleague, a personal account, a forwarded thread. Nobody notices they're interested.
- Silent logging gaps. The rep sees the reply, means to log it, gets pulled into a call, and forgets. The deal timeline now lies about what happened.
- No routing. Even when logged, nobody is alerted, so the reply waits until the rep next checks their pipeline.
You can't fix a pipeline you can't see. Manual logging is exactly the kind of low-value, high-discipline task that erodes the moment a team gets busy — which is precisely when replies spike.
The solution: an event-driven bridge between your inbox and Pipedrive
The fix is a workflow that treats every inbound reply as an event and reacts automatically. When an email arrives that is a reply to one of your sales threads, the workflow does three things in sequence:
- Reads the sender address and matches it against Pipedrive contacts.
- If a match exists, logs the reply as an Activity on that person's open deal, with the subject line, timestamp, and a snippet of the body.
- If no match exists, sends an alert — to Slack, email, or WhatsApp — so a human decides whether this is a new lead worth adding.
Nothing is dropped. Matched replies become clean CRM history; unmatched replies become a flagged opportunity instead of a lost one. This is a job automation does better than any human: it never gets busy, never forgets, and runs the same at 2 a.m. as at 2 p.m.
Step-by-step: building it in n8n
Here's the node-by-node structure. The whole thing is five or six nodes and takes about 20 minutes to wire up if your credentials are ready.
1. Trigger — Gmail Trigger (or IMAP Email). Use the Gmail Trigger node set to poll every minute. Configure it to watch a specific label or search filter — for example, in:inbox is:unread combined with a Gmail filter that labels replies to your sending address. If you send from Google Workspace, the cleanest approach is a Gmail filter that applies a sales-reply label to messages matching to:you@company.com that are part of an existing thread; point the trigger at that label. For non-Google mail, swap in the IMAP Email node.
2. Filter — detect that it's actually a reply. Add an IF node. Check that the subject line contains Re: or that the In-Reply-To / References header is populated. Reading headers is the reliable method — subject-line matching alone misses replies from clients that strip the "Re:" prefix. In the IF node, use an expression like {{ $json.headers['in-reply-to'] }} and test that it is not empty. This stops the workflow from logging cold inbound spam as sales activity.
3. Look up the contact — Pipedrive node, "Search Person". Add a Pipedrive node with the resource set to Person and operation Get / Search, searching by the sender's email address. Extract the sender with an expression such as {{ $json.from.value[0].address }}. The node returns either a person object (with an ID and associated deals) or an empty result.
4. Branch on the match — a second IF node. Test whether the search returned a person ID. This splits the flow into the two paths described above.
5a. Matched path — log the activity. Use a Pipedrive node, resource Activity, operation Create. Set:
subject:Email reply: {{ $json.subject }}type:emailperson_id: the ID from the search nodedeal_id: the person's open deal, if returneddone:true(the reply already happened — it's a completed activity)note: a snippet, e.g.{{ $json.textPlain.substring(0, 500) }}
Now the deal timeline reflects reality automatically.
5b. Unmatched path — alert a human. Add a Slack, Send Email, or HTTP-based WhatsApp node. Send a message like: "Reply from unknown sender {{ sender }} — subject '{{ subject }}'. Not in Pipedrive. Add as lead?" Include the snippet so the rep can decide without opening their inbox.
6. Optional — mark as processed. Add a final Gmail node to remove the sales-reply label or mark the message read, so the trigger never processes the same email twice. This idempotency step matters more than it looks; without it, a re-poll can double-log an activity.
The benefits: speed, accuracy, and a CRM you can trust
Once this runs, several things change at once. Response time collapses — the alert fires within a minute of the reply landing, so reps act while intent is hot instead of hours later. The pipeline stops lying — every reply is logged the same way, every time, so forecasting and activity reports reflect what actually happened. Nothing falls through — replies from unknown addresses become flagged leads instead of silent losses, which is often where the surprising deals come from.
There's a compounding effect too: because logging is free and automatic, you can finally build reporting on reply rates per campaign, per rep, per segment — data that was never reliable when it depended on manual entry. The workflow turns a discipline problem into a data asset.
Common pitfalls — and how to avoid them
Logging your own replies. If the rep replies to the prospect from the monitored inbox, the trigger can catch it too. Add a condition in your IF node to skip messages where the sender is one of your own team addresses — match against a small list of internal domains.
Duplicate activities from re-polling. The Gmail Trigger can re-emit a message if it's still unread on the next poll. Always include the "mark processed" step (node 6), or key off the message ID to dedupe. This is the single most common cause of noisy Pipedrive timelines with this pattern.
Fuzzy contact matching. People reply from a different alias than the one you emailed — john@company.com vs j.smith@company.com. When the exact search fails, add a fallback that searches Pipedrive by the email domain and, if it finds a single organization match, routes to the alert path with that context attached rather than treating the sender as fully unknown.
Rate limits and body parsing. Pipedrive's API has request limits; if you process high volume, add a small Wait node or batch. And parse the plain-text body, not the HTML — quoted reply chains can balloon the note field, so always trim to the first few hundred characters of the new content.
Trigger scope too wide. Pointing the trigger at your whole inbox invites false positives. Constrain it with a dedicated Gmail label and filter so only genuine reply threads ever enter the workflow. Narrow the input and the rest of the flow stays clean.
Build it once, and the highest-intent moment in your sales process stops depending on whether someone remembered to write it down.
Ja construimos isso pra voce
Nao comece do zero. O Email Reply Detected → Pipedrive Activity Log e um workflow n8n pronto para instalar — conecta suas ferramentas em minutos, sem codigo.
Instalar por $39 →