> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jinba.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Receive a Slack Event in Jinba Flow

> Pass a Slack App event into a published Jinba Flow with INPUT_SLACK_EVENT and inspect the returned event payload.

Use `INPUT_SLACK_EVENT` when a Slack App sends an event to a flow. Set the Slack Event Subscriptions Request URL to `https://<your-flow-host>/api/v2/external/flows/<flow-id>/slack-run`; get the host and flow ID from the flow's Triggers panel. This is the Slack event endpoint, not the generic published API URL. The route answers Slack's URL verification challenge and passes the inner event object to `INPUT_SLACK_EVENT`. See [Slack credentials](/en/pages/credentials/slack) for app setup.

The route verifies every event with the Slack App's **Signing Secret**. Set the step's `signing_secret` config to a secret of type `SLACK_SIGNING_SECRET` (copied from the app's Basic Information → App Credentials) and publish the flow; the published version is what runs. A flow whose published `INPUT_SLACK_EVENT` step has no usable signing secret, or a request whose `X-Slack-Signature` / `X-Slack-Request-Timestamp` headers are missing, invalid, or older than 5 minutes, is refused with `401` before anything runs. A flow with no published `INPUT_SLACK_EVENT` step answers `404`. Only the `url_verification` handshake and Slack retries (requests with `X-Slack-Retry-Num`, which are acknowledged without processing) are answered without a signature.

## Accept the event as a flow input

`value` is an optional JSON string supplied at execution time. `use_as_input` defaults to `true`, making the event an API or MCP input. `optional` defaults to `false`; set it to `true` only if the flow can proceed without an event. `description` is optional.

```yaml theme={null}
- id: slack_event
  tool: INPUT_SLACK_EVENT
  config:
    - name: signing_secret
      value: "{{secrets.SLACK_SIGNING_SECRET}}"
  input:
    - name: value
      value: '{"type":"app_mention","text":"Help","channel":"C123"}'
```

For a local check, the example returns an object with `result.type` equal to `app_mention`. Slack sends an event envelope to the endpoint, and Jinba Flow passes the inner `event` object to the tool. The exact fields depend on the Slack event type, so inspect the actual `result` before referencing fields downstream.

## Reply in the event channel

The original guide showed a Slack mention triggering a reply. After inspecting the event shape, use its `channel` field with `SLACK_POST_MESSAGE`:

```yaml theme={null}
- id: reply_to_mention
  tool: SLACK_POST_MESSAGE
  needs: [slack_event]
  config:
    - name: token
      value: "{{secrets.SLACK_BOT_TOKEN}}"
  input:
    - name: channel
      value: "{{steps.slack_event.result.channel}}"
    - name: text
      value: "Thanks for mentioning me."
```

This example expects an event with a `channel` field and a Slack token that can post there.

## Fix a missing or invalid event

If `optional` is `false` and no `value` is supplied, the step fails with “Slack event value is required.” Invalid JSON returns an `InputSlackEventTool` error and a `null` result. Check the `/slack-run` event subscription URL and the JSON payload before changing downstream expressions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.