Post one digest from a short-lived script
Suppose your team wants an hourly summary of pending support tickets. Write a Node.js or Python script that reads the latest records, formats the summary, calls Slack’s chat.postMessage and exits. Install an app with chat:write, invite it to a test channel, and save the bot token and channel ID in Variables. A script that only calls the Web API needs no Socket Mode session.
Build and test over a small sample. Log the reporting period, item count and whether Slack accepted the post. Keep the message contents, credentials and API response body out of the job log.
Set an interval and check the first hosted run
For built-in recurrence, choose Scheduled Python script where available. Set JOB_INTERVAL_SECONDS to 3600 for an hourly UTC target and choose a JOB_TIMEOUT_SECONDS value that fits inside the interval. Save, start the deployment and select Run now in Runs. Confirm the exit result and the message in the test channel.
For Node.js, choose One-off Node.js script and test it with Run now. To run it on a schedule, have your external scheduler call POST /api/v1/deployments/:id/runs while the job runner is active. Use a token with manage access to that deployment and confirm its exact name in the request. Run a script from the REST API.
For one future message with content already prepared, Slack’s chat.scheduleMessage can schedule the send and returns a scheduled_message_id. A hosted recurring job fetches current data when each report is due. Slack scheduled message method.
Keep the same reporting period on retry
Key each completed digest by channel and reporting period. Store its message timestamp when posting succeeds. If you rerun that period, decide whether to skip it or update the existing message. A failure between the post and recording its timestamp needs reconciliation before a retry sends another copy.
The host reports skipped occurrences when the runner was offline or a previous run was still in progress. Read how to handle missed runs before implementing a backfill. Use a continuous Socket Mode worker separately if the same app must also receive commands.