What This Workflow Does
This workflow checks new email replies in Gmail inboxes and sees if the sender wants a meeting or call.
It looks up the sender in Pipedrive CRM and sees if that person is active in a campaign.
Then it asks OpenAI’s GPT-4 to read and judge the reply for interest and reasons.
If the reply shows interest, it creates a new deal linked to that person in Pipedrive.
The workflow saves time by doing all steps automatically.
Who Should Use This Workflow
Sales teams that send many cold emails to CEOs or founders.
Anyone who wastes time reading replies to find real leads.
It suits users with Pipedrive CRM and Gmail accounts.
Users wanting to cut manual work and find real interested leads fast.
Tools and Services Used
- Gmail: To watch for email replies.
- OpenAI GPT-4: To read and judge interest in replies.
- Pipedrive CRM: To find contacts and create deals.
- n8n Automation: To connect all parts and run the workflow.
- OPTIONAL: self-host n8n for data control.
Input, Processing, and Output
Inputs
- New email reply from monitored Gmail inboxes.
- Sender email address to find contact in CRM.
- Email reply text for OpenAI evaluation.
Processing
- Check Gmail inbox every minute for new replies.
- Search contact in Pipedrive by sender email.
- Verify contact is part of an active campaign using “in_campaign” field.
- Send email reply text to OpenAI GPT-4 for interest and reason analysis.
- Parse OpenAI response for “interested” yes/no and “reason”.
- If interested is yes, create a new deal linked to the contact in Pipedrive.
Output
- A new deal in Pipedrive CRM for contacts that reply showing interest.
- Structured data about interest and reasons stored in the workflow.
Beginner Step-by-Step: How to Build This Workflow in n8n
Step 1: Import the Workflow File
- Download the workflow file from the Download button on this page.
- Open your n8n editor already logged in.
- Use the menu option Import from File and select the downloaded file.
Step 2: Configure Credentials and Settings
- Add your Gmail account API credentials in the Gmail Trigger nodes.
- Insert your OpenAI API key in the OpenAI GPT-4 node.
- Add your Pipedrive API key in all Pipedrive nodes.
- Check and update the
in_campaigncustom field ID if needed in the CRM-related nodes.
Step 3: Adjust Identifiers If Needed
- Confirm the email inboxes you monitor are correct in Gmail nodes.
- Check that contact IDs and fields align with your CRM setup.
Step 4: Review Prompt and Scripts
- Copy the OpenAI prompt below exactly into the OpenAI node for correct interest detection:
=You are the best sales development representative in the world. You send cold email messages daily to CEOs and founders of companies. You do this to persuade them to make contact. This could be a phone call or a video meeting.
Your task is to assess whether someone is interested in meeting up or calling sometime. You do this by attentively evaluating their response.
This is the email:
{{ $('Get email').item.json.text }}
The response format should be:
{"interested": [yes/no],
"reason": reason
}
JSON:- Ensure the Code node uses this JavaScript snippet to parse OpenAI’s reply:
let interested = JSON.parse($json["message"]["content"]).interested;
let reason = JSON.parse($json["message"]["content"]).reason;
return {json: {interested: interested, reason: reason}};Step 5: Test the Workflow
- Send a sample cold email reply to the monitored Gmail inbox.
- Watch the workflow run successfully in n8n’s execution log.
- Confirm a deal is created in Pipedrive when reply shows interest.
Step 6: Activate for Production
- Turn on the workflow in n8n to run continuously.
- If self hosting n8n, ensure your server has stable API access. Learn more about self-host n8n options.
Customizations and Extensions
- Add more Gmail inbox nodes to monitor extra email accounts in parallel.
- Modify the OpenAI prompt for your sales style or industry words.
- Include fields like deal value or close dates in Pipedrive deal creation.
- Add filters to skip auto-replies or irrelevant messages before OpenAI step.
- Set up logging nodes to catch errors or invalid responses and alert you.
Common Edge Cases and Failures
- No person found in Pipedrive: Email sender not matched to CRM contact.
Make sure contact emails are updated and search term matches. - OpenAI response invalid JSON: Model reply not formatted correctly.
Fix prompt or add error handling to retry. - No deal created after interest check: The interest value was not “yes”.
Verify OpenAI output and conditions in IF nodes.
Pre-Production Checklist
- Confirm Pipedrive API access and credentials.
- Verify Gmail inbox connectivity.
- Test OpenAI node with sample replies and check response format.
- Ensure
in_campaignfield exists and is populated in Pipedrive. - Run several test replies through a dry run.
- Backup CRM data before working with live large campaigns.
Deployment Notes
Keep the workflow active in n8n to run automatically.
If running the workflow on your own server, ensure constant API access to Gmail, Pipedrive, and OpenAI.
Monitor jobs in n8n’s dashboard and fix any errors promptly.
Using self-host n8n helps to keep full control and privacy over data.
Summary
✓ The workflow automatically scans email replies.
✓ It finds matching contacts in Pipedrive CRM.
✓ It asks GPT-4 if the reply shows meeting interest.
✓ Only interested leads get deals created.
✓ You save time and reduce manual work.
✓ The sales pipeline grows without missed leads.
