Slack Connect Invite Approval
Approve or deny Slack Connect invite requests with an automation, for example to allow partner domains and deny everyone else
An automation can decide Slack Connect invite requests for you. When a member asks to invite someone from outside your organization to a channel, Slack holds the invite and sends the request to Risotto. The automation runs, and its instructions decide whether to approve the invite, deny it, or message the requester.
How it works
- A member invites an external person to a channel. Slack holds the invite as a request instead of sending it.
- Slack sends the request to your Slack Tools app, which passes it to Risotto.
- Risotto starts every enabled automation with the Slack Connect invite requested trigger. A request that invites several people starts one run for each person.
- The automation approves or denies the invite with the Approve Slack Connect Invite Request and Deny Slack Connect Invite Request tools. When it approves, Slack sends the invite. When it denies, Slack tells the requester.
Prerequisites
- Slack Enterprise Grid, and a Slack org admin who can change Slack Connect settings.
- The Slack Tools connector installed across the entire Slack organization (an org-wide install). A workspace install cannot approve or deny invite requests.
- The Slack Tools app added to every workspace where members invite external people. Slack does not add an org-level app to workspaces by itself, and it sends invite requests only from workspaces the app is in. See Add the app to your workspaces.
Set up
Connect or reconnect Slack Tools
Go to Settings > Integrations and click the Slack card.
- New setup. Click Connect on the Tools app card and check Install across the entire Slack organization. The manifest Risotto gives you already has the scope and the event subscription. Follow the Slack Tools setup.
- Existing org-wide setup. The Tools app card shows that Slack does not grant
conversations.connect:manageyet, and its status button reads Error. Click Error, then Reconnect..., and follow Reconnecting the connector. The dialog shows both the scopes and theevent_subscriptionsblock to add to your app's manifest.
Confirm Slack verified the events URL
When you save a manifest with the event subscription, Slack checks the request URL. In your Slack app, open Event Subscriptions and confirm the Request URL shows as verified. If it does not, check that the URL matches the one Risotto showed you exactly, and click Retry.
Until Slack verifies the URL, the Tools app card on the Slack integration page shows "Slack does not send automation trigger events to Risotto yet."
Hold invites for approval in Slack
As a Slack org admin, open the Slack Connect channel settings for your organization (
https://app.slack.com/manage/<your-org-id>/slack-connect/settings/channels). Turn on Apply automation rules before channel invitations are sent and save.Add the tools
Add Approve Slack Connect Invite Request and Deny Slack Connect Invite Request from the tool catalog. Add Send Slack DM too if the automation should message the requester. The tools use the Slack Tools connector and need no other setup.
Create the automation
Create an automation, click Add trigger, open Slack, and choose Slack Connect invite requested. Attach the tools from the previous step, write the instructions (see the example), and turn the automation on.
Test it
As a regular member, open a channel, invite someone from outside your organization, and use an address on your allowed list. Slack shows the invite as pending approval, and the automation approves it within a few seconds. Then try an address that is not on the list.
Trigger fields
Each run handles one invitee and records these fields. In the instructions, type @ and pick the field, or write the token {trigger:/<field>}. See Referencing trigger fields.
| Field | Meaning |
|---|---|
invite_id | Slack's ID for this invite. The Approve and Deny tools act on it. |
invitee_email | Email address of the person to invite |
requester_name | Display name of the member who asked |
requester_email | Email address of that member. Empty when Slack sends no profile. |
requester_slack_user_id | Slack user ID of that member. Use it to send a DM. |
channel_id | Slack ID of the channel |
channel_name | Name of the channel, without the # |
channel_is_private | Whether the channel is private |
is_external_limited | Whether the invitee can only post in the channel, and cannot invite others |
Tools
Approve Slack Connect Invite Request approves the invite with the given invite_id. Slack then sends the invite to the invitee.
Deny Slack Connect Invite Request denies the invite with the given invite_id. It takes an optional message of at most 560 characters, which Slack shows the requester as the reason.
If someone already decided the invite in Slack, or it expired, both tools report that and take no action. Both tools use the conversations.connect:manage scope on the Slack Tools connector.
Example instructions
This automation approves invites to one partner domain and denies all others. Copy the instructions and paste them into the automation. Each trigger field and each tool becomes a chip.
If {trigger:/invitee_email} ends in "@example.com", approve {trigger:/invite_id} with {tool_template:slack/approve_slack_connect_invite}.
Otherwise, deny {trigger:/invite_id} with {tool_template:slack/deny_slack_connect_invite}, and send a short reason to {trigger:/requester_slack_user_id} with {tool_template:slack/send_dm}.
A {tool_template:…} token names a tool by its type, not by a tool in your organization. When you paste it, Risotto replaces it with the tool your organization made from that type. If you have more than one, Risotto asks which tool to use. If you have none, Risotto keeps the text and links to set the tool up. You cannot save instructions that still contain a {tool_template:…} token.
When no automation handles a request
While Apply automation rules before channel invitations are sent is on, an invite waits until an app decides it. If a request arrives and no enabled automation runs for it, Risotto notifies your admins once: "Slack Connect invite request not handled." Enable an automation with the trigger, or turn off the Slack setting. Requests that are already waiting can be approved or denied in Slack.
Troubleshooting
Something wrong or missing? Report an issue · View as Markdown