{
  "name": "Daily Stand-up Collector — Purrly",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": {
        "hook": 1,
        "maxResults": 1
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 0, "y": 0 },
        "restore": { "parameters": { "hook": { "label": "Stand-up Submit Webhook" } } },
        "parameters": [
          { "name": "hook", "type": "hook:gateway:CustomWebHook", "label": "Webhook" },
          { "name": "maxResults", "type": "number", "label": "Maximum number of results" }
        ]
      }
    },
    {
      "id": 2,
      "module": "slack:ActionSetChannelTopic",
      "version": 1,
      "parameters": {},
      "mapper": {
        "channel": "#standup",
        "tagId": "slack-standup-active",
        "topic": "Stand-up of {{formatDate(now; \"YYYY-MM-DD\")}} — {{1.author}} submitted, waiting on {{2.pendingAuthors.length}} more"
      },
      "metadata": {
        "designer": { "x": 300, "y": 0 },
        "parameters": [],
        "restore": {}
      }
    },
    {
      "id": 3,
      "module": "builtin:BasicAggregator",
      "version": 1,
      "parameters": {
        "feeder": 1,
        "rowType": "uploads/files/aggregator-row.yaml"
      },
      "mapper": {
        "author": "{{1.author}}",
        "yesterday": "{{1.yesterday}}",
        "today": "{{1.today}}",
        "blockers": "{{1.blockers}}"
      },
      "metadata": {
        "designer": { "x": 600, "y": 0 },
        "parameters": [{ "name": "feeder", "type": "uploads", "label": "Source module" }],
        "restore": {}
      }
    },
    {
      "id": 4,
      "module": "builtin:BasicFeeder",
      "version": 1,
      "parameters": {
        "delay": 86400
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 900, "y": 0 },
        "label": "Wait 1 day",
        "parameters": [{ "name": "delay", "type": "number", "label": "Delay (seconds)" }]
      }
    },
    {
      "id": 5,
      "module": "slack:ActionCreateMessage",
      "version": 1,
      "parameters": {},
      "mapper": {
        "channel": "#standup",
        "text": "<@{{3.author}}> you haven't filed your stand-up for today yet. Drop your *Yesterday / Today / Blockers* in this thread when you have a minute — the recap goes out at 4pm.",
        "as_user": true
      },
      "metadata": {
        "designer": { "x": 1200, "y": 0 },
        "parameters": [
          { "name": "channel", "type": "channel", "label": "Channel" },
          { "name": "text", "type": "text", "label": "Message text" }
        ],
        "restore": {}
      }
    },
    {
      "id": 6,
      "module": "builtin:BasicFeeder",
      "version": 1,
      "parameters": {
        "delay": 172800
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 1500, "y": 0 },
        "label": "Wait 2 days",
        "parameters": [{ "name": "delay", "type": "number", "label": "Delay (seconds)" }]
      }
    },
    {
      "id": 7,
      "module": "builtin:BasicAggregator",
      "version": 1,
      "parameters": {
        "feeder": 5,
        "rowType": "uploads/files/aggregator-row.yaml"
      },
      "mapper": {
        "author": "{{5.author}}",
        "yesterday": "{{5.yesterday}}",
        "today": "{{5.today}}",
        "blockers": "{{5.blockers}}",
        "submitted_at": "{{5.submitted_at}}"
      },
      "metadata": {
        "designer": { "x": 1800, "y": 0 },
        "parameters": [{ "name": "feeder", "type": "uploads", "label": "Source module" }],
        "restore": {}
      }
    },
    {
      "id": 8,
      "module": "builtin:BasicFeeder",
      "version": 1,
      "parameters": {
        "delay": 345600
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 2100, "y": 0 },
        "label": "Wait 4 days",
        "parameters": [{ "name": "delay", "type": "number", "label": "Delay (seconds)" }]
      }
    },
    {
      "id": 9,
      "module": "email:ActionSendEmail",
      "version": 1,
      "parameters": {},
      "mapper": {
        "to": "[MANAGER_DISTRIBUTION_LIST]",
        "subject": "Weekly stand-up digest — {{formatDate(now; \"YYYY-MM-DD\")}}",
        "content": "<p>Hi team,</p><p>Here's the weekly rollup of stand-ups from Slack. Each entry below is what one person filed for Yesterday / Today / Blockers across the week.</p><table border=\"1\" cellpadding=\"6\" cellspacing=\"0\" style=\"border-collapse:collapse;font-family:system-ui,sans-serif;font-size:14px;\"><thead><tr style=\"background:#f3f4f6;\"><th align=\"left\">Author</th><th align=\"left\">Date</th><th align=\"left\">Yesterday</th><th align=\"left\">Today</th><th align=\"left\">Blockers</th></tr></thead><tbody>{{map(7; \"row\"; \"<tr><td>\" + row.author + \"</td><td>\" + formatDate(row.submitted_at; \"YYYY-MM-DD\") + \"</td><td>\" + row.yesterday + \"</td><td>\" + row.today + \"</td><td>\" + row.blockers + \"</td></tr>\")}}</tbody></table><p>Any blockers highlighted above should resolve before Monday's planning — happy to chat about any line item in the thread.</p><p>— The stand-up collector</p>",
        "contentType": "html"
      },
      "metadata": {
        "designer": { "x": 2400, "y": 0 },
        "parameters": [],
        "restore": {}
      }
    },
    {
      "id": 10,
      "module": "slack:ActionCreateMessage",
      "version": 1,
      "parameters": {},
      "mapper": {
        "channel": "#standup-recap",
        "text": "📋 *Friday stand-up recap*\n\n{{map(7; \"row\"; \"• *\" + row.author + \"* — yesterday: \" + row.yesterday + \" · today: \" + row.today + (row.blockers == \"\" ? \"\" : \" · 🚧 blockers: \" + row.blockers) + \"\\n\")}}",
        "as_user": true
      },
      "metadata": {
        "designer": { "x": 2700, "y": 0 },
        "parameters": [{ "name": "channel", "type": "channel", "label": "Channel" }],
        "restore": {}
      }
    }
  ],
  "metadata": {
    "instant": true,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": true,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    },
    "zone": "eu1.make.com"
  }
}
