notifly
Use casesChat notificationsUpdated

Send Slack notifications from your app with one API call.

A Slack notification from your product is a message to a person or a channel: a deploy finished, a payment failed, a teammate was mentioned. Notifly sends it from a workflow, so the same trigger can also reach email, SMS, push and the in-app inbox.

Notifly sends as the Notifly Slack app, which you add to your workspace with Add to Slack on the Slack integration page, or as a Slack app you own. The Slack integration guide covers your own app's credentials, redirect URL and scopes; this page covers what comes after: choosing a delivery route, the chat step, and the code that sends.

Pairing Slack with one provider in the same workflow? The Mailgun Slack integration and Firebase Slack integration pages put an email or push step beside the Slack step, and compare each vendor's own Slack alerts first.

Two ways to reach Slack

Both routes send through a Slack app and an active Slack integration in your Notifly environment. They differ in where the message goes and what you store.

Incoming webhook (your own Slack app)The channel the webhook URL was created forThe webhook URL, saved on the subscriberAlerts to a fixed channel, the shortest setup
A Slack app's bot (yours or the Notifly app)A Slack user or a channel the bot can post toA workspace connection, created when a user approves the appDirect messages to individual users

How a chat step reaches Slack

  1. In the workflow editor, add a Chat step and write the message. It can use the trigger's payload, such as {{payload.service}}.
  2. Trigger the workflow for a subscriber. Before the step runs, Notifly checks that subscriber's preferences for the chat channel, and an opted-out step is skipped with the reason recorded.
  3. Notifly finds where that subscriber's Slack messages go, through the environment's active Slack integration: a Slack user or channel from a workspace connection, or the webhook URL saved on the subscriber.
  4. It sends with chat.postMessage and the bot token, or posts to the webhook, and records Slack's answer in the activity feed. A subscriber with no Slack destination gets no message, and the activity feed says so.

Put a digest step ahead of the chat step when a burst of events should arrive as one Slack message.

Send to an incoming webhook

  1. In your Slack app, turn on Incoming Webhooks, add a webhook to the channel and copy its URL.
  2. In the dashboard, open Integration Store, choose Connect Provider, open the Chat tab and connect Slack with your app's credentials, as the Slack integration guide shows.
  3. Create each subscriber who should receive messages there and save the webhook URL on them. Saving credentials for a subscriber id Notifly has not seen is rejected.
  4. Trigger the workflow that has the Chat step.
Node.js · @notiflyio/api
// npm install @notiflyio/api@0.1.26
import { Notifly } from "@notiflyio/api";

const secretKey = process.env.NOTIFLY_SECRET_KEY;
if (!secretKey) throw new Error("NOTIFLY_SECRET_KEY is not set");
const notifly = new Notifly({ security: { secretKey } });

// Once per subscriber: create them (saving credentials for an unknown subscriber id is rejected),
// then save the incoming webhook their Slack messages go to.
await notifly.subscribers.create({ subscriberId: "user_123" });
await notifly.subscribers.credentials.update(
  {
    providerId: "slack",
    credentials: { webhookUrl: "https://hooks.slack.com/services/T0000000/B0000000/XXXXXXXXXXXXXXXXXXXXXXXX" },
  },
  "user_123",
);

// Any time after that: trigger the workflow that has a Chat step.
await notifly.trigger({
  workflowId: "deploy-finished",
  to: "user_123",
  payload: { service: "billing-api", status: "succeeded" },
});
The same two calls over HTTP
# Once per subscriber: create them, then save their incoming webhook URL.
curl -X POST https://api.notifly.io/v1/subscribers \
  -H "Authorization: ApiKey $NOTIFLY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subscriberId":"user_123"}'

curl -X PUT https://api.notifly.io/v1/subscribers/user_123/credentials \
  -H "Authorization: ApiKey $NOTIFLY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"providerId":"slack","credentials":{"webhookUrl":"https://hooks.slack.com/services/T0000000/B0000000/XXXXXXXXXXXXXXXXXXXXXXXX"}}'

# Any time after that: trigger the workflow.
curl -X POST https://api.notifly.io/v1/events/trigger \
  -H "Authorization: ApiKey $NOTIFLY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"deploy-finished","to":{"subscriberId":"user_123"},"payload":{"service":"billing-api","status":"succeeded"}}'

Notifly checks that the webhook URL is a safe public address before it posts, and a blocked URL fails the send. See the REST API docs for authentication and environments.

Send as your Slack app's bot

For direct messages, let each user approve your Slack app once. Your backend creates a connect link, the user approves it in Slack, and Notifly stores the workspace connection.

Node.js · @notiflyio/api
// npm install @notiflyio/api@0.1.26
import { Notifly } from "@notiflyio/api";

const secretKey = process.env.NOTIFLY_SECRET_KEY;
if (!secretKey) throw new Error("NOTIFLY_SECRET_KEY is not set");
const notifly = new Notifly({ security: { secretKey } });

// Create a connect link for the signed-in user (valid for 5 minutes).
const { result } = await notifly.integrations.generateConnectOAuthUrl({
  integrationIdentifier: "slack-workspace", // the Identifier of your Slack integration
  subscriberId: "user_123",
  autoLinkUser: true, // also link the Slack user who approves the install
});
// Redirect the user to result.url and let them approve your app in Slack.

With autoLinkUser the Slack user who approves is linked to that subscriber, so a later trigger addressed to user_123 reaches them in Slack. The install asks for the bot scopes chat:write, chat:write.public, channels:read, groups:read, users:read and users:read.email unless you pass your own scope list.

One workflow, many Slack destinations

Destinations belong to subscribers, not to the workflow. Save a different webhook URL for each subscriber, or connect each user's Slack, and one workflow reaches every one of them. A trigger addressed to a list of subscribers or to a topic fans out the same way, as Workflows describes.

Route alerts from your other tools to Slack

Searches like “Stripe to Slack”, “GitHub to Slack” or “monitoring alerts to Slack” describe one job: an event happens in another tool and a channel should hear about it. A Notifly workflow starts only from a trigger call to the API, so the path has one small piece of your own code. The tool sends its webhook to an endpoint you run, and that endpoint triggers a workflow whose Chat step posts to Slack.

StripeThe invoice.payment_failed webhook eventThe invoice id, customer_email, amount_due and currency
GitHub ActionsThe workflow_run webhook event with action set to completedworkflow_run.name, workflow_run.conclusion, workflow_run.html_url and repository.full_name
Monitoring, uptime and error-tracking toolsWhatever alert webhook the tool can POST to a URL you chooseThe alert title, a severity and a link back to the alert
  1. Connect Slack: Add to Slack for the Notifly Slack app (see the Slack integration page), or connect your own Slack app, as above.
  2. Create a subscriber that stands for the channel, such as ops-alerts, and save its destination: a webhook URL as in the incoming webhook route (your own Slack app only), or a Slack channel, added with the channel's ID on its Credentials tab.
  3. Build a workflow with a Chat step that writes the message from the payload, such as Payment failed for {{payload.customer}}.
  4. Add an endpoint to your backend, point the tool's webhook at it, verify the sender's signature, and trigger the workflow with the fields you chose.
Node.js · a Stripe webhook handler
// npm install @notiflyio/api@0.1.26
import { Notifly } from "@notiflyio/api";

const secretKey = process.env.NOTIFLY_SECRET_KEY;
if (!secretKey) throw new Error("NOTIFLY_SECRET_KEY is not set");
const notifly = new Notifly({ security: { secretKey } });

// Call this from your own webhook endpoint, after it has verified the sender's signature.
// "ops-alerts" is a subscriber you created for the Slack channel, as in the webhook route above.
export async function forwardFailedPayment(event: {
  type: string;
  data: { object: { id: string; customer_email: string | null; amount_due: number; currency: string } };
}): Promise<void> {
  if (event.type !== "invoice.payment_failed") return;
  const invoice = event.data.object;
  await notifly.trigger({
    workflowId: "payment-failed",
    to: "ops-alerts",
    payload: {
      invoiceId: invoice.id,
      customer: invoice.customer_email ?? "unknown customer",
      amountDueMinorUnits: invoice.amount_due, // Stripe's smallest unit: cents for USD (divide by 100 for dollars), whole yen for JPY
      currency: invoice.currency.toUpperCase(),
    },
  });
}

Many of these tools also ship their own Slack integration. If all you want is that tool's own alerts in a channel, use it: it is the shorter route, as the Mailgun and Firebase pages show for their alerts. Use a Notifly workflow when the same event should also reach email, push or the in-app inbox, when the Chat step should run only for some events, or when a burst should arrive as one message.

  • Only the urgent ones. Open Step conditions on the Chat step and compare a payload field, such as payload.severity equals urgent.
  • One message for a burst. Put a digest step ahead of the Chat step, grouped by a payload key such as the repository.
  • More than Slack. Add an email or in-app step to the same workflow. Notification infrastructure covers what sits behind that one trigger.

Message options and failures

Anything under overrides.providers.slack is merged into the message Notifly sends, converted to Slack's snake_case: unfurlLinks: false arrives as unfurl_links.

Node.js · per-trigger override
await notifly.trigger({
  workflowId: "deploy-finished",
  to: "user_123",
  payload: { service: "billing-api", status: "succeeded" },
  overrides: { providers: { slack: { unfurlLinks: false } } },
});

When Slack refuses a bot message, the step fails with the error Slack returned, such as Slack API Error: channel_not_found. A webhook that Slack answers with an error status, such as a revoked URL, fails with Chat webhook URL blocked: Request failed with status 404. Either way the activity feed records it.

Frequently asked questions

Do I need my own Slack app to send Slack notifications?

No. You can add the Notifly Slack app to your workspace with Add to Slack on the Slack integration page and connect it to a Notifly environment; the Chat step then posts as the Notifly bot, as a direct message to the person who connected it. To post in a public channel, add a Slack channel on the subscriber's Credentials tab in the dashboard (it asks for the channel's ID), or register it through the channel endpoints API; the app can post in public channels without being invited. A subscriber with both a channel and a direct-message link gets the message in both places. Messages sent through the Notifly Slack app count toward a limit of 300 per month for each Notifly environment, and after that sends through it fail until the next month; messages sent through your own Slack app do not. With a Slack app you own, the dashboard's Slack integration asks for its App ID, Client ID, Client Secret and Signing Secret, and the incoming webhook route and the bot route both run through that integration.

Should I use an incoming webhook or the bot?

Use a webhook for alerts to one fixed channel: you save a URL on the subscriber and nothing else. Use the bot route when messages should go to individual users, because each user approves your Slack app once and Notifly keeps the workspace connection.

Can one workflow message many people or channels?

Yes. Each subscriber carries their own Slack destination, either a saved webhook URL or a linked Slack user, so a trigger addressed to several subscribers or to a topic sends each of them a message at their own destination.

How long does a connect link stay valid?

Five minutes. The link's state is signed and time-stamped, so Notifly refuses an expired or altered link when Slack sends the user back. Create the link when the user clicks Connect, not ahead of time.

What happens when Slack rejects a message?

The step fails and the activity feed records why. A bot send fails with the error Slack returned, for example Slack API Error: channel_not_found. A webhook that Slack answers with an error status, such as a revoked URL, fails with Chat webhook URL blocked: Request failed with status 404, and a webhook reply that is not ok fails with Slack Webhook Error.

Can a webhook URL point at any address?

No. Notifly checks that the URL is a safe public address before posting, and a blocked URL fails the send with a Chat webhook URL blocked error instead of reaching an internal host. That prefix also starts the error for a webhook Slack answers with an error status.

How do I send Stripe or GitHub alerts to Slack through Notifly?

Notifly workflows start from a trigger call to its API, so the tool's webhook goes to an endpoint in your own backend, which verifies the sender and triggers a workflow with the fields you want. The workflow's Chat step then posts to the Slack channel, for example through a subscriber named ops-alerts with a Slack channel, or with a saved webhook URL if you use your own Slack app (the Notifly Slack app has no webhook option). Notifly does not receive a tool's webhooks by itself. If you only want that tool's own alerts in a channel, its native Slack integration is shorter.

Can I change the Slack message options per trigger?

Yes. Anything under overrides.providers.slack in the trigger is merged into the message and converted to Slack's snake_case, so unfurlLinks: false arrives as unfurl_links.

One workflow for in-app, email, SMS, push and chat.

The free plan includes 10,000 events per month, no card needed.

Get started freeSee pricing