Webhook icon
Get icon
SlackIncomingWebhook icon
Log icon

Hand Off Won Pipedrive Deals to Delivery with Full Deal Context

Turn won Pipedrive deals into delivery handoffs with Kestra. A webhook fetches full deal context, celebrates in Slack, and kicks off onboarding.

Categories
Business

The moment a deal is marked won is the moment it leaves everyone's queue: sales is done, delivery has not started, and the customer is waiting. This blueprint gives that gap an owner. A webhook fires on the won event, io.kestra.plugin.pipedrive.deals.Get pulls the complete deal record so downstream steps work from full context rather than a bare id, Slack gets the celebration, and a clearly marked kickoff task shows exactly where your provisioning and onboarding subflows plug in.

How it works

  1. The won_deal_webhook trigger (io.kestra.plugin.core.trigger.Webhook) receives a JSON body carrying dealId, sent by a Pipedrive webhook or your billing system when a deal is marked won.
  2. get_deal (io.kestra.plugin.pipedrive.deals.Get, fetchType: FETCH_ONE) fetches the full record, exposing it as {{ outputs.get_deal.deal }} with fields such as title, value, and currency.
  3. celebrate posts the win to Slack with the title and closed value, announced from data the CRM confirmed rather than whatever the webhook happened to carry.
  4. kickoff_onboarding is a deliberate placeholder built on io.kestra.plugin.core.log.Log. In production you replace it with one or more io.kestra.plugin.core.flow.Subflow tasks that start provisioning, billing setup, and onboarding, passing the deal fields as subflow inputs so every downstream team receives the same facts.
  5. The errors block posts a distinct Slack alert naming the deal whose handoff failed, and why that matters: a won deal that never reaches delivery is churn with a head start.

What you get

  • A sale-to-delivery handoff that fires in seconds, with the full deal record attached.
  • One authoritative fetch of deal context instead of three teams re-querying the CRM.
  • A visible, documented extension point where provisioning subflows belong.
  • A failure alert for the single most expensive event to drop silently.

Who it's for

  • Revenue operations teams closing the gap between closed-won and customer onboarding.
  • Delivery and customer success leads who currently learn about new customers from a weekly export.
  • Platform teams who want provisioning triggered by business events, not tickets.

Why orchestrate this with Kestra

The won-deal handoff is a workflow that crosses team boundaries, which is exactly where informal processes fail. Kestra makes it an executable contract: the event, the context fetch, the announcement, and the kickoff are one execution, and each downstream process is a subflow with its own history and retries. When onboarding asks what they were told about the deal, the answer is in the execution outputs.

Prerequisites

  • A Pipedrive account and API token.
  • A source for the won event, such as a Pipedrive webhook filtered to deal updates with status won, POSTing JSON with a dealId field.
  • A Slack incoming webhook for celebrations and failure alerts.

Secrets

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

Quick start

  1. Add both secrets to your Kestra namespace and replace the webhook key with a strong random value.
  2. POST a test payload such as {"dealId": 1} to the webhook URL using an existing deal id.
  3. Check Slack for the celebration and the execution logs for the handoff placeholder message.
  4. Replace kickoff_onboarding with Subflow tasks pointing at your provisioning flows.

How to extend

  • Chain several io.kestra.plugin.core.flow.Subflow tasks for provisioning, billing, and onboarding, passing {{ outputs.get_deal.deal.title }} and related fields as inputs.
  • Guard the flow with io.kestra.plugin.core.flow.If on the fetched deal status, so only genuinely won deals trigger delivery.
  • Update the deal with io.kestra.plugin.pipedrive.deals.Update after kickoff to record that delivery has started.
  • Post a second, quieter message to the delivery team channel with the operational details instead of the celebration.

Links

Orchestrate with Kestra
Orchestrate Slack with Kestra
Share this Blueprint
See How

New to Kestra?

Use blueprints to kickstart your first workflows.