ntfy

Send push notifications to any device using the ntfy pub/sub service.

CommunicationNo credentials2 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (2)
  4. send_notification
  5. custom_api_call
  6. Details

Connect

Auth type: No credentials (none). Nothing to connect: the actions run without credentials.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("ntfy", action, input) resolves with the provider's answer and rejects when ntfy isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. send_notification runs in the platform itself; the other actions run through the integration runner, which the server's operator turns on.

Workflow
// workflows/notify.ts: call ntfy when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellNtfy = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when ntfy isn't connected.
  const output = await step.run("ntfy", () =>
    step.ctx.integrations.invoke("ntfy", "send_notification", {
      "topic": "<topic>",
      "message": "<message>"
    }),
  );
  step.ctx.log("ntfy answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "ntfy",
    "piece_action": "send_notification",
    "input": {
      "topic": "<topic>",
      "message": "<message>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/ntfy/send_notification" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"topic":"<topic>","message":"<message>"}}'

Actions

send_notificationbuilt in

Send Notification. Send a notification to ntfy

InputTypeDescription
topicrequiredtextThe topic/channel to send the notification to, e.g. test1
titleoptionaltextThe title of the notification
messagerequiredlong textThe message to send
priorityoptionaltextThe priority of the notification (1-5). 1 is lowest priority.
tagsoptionalarrayThe tags for the notification.
iconoptionaltextThe absolute URL to your icon, e.g. https://example.com/communityIcon_xnt6chtnr2j21.png
actionsoptionallong textAdd Action buttons to notifications, see https://docs.ntfy.sh/publish/#action-buttons
clickoptionaltextYou can define which URL to open when a notification is clicked, see https://docs.ntfy.sh/publish/#click-action
delayoptionaltextLet ntfy send messages at a later date, e.g. 'tomorrow, 10am', see https://docs.ntfy.sh/publish/#scheduled-delivery

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

Details

Id
ntfy
Category
Communication
Tags
push, notifications, open-source, self-hosted
Package
@activepieces/piece-ntfy@0.2.4
Runs
send_notification in the platform; the rest through the integration runner