Automated Lead Enrichment & Ideal Buyer Identification with Pipedrive & Datagma

This workflow automates enriching new Pipedrive company records with Datagma data, identifying ideal buyers by job title and company score, and adding them as contacts. Save hours on lead qualification and maintain accurate CRM data automatically.
pipedrive
httpRequest
itemLists
+5
Workflow Identifier: 1438
NODES in Use: Item Lists, Pipedrive, HTTP Request, Merge, If, Set, Pipedrive Trigger, Sticky Note
Automate lead enrichment with Pipedrive and n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow finds new company records in Pipedrive, adds company details from Datagma, searches employees who might be buyers, finds their emails, and then saves all this information back to Pipedrive. It solves the problem of wasting time on manual lead enrichment and missing accurate contacts.

It works by first catching new companies added in Pipedrive, then calling Datagma’s API to get company info and employee data. After that, it filters employees based on job titles and company scores to find ideal buyers. It looks up their business emails, cleans the data, merges it properly, and creates new contacts in Pipedrive with full details.

The result is saving many hours every week, avoiding errors from wrong or missing data, and having better leads ready for sales teams to contact.


Who Should Use This Workflow

This is good for sales directors or teams who spend hours manually enriching new company leads in Pipedrive.

Also useful for anyone who needs more accurate company info and decision-maker contacts without doing manual research daily.

If the sales team loses deals because of bad or incomplete lead data, this automation helps fix that.


Tools and Services Used

  • n8n: Automation platform that runs the workflow.
  • Pipedrive API: To watch for new organization records and add or update contacts and companies.
  • Datagma API: To get detailed company data and find professional email addresses.
  • HTTP Request node: To call Datagma API.
  • Item Lists node: To split employee data for individual processing.
  • If node: To filter employees based on job title and company score.
  • Merge node: To combine new data with existing Pipedrive contacts and avoid duplicates.

Optionally, use self-host n8n for reliable workflow running if not using n8n cloud.


Inputs, Processing, and Outputs

Inputs: New company records added in Pipedrive.

Processing Steps:

  • Trigger on new organization in Pipedrive.
  • Call Datagma API to get full company info and employee list.
  • Split employees into items for evaluation.
  • Filter employees with job titles containing “sales” and company score > 0.1.
  • Find emails of filtered employees using Datagma email API.
  • Format data to prepare for matching existing records.
  • Merge new data with existing Pipedrive contacts by LinkedIn URL.
  • Add filtered employees as new people in Pipedrive with enriched data.
  • Update the company record in Pipedrive with enriched company details from Datagma.

Output: New, enriched people and updated company records in Pipedrive ready for sales outreach.


Beginner Step-by-Step: How to Use This Workflow in n8n

1. Download and Import the Workflow

  1. Use the Download button on this page to save the workflow file.
  2. Open your n8n editor.
  3. Go to File → Import → Import from File and select the downloaded file.

2. Configure Credentials

  1. Add your Pipedrive API Key in the Pipedrive Trigger and any other Pipedrive nodes.
  2. Enter your Datagma API Key in the HTTP Request nodes used for company and email enrichment.

3. Update IDs or Custom Fields if Needed

  1. Check if organization IDs or other IDs from Pipedrive are correct.
  2. Adjust custom property fields in the Pipedrive – Add Person node if you use different names or IDs.

4. Test the Workflow

  1. Manually add a test company in Pipedrive to trigger the workflow.
  2. Watch execution in n8n to confirm data flows correctly and enriched data appears.

5. Activate the Workflow

  1. Turn the workflow toggle to active inside n8n to make it listen for new companies live.
  2. Monitor the executions regularly to catch any errors early.

Following these steps will get the workflow working in production without needing to build from scratch.


Customization Ideas

  • Change keywords in the If node to find different buyer roles, like “Head of Marketing”.
  • Adjust the company score threshold to include more or fewer leads.
  • Add extra contact fields like phone numbers if those exist in Datagma results.
  • Enable continueOnFail in the HTTP Request nodes to keep the workflow running if Datagma API calls temporarily fail.

Handling Common Errors

Workflow not triggering on new companies: Check that the Pipedrive Trigger is set to action “added” and object “organization”. Verify Pipedrive webhook permission and API keys.

Datagma API returns incomplete data: Make sure the API keys have enough quota and the parameters like company name are correct.

Merge node fails due to missing keys: Ensure both data sets have the linkedInUrl field before merging. Use Set nodes to rename fields if needed.


Summary of Results

✓ Saves over 10 hours per week by automating lead enrichment.
✓ Produces more accurate contacts and company data.
✓ Reduces manual errors like wrong emails or incomplete profiles.
✓ Prepares enriched, ready-to-contact leads directly in Pipedrive.
✓ Helps sales teams focus on outreach instead of data research.

Automate lead enrichment with Pipedrive and n8n

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Set the Pipedrive trigger node to watch for action ‘added’ on the ‘organization’ object and confirm API credentials and webhook permissions.
Check if the Datagma API key is valid and within quota limits. Verify if the query parameters like company name are accurate.
It uses a Merge node keyed on LinkedIn URL to combine enriched data with existing contacts, preventing duplicates.
Yes. The If node’s job title keyword filter can be changed to find other roles such as ‘Head of Marketing.’
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.