What This Automation Does
This workflow watches a Google Drive folder for new lead spreadsheets.
When new files appear, it reads their data and checks existing Pipedrive leads.
It stops duplication by matching emails and person IDs.
For new leads, it creates organizations, people, and leads in Pipedrive.
Also, it adds notes with company size to give sales context.
This saves many hours of manual work and lowers mistakes in lead handling.
Tools and Services used
- Google Drive Trigger node: Detects new spreadsheets in a specific folder.
- Google Drive node: Downloads the new spreadsheet files.
- Spreadsheet File node: Reads spreadsheet rows converting them into JSON.
- Pipedrive node: Fetches, filters, and creates leads, persons, organizations, and notes in CRM.
- IF node: Checks data conditions like positive person ID.
- Merge node: Compares emails and filters duplicates.
- Set node: Prepares and formats fields from the spreadsheet.
Inputs, Processing, and Outputs
Inputs
- New lead spreadsheet file uploaded into a specific Google Drive folder.
- Existing leads data from Pipedrive CRM.
Processing Steps
- Trigger detects new file created in Google Drive folder.
- Download the spreadsheet file with Google Drive node.
- Parse the spreadsheet rows to extract leads information.
- Fetch all existing leads from Pipedrive to check for duplicates.
- Use IF node to find leads linked to persons via person ID.
- Retrieve detailed person information from Pipedrive when person ID is valid.
- Merge spreadsheet and Pipedrive data, removing duplicate emails.
- Format lead data fields like company, full name, email, and employees count using Set node.
- Create new organization in Pipedrive for unmatched companies.
- Create new person linked to the organization with lead source tagged.
- Create a new lead associated with the created person and organization.
- Add notes to the lead containing company size.
Outputs
- New organizations, persons, and leads added in Pipedrive.
- Lead notes with company size for sales insights.
- Cleaned lead data avoiding duplication.
Beginner Step-by-Step: How to Use this Workflow in n8n
Importing the Workflow
- Download the workflow file using the Download button on this page.
- Open the n8n editor where the user already logged in.
- Click the menu and select “Import from File.”
- Choose the downloaded workflow file to upload.
Configuration after Import
- Add Google Drive OAuth2 credentials with access to the lead folder.
- Add Pipedrive API Key for CRM access.
- Update the watched folder ID in the Google Drive Trigger node to user’s lead folder.
- Update any email addresses, owner IDs, or custom fields in Pipedrive nodes if needed.
Testing and Activation
- Run the workflow manually with a test lead file uploaded to the folder.
- Check logs and execution results to confirm new leads created.
- Activate the workflow to run continuously for automatic lead imports.
- If self hosting n8n, consult self-host n8n for setup details.
Customization Ideas ✏️
- Change the Google Drive folder in the trigger to watch other sources.
- Add phone number, industry, or other fields in the Set node to enrich lead info.
- Assign leads to different CRM users by updating the owner_id dynamically.
- Add marketing or campaign notes in Pipedrive note creation node.
- Use additional filtering in IF nodes to skip duplicates or low-quality leads.
Troubleshooting 🔧
- Problem: Google Drive Trigger not activating on new files.
Cause: Wrong folder ID or missing Google Drive permissions.
Solution: Verify folder ID and OAuth2 credentials, upload a test file. - Problem: Leads missing in Pipedrive.
Cause: API credentials invalid or fields not mapped right.
Solution: Confirm Pipedrive API Key, check mandatory fields like organization name and person email. - Problem: Spreadsheet File node fails reading the file.
Cause: Unsupported file type or corrupted spreadsheet.
Solution: Use XLSX or CSV formats, re-export spreadsheet from Google Sheets if needed.
Pre-Production Checklist ✅
- Confirm Google Drive folder ID is correct and user has access.
- Verify Pipedrive API credentials have full rights.
- Upload a sample lead spreadsheet to test end-to-end.
- Make sure spreadsheet columns match the fields mapped in the Set node.
- Check workflow runs without errors during testing.
- Backup existing Pipedrive data before live runs for rollback safety.
Summary of Benefits and Results
✓ Saves 6+ hours weekly of manual data entry.
✓ Prevents duplicate entries in Pipedrive.
✓ Provides consistent, error-reduced lead data.
✓ Keeps lead pipeline updated automatically.
✓ Enhances sales insights via notes on company size.
