Channel: send messages

No code: Slack URL

Tools that can only send to Slack send to Packlets with this URL. Without a line of code.

Open as Markdown

Many tools can't connect to a push app of their own, but they have a "Slack notification" or "Slack webhook" setting. There, instead of the Slack address, you enter the Slack address of your packlet. Packlets accepts the message as if Packlets were Slack and sends it to your phone as a push.

You don't write any code for this.

Connect in the app

When connecting, tap Integrations and choose Slack. Name and animal are already filled in. Instead of code, Packlets then shows the ready-made address to copy; you enter it in your tool's Slack setting. Packlets doesn't read along in your Slack. It only accepts what your tool sends.

Your address

Text
https://api.packlets.app/v1/slack/<PACKLETS_KEY>

Instead of <PACKLETS_KEY>, enter the key of your packlet, the one that starts with pk_. The tool needs nothing else.

The key is in the address here because these tools can't send a header of their own. So treat the whole address like a password. If you create a new key in the app, the old address stops working immediately.

Where this works

Anywhere you can enter a Slack webhook address ("Incoming Webhook"). For example:

AreaTools
MonitoringUptime Kuma, Grafana, Prometheus Alertmanager, Sentry, Healthchecks.io
Code and deploysGitHub Actions, GitLab, Jenkins, Railway, Netlify
Automationn8n, Zapier, Make, Home Assistant
WebsitesWordPress form plugins with a Slack option, shop systems
Your own scriptsAnything that already sends to Slack: swap the address, done

Quick test

Shell
curl https://api.packlets.app/v1/slack/<PACKLETS_KEY> \
  -H "Content-Type: application/json" \
  -d '{"text":"*Backup* failed on <https://status.example.com|server-1>"}'

If ok comes back, the message is there. In the packlet's activity log, the call shows up with "Slack:" in front.

What Packlets picks up

Packlets understands the usual Slack formats and turns them into a normal message:

SlackIn Packlets
textMessage text. If there are blocks, text is only the short version there and isn't shown.
*bold*bold
<https://…|label>Label in the text. The first link becomes the link of the message.
Mentions like <!channel> or <@U123>dropped
header blockTitle
section block with text and fieldsParagraph, fields as a list
context blockSmall paragraph, parts separated with ·
image blockImage of the message
actions block with buttons that have a urlUp to 3 buttons that open the link
attachments with title, title_link, pretext, text, fields, image_urlTitle, link, text, list and image
attachments with color: "danger"Priority high
Form with payload=<json>like JSON

Everything else, such as menus, date pickers or formatting Packlets doesn't know, is left out instead of rejecting the message. Texts that are too long are shortened, and links without https are dropped.

An example with blocks:

JSON
{
  "text": "New order #1042",
  "blocks": [
    { "type": "header", "text": { "type": "plain_text", "text": "New order #1042" } },
    { "type": "section", "text": { "type": "mrkdwn", "text": "*Anna Weber* placed an order" },
      "fields": [{ "type": "mrkdwn", "text": "*Total:* $49" }] },
    { "type": "actions", "elements": [
      { "type": "button", "text": { "type": "plain_text", "text": "Open order" },
        "url": "https://shop.example.com/orders/1042" }
    ] }
  ]
}

In Packlets, this becomes a message with the title "New order #1042", the text "Anna Weber placed an order" with the item "Total: $49", and a button "Open order".

Responses

Packlets answers like Slack with short text, because some tools check exactly that:

StatusResponseMeaning
200okSaved, the push is on its way.
400invalid_payloadNo text found, neither in text nor in blocks or attachments.
401JSON with invalid_keyKey wrong or packlet removed.
429JSON with rate_limitedToo many calls. The same limit applies as for POST /v1/push.

Limits

  • Buttons only open links. Buttons that reply to your tool are available with POST /v1/push and a webhook.
  • Elements like toggles or charts aren't available through this address.
  • This address only accepts messages. You set the page of an app with PUT /v1/ui.