ntfy
Send push notifications to any device using the ntfy pub/sub service.
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.
// 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);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "ntfy",
"piece_action": "send_notification",
"input": {
"topic": "<topic>",
"message": "<message>"
},
"env": "dev"
}
}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
| Input | Type | Description |
|---|---|---|
topicrequired | text | The topic/channel to send the notification to, e.g. test1 |
titleoptional | text | The title of the notification |
messagerequired | long text | The message to send |
priorityoptional | text | The priority of the notification (1-5). 1 is lowest priority. |
tagsoptional | array | The tags for the notification. |
iconoptional | text | The absolute URL to your icon, e.g. https://example.com/communityIcon_xnt6chtnr2j21.png |
actionsoptional | long text | Add Action buttons to notifications, see https://docs.ntfy.sh/publish/#action-buttons |
clickoptional | text | You can define which URL to open when a notification is clicked, see https://docs.ntfy.sh/publish/#click-action |
delayoptional | text | Let 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
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow 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