Slack
Setting |
|
Client |
|
Code |
|
Every notification to a recipient whose task assignee_type is user also queues
notify_on_slack. On the Worker it:
-
renders
TEMPLATES["slack"][action](HTML in the change list is flattened to text); -
finds the Slack user whose profile email equals the recipient’s email, using
users.listcached per execution environment (SlackCache, retried up to 5 times on aKeyError); -
posts
chat.postMessageto@<username>as "Task notifications" with:exclamation:.
Unknown users and SlackApiError are logged as errors and otherwise ignored.
Scopes needed: chat:write, chat:write.customize (custom username and icon), users:read,
users:read.email.
|
The Zappa deployment used a Slack user token ( |