Channel: send messages

Templates

Ready-made messages to copy: server alert, deploy, order, daily report and invoice.

Open as Markdown

Ready-made messages for a channel. Each template looks here the way it does in Packlets, and you can try out toggles, buttons, and inputs right away.

Here is how to use a template: copy the JSON, send it with POST /v1/push, and adapt texts and IDs to your tool. How that works is explained at the very bottom under Sending. What the individual fields mean is covered under Buttons and Elements.

Server not responding

Your uptime check notices that a service is down. The alert comes with sound, even during quiet hours. One button restarts the service, the second opens the status page.

shop-api not responding

No health check since 9:38 AM. Last status: 502.

Recent checks

TimeStatusms
9:36200182
9:37200240
9:3850230,012
9:3950230,008
JSON
{
  "title": "shop-api not responding",
  "text": "No health check since **9:38 AM**. Last status: 502.",
  "priority": "high",
  "elements": [
    {
      "type": "table", "id": "checks", "label": "Recent checks",
      "columns": ["Time", "Status", "ms"],
      "rows": [["9:36", "200", 182], ["9:37", "200", 240], ["9:38", "502", 30012], ["9:39", "502", 30008]]
    }
  ],
  "buttons": [
    { "id": "restart", "label": "Restart" },
    { "id": "status", "label": "Status", "url": "https://status.example.com" }
  ]
}

When you tap Restart, your webhook gets the button event with button_id: "restart".

Deploy failed

Your CI reports a red build. The table shows which tests fail. You can tap the Run again button several times, unlike a button in the buttons field.

Deploy failed

shop-api on `main`, commit a3f9c21 by Jonas.

Failed tests

TestDuration
checkout › coupon1.2 s
checkout › shipping0.8 s
JSON
{
  "title": "Deploy failed",
  "text": "**shop-api** on `main`, commit a3f9c21 by Jonas.",
  "priority": "high",
  "elements": [
    {
      "type": "table", "id": "tests", "label": "Failed tests",
      "columns": ["Test", "Duration"],
      "rows": [["checkout › coupon", "1.2 s"], ["checkout › shipping", "0.8 s"]]
    },
    { "type": "button", "id": "retry", "label": "Run again", "width": 3 },
    { "type": "button", "id": "rollback", "label": "Roll back", "style": "secondary", "width": 3 }
  ],
  "buttons": [
    { "id": "log", "label": "Open log", "url": "https://ci.example.com/runs/4711" }
  ]
}

New order

Your shop reports every order. The button marks it as shipped, the link opens it in the back office.

New order #1049

Tim R. from Leipzig, €129.00, paid with PayPal.

ItemQty€
Classic coffee grinder199
Espresso beans 1 kg215
JSON
{
  "title": "New order #1049",
  "text": "Tim R. from Leipzig, **€129.00**, paid with PayPal.",
  "elements": [
    {
      "type": "table", "id": "artikel",
      "columns": ["Item", "Qty", "€"],
      "rows": [["Classic coffee grinder", 1, 99], ["Espresso beans 1 kg", 2, 15]]
    }
  ],
  "buttons": [
    { "id": "shipped", "label": "Shipped" },
    { "id": "open", "label": "Open", "url": "https://shop.example.com/admin/orders/1049" }
  ]
}

Daily report

A cron job sends yesterday's numbers every morning. With priority: "silent", it arrives without sound.

Daily report

Yesterday

  • 23 orders, €1,204 revenue
  • 3 deploys, all successful
  • Backup finished at 3:00

Revenue this week

1,204 €
Thu
Fri
Sat
Sun
Mon
Tue
JSON
{
  "title": "Daily report",
  "text": "## Yesterday\n- **23 orders**, €1,204 revenue\n- 3 deploys, all successful\n- Backup finished at 3:00",
  "priority": "silent",
  "elements": [
    {
      "type": "chart", "id": "umsatz", "label": "Revenue this week", "unit": "€", "height": 160,
      "points": [
        { "label": "Thu", "value": 1310 }, { "label": "Fri", "value": 1580 }, { "label": "Sat", "value": 720 },
        { "label": "Sun", "value": 640 }, { "label": "Mon", "value": 860 }, { "label": "Tue", "value": 1204 }
      ]
    }
  ]
}

Approve an invoice

A new invoice is waiting for your approval. Two buttons decide, the input sends a follow-up question to your tool. If you have to review many invoices in a row, a custom app is more convenient.

Invoice from Hosting GmbH

€189.00, due Nov 20. Service: server November.

Question for accounting

Sent
JSON
{
  "title": "Invoice from Hosting GmbH",
  "text": "**€189.00**, due Nov 20. Service: server November.",
  "elements": [
    {
      "type": "input", "id": "frage", "label": "Question for accounting",
      "placeholder": "e.g. Why more expensive than in October?", "button": "Ask"
    }
  ],
  "buttons": [
    { "id": "approve", "label": "Approve" },
    { "id": "reject", "label": "Reject" },
    { "id": "pdf", "label": "PDF", "url": "https://example.com/invoices/2026-118.pdf" }
  ]
}

Sending

Save the JSON of a template as template.json and send it as a message:

curl https://api.packlets.app/v1/push \
  -H "Authorization: Bearer $PACKLETS_KEY" \
  -H "Content-Type: application/json" \
  -d @template.json

After that, every tap on a button arrives as a button webhook event, and every use of an element as a ui event, both with the message's message_id. How your tool reacts is covered under Set up a webhook.