Track Pipedrive Deals in Google Sheets
Pulls active deals from Pipedrive, maps stage IDs to readable labels.
What it does
You get your active Pipedrive deals automatically listed in Google Sheets with readable stage names instead of confusing IDs. This keeps your sales pipeline visible and up to date without manual data entry.
Step by step
- Use the Pipedrive API endpoint GET /v1/deals to retrieve deal data with fields like id, title, stage_id, and value.
- Map internal numeric stage IDs from Pipedrive to human-readable strings using a static dictionary in your code.
- Append rows to Google Sheets using the sheets.spreadsheets.values.append method with the formatted deal details.
Where the LLM does the work
- Generate the specific JSON structure for the Pipedrive API request parameters to ensure all necessary fields are included.
- Create the mapping logic that translates ambiguous stage IDs into clear, consistent labels like 'Closed Won' or 'Lost'.
- Format the date stamps and deal values into a clean row array suitable for direct insertion into the spreadsheet.
Watch out for
Stage IDs may change if your Pipedrive admin updates pipeline settings so store the mapping dynamically or check for ID mismatches before appending.
Missing stage_id fields can cause crashes so add a default fallback label like 'Unknown Stage' for any deals lacking this data.
Tools that fit
Code API Map stage IDs to names and format columns
The agent brief
Everything your agent needs, including the gotchas. Copy it and go.
You are helping me build the following AI agent workflow. ## Goal Track Pipedrive Deals in Google Sheets: Pulls active deals from Pipedrive, maps stage IDs to readable labels. ## Specification - What it does: You get your active Pipedrive deals automatically listed in Google Sheets with readable stage names instead of confusing IDs. This keeps your sales pipeline visible and up to date without manual data entry. - Trigger: Run manually (Manual · on demand) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Pipedrive: Fetch deals and stage IDs - Google Sheets: Log deal data for reporting - Code: Map stage IDs to names and format columns ## Known pitfalls, handle each one explicitly in your implementation 1. Stage IDs may change if your Pipedrive admin updates pipeline settings so store the mapping dynamically or check for ID mismatches before appending. 2. Missing stage_id fields can cause crashes so add a default fallback label like 'Unknown Stage' for any deals lacking this data. ## Reference implementation https://n8n.io/workflows/7740 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/track-pipedrive-deals-in-google-sheets/ via usecasesforagents.com
Frequently asked questions
Can I use a different CRM than Pipedrive?
Yes. Pipedrive is only the example CRM in this recipe. The same flow works with Agile CRM, Attio, Close CRM and Freshworks CRM. Swap the CRM connection and keep the rest of the setup as written.
Want this running in your business?
This is what I do. I design and build AI agents like this one, and keep them running. If you want it set up for your team instead of doing it yourself, get in touch.
Who it's for
Built for sales teams who want the prep work done before they pick up the phone.
Founders and execs get the same output without having to ask someone else to run it.