Slack
With a Slack account, Jimothy can:
- start runs from Slack:
/jimothy fix the login page,@Jimothy fix the login page, or a direct message to the app; - keep each run in one thread, with its progress, failures and result;
- post approvals with Approve and Reject buttons, which work just like approving in the app;
- post messages and ask a question and wait for the reply, as pipeline steps.
This is separate from the one-way Slack webhook notification channel, which only posts messages. See Notifications.
How it connects
Section titled “How it connects”You create your own small Slack app for Jimothy from a ready-made manifest. Jimothy keeps a connection open to Slack from your computer (Socket Mode), so Slack never has to reach your machine. No public URL, tunnel or server is needed.
Slack only reaches Jimothy while it’s running. While it’s closed, slash commands answer with an error and button clicks do nothing.
Set up the Slack app
Section titled “Set up the Slack app”- In Jimothy, open Settings → Accounts & integrations and click Sign in under Slack. You can also use the ⌘K palette (Sign in to Slack).
- Click Create the Slack app. Slack opens with Jimothy’s settings filled in: the
/jimothycommand, the bot’s permissions, Socket Mode and interactivity. Pick your workspace, check the summary, and click Create. - In the new app, open Install App, click Install to Workspace and allow it. Copy the Bot User OAuth Token (
xoxb-…) into Bot token in Jimothy. - Open Basic Information → App-Level Tokens, click Generate Token and Scopes, name it (e.g.
jimothy), add theconnections:writescope and click Generate. Copy the token (xapp-…) into App-level token in Jimothy. - Click Sign in. Jimothy checks both tokens, names the account after your workspace (
Slack · Acme), and connects. The account shows listening once the connection is up.
Then invite the app to the channels it should work in: /invite @Jimothy. It can post in any public channel without an invite, but Slack only sends it messages (mentions and thread replies) from channels it’s a member of. Jimothy joins public channels by itself when it asks a question or starts a run there. Private channels always need the invite.
The bot asks for these permissions:
| Scope | Why |
|---|---|
chat:write, chat:write.public |
Post run threads, approvals and messages, including in public channels it hasn’t joined. |
commands |
The /jimothy command. |
app_mentions:read |
@Jimothy mentions. |
channels:history, groups:history, im:history |
Thread replies that answer a question, and direct messages. |
channels:read, groups:read |
The channel lists in Jimothy’s settings, and checking it’s in a channel before asking there. |
channels:join |
Joining a public channel before asking a question or starting a run’s thread there, so replies reach it. |
users:read |
Names of the people who start runs, approve and reply. |
Start runs from Slack
Section titled “Start runs from Slack”Add a trigger: open a project’s Triggers tab (or All triggers in the ⌘K palette), click Add trigger and choose Slack.
| Field | Stored as | Notes |
|---|---|---|
| Slack account | connectionId |
Which Slack app listens. |
| Runs pipeline | pipelineId |
|
| When it finds an issue | delivery |
Start a run (default), or Add to a board to put the issue on a board and run it when its turn comes. |
| Board | boardId |
With Add to a board: the board the issue goes to. |
| Keyword | slack.keyword |
Optional. The first word that picks this trigger, so several pipelines can share one command: /jimothy fix … and /jimothy plan …. Leave it empty for the trigger used when no keyword matches. |
| Channel | slack.channels |
Any channel (the default), or only one. |
Then, in Slack:
/jimothy fix the login page returns 500: the app posts your request in the channel and starts the run in that message’s thread.@Jimothy fix the login page returns 500: the run starts in the thread of your message (or of the thread you mentioned it in).- A direct message to the app works like a mention.
If no trigger matches, Jimothy answers with the keywords it knows. The message becomes the run’s issue:
| Template | Value |
|---|---|
{{issue.title}} |
The request’s first line (up to 120 characters), without the keyword |
{{issue.description}} |
The whole request |
{{issue.key}} |
SLACK- plus the message’s timestamp, without the dot |
{{issue.url}} |
A link to the message |
{{issue.reporter}} |
Who asked |
{{issue.raw.channel}}, {{issue.raw.ts}}, {{issue.raw.user}} |
Slack ids |
The run replies in its thread: Started run #42, then approvals, step failures, and the result. Sub-pipeline runs post in the same thread.
Follow runs in a channel
Section titled “Follow runs in a channel”To follow every run (not only those started from Slack), add a notification channel: Settings → Notifications → Add channel → Slack app (two-way), pick the Slack account and the Channel, and choose the Events. New channels start with run started, run succeeded, run failed, step failed and approval needed.
- Each run gets one parent message in the channel (
🏃 Run #42 · Feature pipeline · ENG-123: Add rate limiting — running), and its events are replies in that thread. The parent message’s status updates as the run finishes. - Runs started from Slack keep their own thread instead.
- Sub-pipeline runs post in their top-level run’s thread.
- Each Slack account can have one such channel, since a run has one thread per account. To use another channel, add a second Slack app (account).
- Approvals and run failures are also sent to the channel (“Also send to channel”), so they aren’t buried in a thread.
Approve from Slack
Section titled “Approve from Slack”Approval steps post a message in the run’s thread with the approval message and Approve / Reject buttons. When the step offers choices, the message has checkboxes (or radio buttons for single choice) for up to 10 options.
- Clicking a button decides the step as
@<your Slack name>, exactly like approving in the app. The buttons are then replaced with✅ Approved by @ada. - Decisions made in the app or on your phone update the Slack message too.
- If the step is no longer waiting, or no option is picked, Slack shows you the reason privately.
Rejecting from Slack has no comment box. To reject with feedback for a loop-back, use the app.
Actions
Section titled “Actions”Use these in an integration step. Post message also works after a step.
Post message
Section titled “Post message”| Field | Notes |
|---|---|
| Channel | Optional. Pick a channel, or leave it empty to post in the run’s thread. A run only has a thread when it was started from Slack or a Slack app channel posts its updates; otherwise the step fails with Pick a channel. |
| Message | Required. Slack formatting works: *bold*, _italic_, `code`, <https://example.com|link text>. |
Returns {{steps.<id>.data.channel}} and {{steps.<id>.data.ts}}.
Ask and wait for a reply
Section titled “Ask and wait for a reply”| Field | Notes |
|---|---|
| Channel | As above. In a channel, the question starts its own thread. In the run’s thread, it’s asked there. |
| Question | Required, e.g. Which environment should {{issue.key}} go to? |
The step posts ❓ <question> and waits (shown as waiting on the run page) until someone replies in the thread. The first reply from a person, not a bot, answers it: Jimothy says thanks in the thread, and the reply becomes the step’s output and {{steps.<id>.data.reply}}, with the person’s name in {{steps.<id>.data.replyBy}}.
- Timeout (minutes) limits the wait: the step fails with
No reply after N min. - You can also answer from the run page: the banner shows the question with an answer box. Reject fails the step.
- Waiting is cancelled if Jimothy quits, like approvals. Use Retry to ask again.
- It can’t be an after-step action, because those don’t wait.
- If another question is already waiting in the run’s thread (parallel steps), the new one is asked in the channel in its own thread, marked with the run number, so answers can’t get mixed up.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Fix |
|---|---|
| The account shows not connected | Check the app-level token has connections:write, and that Socket Mode is on in the app’s settings. |
/jimothy says the app didn’t respond |
Jimothy isn’t running, or the account isn’t connected. |
Couldn't post in this channel |
Invite the app: /invite @Jimothy. Private channels and DMs always need it. |
| Mentions or replies are ignored | The app must be a member of the channel: /invite @Jimothy. |
Jimothy isn't in #channel, so it can't see replies there |
Invite it, or (for public channels) add the channels:join scope to an app created before it was in the manifest and reinstall it. |
… needs the X scope |
Your app was created before that permission was added. Update its manifest from Create the Slack app (or add the scope under OAuth & Permissions) and reinstall. |