{
  "schema_version": "1.0.0",
  "id": "deal-stage-friday-digest",
  "title": "Collect HubSpot deal moves into a Friday Slack digest",
  "category": "reporting",
  "difficulty": "beginner",
  "featured": false,
  "description": "Record every HubSpot deal stage change during the week and post the whole list to the sales channel on Friday afternoon.",
  "tags": [
    "hubspot",
    "pipeline",
    "digest",
    "slack",
    "weekly"
  ],
  "apps": [
    "HubSpot",
    "Digest by Zapier",
    "Filter by Zapier",
    "Slack"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 3 steps after the trigger",
      "Filter by Zapier"
    ]
  },
  "tasks": {
    "typical": 0,
    "max": 1
  },
  "trigger": {
    "app": "HubSpot",
    "event": "Updated Deal Stage",
    "kind": "polling",
    "title": "Deal stage changed",
    "why": "Fires each time a deal changes stage in the chosen pipeline.",
    "config": {
      "Pipeline": "Sales Pipeline"
    },
    "outputs": [
      "deal_id",
      "deal_name",
      "amount",
      "deal_stage",
      "owner_name",
      "close_date"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "collect",
      "kind": "digest",
      "app": "Digest by Zapier",
      "event": "Append Entry and Schedule Digest",
      "title": "Add the move to this week's digest",
      "why": "Each stage change becomes one line; the digest releases on Friday at 3pm.",
      "fields": {
        "Title": "Pipeline moves",
        "Entry": "{{trigger.deal_name}} → {{trigger.deal_stage}} ({{trigger.amount}}, {{trigger.owner_name}})",
        "Frequency": "Weekly",
        "Day of the Week": "Friday",
        "Time of Day": "3pm",
        "Timezone": "YOUR_TIMEZONE"
      },
      "outputs": [
        "entries",
        "entry_count",
        "is_released"
      ]
    },
    {
      "key": "released",
      "kind": "filter",
      "app": "Filter by Zapier",
      "event": "Only continue if...",
      "title": "Only when the digest is released",
      "why": "Zapier holds the run at the digest step until the digest is released, and the released run carries every collected entry. The filter states that rule in the Zap itself, so a copy edited to use \"Release Existing Digest\" elsewhere still only sends once.",
      "conditions": [
        [
          {
            "field": "{{collect.is_released}}",
            "operator": "(Boolean) Is true"
          }
        ]
      ],
      "usually": false
    },
    {
      "key": "post",
      "kind": "action",
      "app": "Slack",
      "event": "Send Channel Message",
      "title": "Post the week's moves",
      "why": "The list is the agenda for the pipeline review.",
      "fields": {
        "Channel": "#sales",
        "Message Text": "*Pipeline moves this week ({{collect.entry_count}})*\n{{collect.entries}}",
        "Send as a bot?": "Yes",
        "Bot Name": "Zap alerts",
        "Include a link to this Zap?": "No"
      },
      "outputs": [
        "ts",
        "permalink"
      ]
    }
  ]
}
