Slack
Give an agent a voice in Slack without giving it the workspace. It posts and edits through named operations with a daily ceiling, and an edit can wait for a person.
- host
- slack.com
- connect
- Sign in, per user
Post message
slack-post-message
Update message
slack-update-message
Add reaction
slack-add-reaction
Set channel topic
slack-set-channel-topic
Reads and writes in Slack. Writes are off until you switch them on.
Each one is a named operation from the pack. Reads change nothing.
Writes
Post message
read backslack-post-message
Post one message to a public channel the app is in.
Update message
read backslack-update-message
Replace the text of one message the app posted.
Add reaction
read backslack-add-reaction
Add an emoji reaction to one message.
Set channel topic
read backslack-set-channel-topic
Set the topic of one channel.
Set channel purpose
read backslack-set-channel-purpose
Set the purpose of one channel.
Reads
How do users connect? Each one brings their own Slack.
- 1.Call for the userYour server invokes the action for the signed-in user. Without a Slack connection, the SDK throws EndUserNotConnectedError with a connect link.
- 2.The user pastes a keyThe link opens a form that shows where in Slack's settings to create the key. The link lasts 10 minutes and works once.
- 3.Anlyon checks itThe key is checked with Slack before it is kept, and bound to slack.com. It is never shown back.
- 4.Your server confirmsYour server confirms the connection for the user who is signed in, and the call goes through.
Guardrails. Suggested limits and approvals, for you to review.
Suggested limits
- 200 messages a day
- 100 edits a day
- 500 reactions a day
Suggested approvals
- A person approves editing a message
- A person approves changing a channel's topic
- A person approves changing a channel's purpose
What the key must allow
- Post messages as the app
- Read public channels the app is in
- Add and read reactions
- Set a channel's topic and purpose
Good to know
- Public channels only. The app's access does not cover private channels or direct messages.
- Slack answers most refusals with a success status, so the read-back is what tells a post from a refusal.
For your own account
- 1.Open Actions, then Integrations, and choose Slack.
- 2.Press Connect. Slack's consent page opens and lists what Anlyon asks for.
- 3.Pick the workspace and approve. Add the app to each channel it should post in.
- 4.The workspace is now a secret named SLACK, bound to slack.com.
Slack in your code. For one of your users, or for your own account.
Act for one of your users from your server, or connect your company's own Slack with the CLI.
import { Client, EndUserNotConnectedError } from "@anlyonhq/sdk";const anlyon = new Client({ apiKey: process.env.ANLYON_API_KEY! });try { const { data } = await anlyon .forUser(session.userId) .actions.invoke("slack-post-message", { channel: "C0123456789", text: "Deploy finished." }); return { status: "done", grade: data.grade };} catch (error) { if (error instanceof EndUserNotConnectedError) { // The user connects their own Slack, then you call again. return { status: "connect_required", url: error.connectUrl }; } throw error;}Other integrations. Under the same limits, approvals and receipts.
Available
Stripe
Payments · API key
Refunds under a money ceiling, and every customer, payment and invoice to read.
Available
GitHub
Code · API key
Issues, pull requests and code, in the repositories you choose.
Available
HubSpot
CRM · Sign in
Contacts, companies and deals: search them and change them.
- Anlyon app
- Available
- Your own app
- Recommended for production
