Slack Output Reference
Slack output
Section titled “Slack output”The slack output sends selected Adder events to one or more Slack channels
through Slack incoming webhooks. This reference covers webhook setup,
configuration, payloads, validation, delivery limits, and lifecycle behavior.
Prerequisites
Section titled “Prerequisites”- Create a Slack app with an incoming webhook for each destination channel. Follow the Slack incoming webhook setup.
- Store each webhook URL in a secret-managed configuration source. A webhook URL authenticates requests for its Slack destination and must remain private.
- Ensure that the host running Adder can make HTTPS requests to each webhook.
Configuration
Section titled “Configuration”Select the output with output: slack and configure its options under
plugins.output.slack:
output: slack
plugins: output: slack: webhook-urls: "https://hooks.slack.com/services/EXAMPLE/ONE,https://hooks.slack.com/services/EXAMPLE/TWO" event-types: "blocks,transactions,rollbacks,governance"The equivalent command line options are
--output-slack-webhook-urls and --output-slack-event-types.
Configuration fields
Section titled “Configuration fields”| Field | Required | Default | Description |
|---|---|---|---|
webhook-urls | Yes | None | Comma-separated Slack incoming webhook URLs. Adder requires at least one destination. |
event-types | No | blocks,transactions,rollbacks,governance | Comma-separated event names to send to Slack. Adder requires at least one supported name when this field is set. |
Adder trims surrounding whitespace from comma-separated values. An empty value does not provide a destination or event type.
Webhook validation and secret handling
Section titled “Webhook validation and secret handling”Adder validates every webhook-urls entry before it starts delivery:
- The URL must use
https. - The URL must not contain user information such as an embedded username or password.
- At least one valid URL must be present.
Keep webhook URLs out of source control, command history, shared configuration examples, and diagnostic output. Adder reports delivery failures by destination number and error condition rather than including the webhook URL in the error.
Event selection and payload
Section titled “Event selection and payload”The event-types field accepts these exact names:
blockstransactionsrollbacksgovernancedrep-registrationdrep-updatedrep-retirement
The default selection includes blocks, transactions, rollbacks, and
governance. DRep registration, update, and retirement events require explicit
selection.
Adder ignores events outside the selection. Filtering affects Slack delivery only; an ignored event continues through the rest of the Adder pipeline.
For each selected event and destination, Adder sends one HTTP POST request
with Content-Type: application/json. The request body always uses this JSON
shape:
{"text":"..."}The text value contains a human-readable event summary. Adder does not expose
a configurable Slack message format. The summary includes the following
information for the supported event types:
| Event type | Summary information |
|---|---|
blocks | Block number, slot, era, block hash, and transaction count. |
transactions | Transaction hash, block number, slot, and fee in lovelace. |
rollbacks | Rollback slot and block hash. |
governance | Transaction hash, slot, proposal count, vote count, and DRep certificate count. |
drep-registration, drep-update, drep-retirement | Certificate type, DRep ID, transaction hash, and slot. |
Adder sends the same formatted text to every configured destination. A failure for one destination does not prevent delivery attempts to the other configured destinations.
Delivery contract
Section titled “Delivery contract”Adder considers a request successful only when Slack returns HTTP status 200
with the response body ok. Each request uses a 15-second HTTP client timeout.
Adder does not treat another status or response body as successful.
After a successful request, Adder waits at least one second before sending the next request to that same destination. The spacing applies independently to each destination.
Rate limits and retries
Section titled “Rate limits and retries”When Slack returns HTTP 429, Adder reads Retry-After as a nonnegative whole
number of seconds:
- For a delay from
0through60seconds, Adder records a cooldown for each destination and retries the same message up to three times after the initial request. - The cooldown also applies to later events for that destination. If the retry budget ends, Adder reports the delivery failure but keeps the cooldown.
- A missing, invalid, negative, or nonnumeric
Retry-Aftervalue fails the affected delivery and applies a one-minute cooldown. - A
Retry-Afterdelay greater than one minute fails the affected delivery and leaves the destination cooling down. Adder does not wait beyond the one-minute retry window for that delivery.
Adder retries transport failures and HTTP 5xx responses up to three times
after the initial request. The retry waits use bounded exponential delays of
one, two, and four seconds. Adder does not retry other HTTP 4xx responses.
Adder skips a destination while more than one minute remains in its cooldown and reports that delivery as cooling down. When one minute or less remains, Adder waits for the rest of the cooldown before attempting the request. Each destination maintains its own cooldown, so a rate limit on one webhook does not pause another webhook.
Errors, shutdown, and restart behavior
Section titled “Errors, shutdown, and restart behavior”Adder logs delivery errors and sends them through the output error channel. Error messages identify the affected destination and failure without exposing webhook URLs or other webhook secret values.
The output runs a background delivery worker. During shutdown, Adder stops the worker and waits for it to exit. The output has no durable queue: Adder does not recover events that remain pending when it stops and restarts.
Live check
Section titled “Live check”Use a dedicated Slack test channel and webhook. Do not use a production channel or paste a production webhook URL into a test file or diagnostic output.
- Create a test incoming webhook for the dedicated Slack channel.
- Configure
output: slackwith the test URL and select one event type, such asblocks. - Start Adder and trigger one matching Cardano event.
- Confirm that the test channel receives one human-readable Slack message and that Adder reports no output error.
- If multiple test destinations are configured, confirm that each receives the same event summary. Trigger an unselected event to confirm that Adder does not send it to Slack.
After the check, revoke the test webhook when it is no longer needed.
Related references
Section titled “Related references”Docs authored by Doc Holiday