Skip to main content
Novu turns the common provider events into agent events: a Slack message becomes onMessage, a reaction becomes onReaction, a button click becomes onAction. Providers send many more events than that. Platform events let your agent receive any of the others and answer them with the provider’s own API, without running a second webhook endpoint or storing provider tokens. Use platform events when you need a provider feature Novu has no building block for yet:
  • Link unfurling: show a rich preview when someone posts a link to your product.
  • Interactive unfurls and modals: handle button clicks inside your own unfurl cards or modal views.
  • Slash commands: answer /your-command from your agent.
  • Workspace and channel events: welcome new members, react to new or renamed channels.
Platform events are available on Slack today, for agents connected with your own app. They are not available for managed agents or for the shared Novu demo app. If they aren’t enabled for your organization yet, contact Novu support.

How it works

  1. The provider sends the event to the same endpoint it already uses for your agent.
  2. Novu verifies the request signature and checks the event type against the allowlist on the agent’s integration. Events that aren’t on the list keep the existing behavior.
  3. Novu acknowledges the provider at once, looks up the subscriber linked to the user who caused the event, and delivers the event to onPlatformEvent in your bridge.
  4. Your handler calls the provider’s API through ctx.platformApi. Novu adds the integration’s credentials, so your bridge never holds a provider token.

Choose which events to forward

Forwarding is opt-in, per agent integration. Nothing is forwarded until you list the event types.
  1. Open the agent in the Novu Dashboard and select its Slack integration.
  2. In Platform events, add the event types to forward, for example link_shared.
  3. Click Save.
Rules for the list:
  • Use the provider’s own event type names (link_shared, team_join, view_submission).
  • Events Novu already handles, such as message, app_mention and reaction_added, can’t be forwarded, so one event never runs two handlers.
  • * forwards every event Novu doesn’t handle. It must be the only entry.
  • Up to 50 event types per integration.
You also have to subscribe your provider app to these events and grant the scopes they need. See Slack platform events for the Slack setup.

Handle events

Add onPlatformEvent to your agent. It receives three arguments: the platform the event came from, the event, and a context. Declare ctx only when you call the provider’s API: (platform, event) => … works too.
Checking platform first tells TypeScript which provider’s events you’re handling. event.is(type) then narrows event.payload to the typed shape for that event. Novu ships types for Slack link_shared, block_actions and slash_command; any other event type arrives as a plain record.

The event object

The context object

Platform events aren’t part of a conversation, so the context has no reply or history. It has:

Call the provider’s API

ctx.platformApi calls the provider’s own API through Novu. You choose the method and arguments; Novu picks the host, adds the credentials and returns the provider’s answer unchanged.
call() doesn’t throw when the provider answers with an error such as { ok: false }: check the response the way you would with the provider’s SDK. It throws a PlatformApiError only when Novu refuses the call itself, for example for a blocked method. Use request() when you need the HTTP status or headers, such as retry-after on a rate limit:
Inside onPlatformEvent, calls run in the workspace the event came from. Outside a handler, for example from a background job, create a client yourself and pass workspaceId when the app is installed in more than one workspace:
The same proxy is available over HTTP as POST /v1/agents/{agentIdentifier}/integrations/{integrationIdentifier}/platform-api with your secret key.

Guardrails

  • Calls are scoped to the environment of the secret key and to integrations connected to the agent.
  • Methods that change the installation itself are blocked, such as Slack oauth.*, admin.*, apps.uninstall and auth.revoke.
  • Requests are limited to 1 MB, responses to 5 MB, and each call to 10 seconds.
  • Novu logs the method, path, status and latency of every call, never the bodies.

Delivery

  • Novu acknowledges the provider before it calls your bridge, so slow handlers never make the provider retry.
  • Each event is delivered once. Provider retries of the same event are dropped for 10 minutes.
  • Failed deliveries aren’t retried, and events can arrive in any order.
  • An error thrown in onPlatformEvent is logged by the bridge and doesn’t affect other handlers.
  • An agent without onPlatformEvent ignores forwarded events.
Some interactions need an answer in the same HTTP response, such as a Slack view_submission that returns validation errors. Novu has already answered the provider by the time your handler runs, so use the provider’s API (for example views.update) or the interaction’s response_url instead.

Slack platform events

Setup, link unfurling and other Slack examples.

Handlers and context

The handlers Novu runs for conversation events.