Quick overview
This workflow runs weekly to read open deals and activities from Pipedrive, calculate referral-pipeline coverage and funnel KPIs, and then write a multi-tab management dashboard to Google Sheets and optionally post a summary to Slack/Discord via an incoming webhook.
How it works
- Runs every Monday at 08:00 (or manually) and loads all reporting settings such as stage definitions, KPI mappings, and output destinations.
- Pulls open deals, recent activities, and deal field definitions from the Pipedrive API, or generates a deterministic demo pipeline when Pipedrive isn’t configured.
- Checks deal-field names against a PHI keyword blocklist and stops the run if the workflow is configured to read fields that look like patient clinical data.
- Evaluates each open deal to determine whether it has a valid upcoming “next activity” within the configured horizon and flags uncovered, parked, overdue, and stalled deals.
- Aggregates weekly KPIs across deals, activities, and configured Pipedrive custom fields (writing missing result fields as “not captured” instead of zero), including breakdowns by rep and by practice.
- If a Google Sheet ID is provided, appends a dashboard row and writes the gaps, by-rep, and by-practice tables to their respective Google Sheets tabs.
- Builds a management digest and, if an incoming webhook URL is configured, posts it to Slack/Discord; otherwise the run ends without sending a message.
Setup
- Add your Pipedrive company domain and API token in the config, and optionally set the pipeline ID to restrict reporting to a single pipeline.
- In the config, map RESULT_FIELDS (and any CONTEXT_FIELDS you use) to your Pipedrive deal custom-field keys and ensure none of the targeted field names contain PHI-like terms.
- Create a Google Sheets document with the required tabs (Dashboard, Gaps, By rep, By practice), add Google Sheets credentials in n8n, and set the Sheet ID and tab names in the config.
- Add a Slack or Discord incoming webhook URL in the config (and an optional separate manager webhook) to enable posting the weekly digest.