Schedule icon
List icon
Script icon
Process icon
SlackIncomingWebhook icon
DiscordIncomingWebhook icon

Daily Pipedrive Pipeline Digest with Python Totals in Slack

Post a daily Pipedrive pipeline digest to Slack with Kestra. List open deals, sum their value in Python, and deliver total value and deal count.

Categories
Business

The most useful pipeline report is the one nobody has to remember to run. This blueprint lists open deals with io.kestra.plugin.pipedrive.deals.List, hands the raw records to a short Python step through an environment variable, and computes the two numbers a morning channel actually reads: total open pipeline value and deal count. The scalars come back through Kestra's outputs protocol and land in Slack before standup.

How it works

  1. list_open_deals (io.kestra.plugin.pipedrive.deals.List, fetchType: FETCH, status: open) pulls up to 100 open deals into the execution as {{ outputs.list_open_deals.deals }}.
  2. summarize_pipeline (io.kestra.plugin.scripts.python.Script on the Process task runner, so no container pull is needed) receives the deal records as JSON in the DEALS_JSON environment variable, sums the value field, and counts deals per status.
  3. The script emits total_value, deal_count, and open_count through the ::{"outputs": {...}}:: protocol, making them addressable as {{ outputs.summarize_pipeline.vars.* }}.
  4. notify interpolates the scalars into a one-line Slack digest.
  5. The errors block posts a Discord alert when the digest fails, so a silent morning is an incident, not an ambiguity, and a disabled-by-default Schedule trigger runs the flow each weekday at 07:00.

What you get

  • A pipeline headline delivered on schedule, computed from the same records the CRM shows.
  • Python where Python is the right tool, with the totals flowing back into the YAML as first-class outputs.
  • Scalars in the notification payload, so the JSON stays valid no matter what deal titles contain.
  • A hard distinction between a quiet pipeline and a broken report.

Who it's for

  • Sales leaders who want the morning number without opening a dashboard.
  • Revenue operations teams replacing a manually exported spreadsheet snapshot.
  • Teams that already run Kestra for data work and want go-to-market reporting in the same place.

Why orchestrate this with Kestra

A digest like this usually lives in a notebook someone runs when they remember, or a paid dashboard nobody opens. Kestra turns it into a scheduled, observable flow: the CRM call, the computation, and the delivery are one execution with history, retries, and a failure alert. The Python stays small because the orchestration is not its job.

Prerequisites

  • A Pipedrive account and API token.
  • A Kestra worker with Python available for the Process task runner.
  • A Slack incoming webhook for the digest and a Discord incoming webhook for failure alerts.

Secrets

  • PIPEDRIVE_API_TOKEN: Pipedrive API token.
  • SLACK_WEBHOOK_URL: Slack incoming webhook URL.
  • DISCORD_WEBHOOK_URL: Discord incoming webhook URL.

Quick start

  1. Add the three secrets to your Kestra namespace.
  2. Execute the flow manually and check the Slack digest carries a value and count matching your Pipedrive open pipeline.
  3. Set disabled: false on the daily trigger and adjust the cron to your standup time.

How to extend

  • Break the totals down per stageId or per owner in the Python step and add the extra scalars to the payload.
  • Scope the list with pipelineId or ownerId and run one digest per team, each with its own webhook.
  • Track day-over-day movement by storing yesterday's totals in a KV store and diffing in the script.
  • Page through larger pipelines by passing the nextCursor output into repeated list calls before summarizing.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.