WFRLoop Docs
Integrations

Slack DM Delivery

Server-side bot DMs employees with the reminder and an acknowledgement link

Overview

Slack is the delivery channel for every reminder Loop sends. When a manager creates a correction or recognition, the server saves the record and then dispatches a direct message to the employee via the Slack Web API.

Slack app configuration

The Slack app has already been created. The bot token is shared separately and must be treated as a server-side secret.

Scopes already granted

  • chat:write
  • users:read
  • users:read.email

Token handling

  • Slack API calls must be server-side only.
  • The bot token is never exposed to the browser — no NEXT_PUBLIC_* variable, no client fetches that include the token.
  • Store the token as an environment variable on the server.
SLACK_BOT_TOKEN=xoxb-your-token-here

DM payload

Every DM Loop sends includes:

  • Typecorrection or recognition
  • Manager note — the message authored (or AI-generated) by the manager
  • Process name + source — e.g. "Site safety checklist (Trainual)"
  • SOP link — the direct URL to the process document
  • Acknowledgement link — points to /reminder/[id] on the deployed app

Behaviour by type

  • Correction DMs lead the employee to the acknowledge page where they can optionally leave feedback and click "I've read and understand this".
  • Recognition DMs do not require any action — they are positive reinforcement only. The employee can still open the link to view the full reminder, but no acknowledgement is collected.

Lookups

Each employee record stores a slack_user_id. The server uses this ID directly with chat.postMessage to open a DM channel — no email-based lookup is required at send time, although the users:read.email scope is available if a fallback is ever needed.

On this page