$npx -y skills add whatnickcodes/clappie --skill slack-botSlack bot integration for receiving messages and reactions. Use when setting up Slack webhooks or managing Slack bot configuration.
| 1 | # Slack Bot Skill |
| 2 | |
| 3 | Slack bot integration for receiving messages/reactions and spawning sidekicks. Threads become separate sidekicks. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | ### 1. Create Slack App |
| 8 | |
| 9 | 1. Go to https://api.slack.com/apps → **Create New App** → **From scratch** |
| 10 | 2. Name it (e.g., "Clappie") and select your workspace |
| 11 | |
| 12 | ### 2. Configure Bot Scopes |
| 13 | |
| 14 | Go to **OAuth & Permissions** → **Bot Token Scopes** and add: |
| 15 | |
| 16 | | Scope | Purpose | |
| 17 | |-------|---------| |
| 18 | | `chat:write` | Send messages | |
| 19 | | `files:read` | Read uploaded files | |
| 20 | | `files:write` | Upload files | |
| 21 | | `users:read` | Get user info | |
| 22 | | `reactions:write` | Add reactions to messages | |
| 23 | | `reactions:read` | See reactions on messages | |
| 24 | |
| 25 | ### 3. Subscribe to Events |
| 26 | |
| 27 | Go to **Event Subscriptions** → Enable Events → **Subscribe to bot events**: |
| 28 | |
| 29 | | Event | Purpose | |
| 30 | |-------|---------| |
| 31 | | `message.channels` | Messages in public channels | |
| 32 | | `message.groups` | Messages in private channels | |
| 33 | | `message.im` | Direct messages | |
| 34 | | `message.mpim` | Group DMs | |
| 35 | | `reaction_added` | User adds reaction | |
| 36 | | `reaction_removed` | User removes reaction | |
| 37 | |
| 38 | **Don't set the Request URL yet** - you need Tailscale Funnel first. |
| 39 | |
| 40 | ### 4. Install to Workspace |
| 41 | |
| 42 | Go to **Install App** → **Install to Workspace** → Authorize |
| 43 | |
| 44 | Copy the **Bot User OAuth Token** (starts with `xoxb-`) |
| 45 | |
| 46 | ### 5. Get Signing Secret |
| 47 | |
| 48 | Go to **Basic Information** → **App Credentials** → Copy **Signing Secret** |
| 49 | |
| 50 | ### 6. Add to .env |
| 51 | |
| 52 | ```bash |
| 53 | SLACK_BOT_TOKEN=xoxb-your-bot-token |
| 54 | SLACK_SIGNING_SECRET=your-signing-secret |
| 55 | ``` |
| 56 | |
| 57 | ### 7. Configure Settings |
| 58 | |
| 59 | ```bash |
| 60 | # Enable the bot |
| 61 | echo "true" > recall/settings/slack-bot/enabled.txt |
| 62 | |
| 63 | # Allow your Slack user ID (find via Slack profile → ⋮ → Copy member ID) |
| 64 | echo "U01ABCDEF" > recall/settings/slack-bot/users.txt |
| 65 | |
| 66 | # Enable incoming messages |
| 67 | mkdir -p recall/settings/slack-bot/webhooks |
| 68 | echo "true" > recall/settings/slack-bot/webhooks/incoming-message.txt |
| 69 | ``` |
| 70 | |
| 71 | ### 8. Start Sidekick Server |
| 72 | |
| 73 | ```bash |
| 74 | clappie background start sidekicks |
| 75 | ``` |
| 76 | |
| 77 | ### 9. Expose via Tailscale Funnel |
| 78 | |
| 79 | **Slack requires ports 80, 443, or 8443.** Use Tailscale Funnel to proxy: |
| 80 | |
| 81 | ```bash |
| 82 | # Expose port 7777 on HTTPS (Tailscale handles certs) |
| 83 | tailscale funnel 7777 |
| 84 | ``` |
| 85 | |
| 86 | This gives you a URL like `https://your-machine.tail1234.ts.net` |
| 87 | |
| 88 | ### 10. Set Webhook URL in Slack |
| 89 | |
| 90 | 1. Get your webhook path: |
| 91 | ```bash |
| 92 | cat recall/settings/slack-bot/webhook-path.txt |
| 93 | ``` |
| 94 | |
| 95 | 2. Go back to **Event Subscriptions** in Slack app settings |
| 96 | |
| 97 | 3. Set **Request URL** to: |
| 98 | ``` |
| 99 | https://your-machine.tail1234.ts.net/webhooks/slack-bot/{webhook-path} |
| 100 | ``` |
| 101 | Replace `{webhook-path}` with the value from step 1 |
| 102 | |
| 103 | 4. Slack will send a verification challenge - it should show ✓ Verified |
| 104 | |
| 105 | ### 11. Invite Bot to Channel |
| 106 | |
| 107 | In Slack, invite the bot to channels where you want it: |
| 108 | ``` |
| 109 | /invite @YourBotName |
| 110 | ``` |
| 111 | |
| 112 | ## Settings |
| 113 | |
| 114 | All settings in `recall/settings/slack-bot/`: |
| 115 | |
| 116 | | File | Description | Required | |
| 117 | |------|-------------|----------| |
| 118 | | `enabled.txt` | Set to `true` to enable | Yes | |
| 119 | | `webhook-path.txt` | Secret URL segment (auto-generated) | Auto | |
| 120 | | `users.txt` | Allowed Slack user IDs (one per line) | Yes | |
| 121 | | `channels.txt` | Allowed channel IDs (optional) | No | |
| 122 | | `webhooks/incoming-message.txt` | Enable incoming messages | Yes | |
| 123 | | `sidekick-prompt.txt` | Custom prompt/personality for sidekicks (overrides skill defaults) | No | |
| 124 | |
| 125 | ## CLI Commands |
| 126 | |
| 127 | ```bash |
| 128 | clappie slack-bot send <channel> <message> # Send message |
| 129 | clappie slack-bot thread <channel:ts> <message> # Reply in thread |
| 130 | clappie slack-bot photo <channel> <path> # Send image |
| 131 | clappie slack-bot document <channel> <path> # Send file |
| 132 | clappie slack-bot react <channel> <ts> <emoji> # Add reaction |
| 133 | ``` |
| 134 | |
| 135 | ## Sidekick Extension Commands |
| 136 | |
| 137 | When a Slack sidekick is running, these extra commands are available (registered via `sidekickCommands` in `webhooks/send.js`). The sidekick ID is auto-detected from the `CLAPPIE_SIDEKICK_ID` env var -- no need to type it. Explicit ID still works as an override. |
| 138 | |
| 139 | ```bash |
| 140 | clappie sidekick react <ts> :emoji: # React to a message |
| 141 | clappie sidekick send-file photo "/path" "caption" # Upload image |
| 142 | clappie sidekick send-file document "/path" "caption" # Upload file |
| 143 | ``` |
| 144 | |
| 145 | These are only available to sidekicks with `source: slack-bot`. Telegram-specific commands like `combo` and `sticker` are not available. |
| 146 | |
| 147 | ## Threading |
| 148 | |
| 149 | - Main channel messages → one sidekick per channel (until complete) |
| 150 | - Threaded replies → separate sidekick per thread |
| 151 | - `conversationId` = `channel` or `channel:thread_ts` |
| 152 | - Bot replies stay in thread automatically |
| 153 | |
| 154 | ## Reactions |
| 155 | |
| 156 | When a user reacts to a message, the sidekick receives: |
| 157 | ``` |
| 158 | [Reacted with :thumbsup:] |
| 159 | ``` |
| 160 | |
| 161 | Direct CLI (not sidekick): |
| 162 | ```bash |
| 163 | clappie slack-bot react C01234 1234567890.123456 :eyes: |
| 164 | ``` |
| 165 | |
| 166 | ## Troubleshooting |
| 167 | |
| 168 | **"Not found" when visiting webhook URL in brows |