Slack Zapier Bridge
Creates a bridged (shared) channel between two Slack teams with this code snippet and zapier.com!
Prerequisites
- An account on zapier.com (free tier will work fine)
- The power to create webhooks on 2 Slack teams
Instructions
- Create a new Zap on Zapier.
- Zap Trigger = Catch Hook
- (Leave Child Key blank)
- Copy the generated webhook URL and save it somewhere.
- (Don't continue to the Action setup yet, but keep the zapier browser tab open)
- In a different browser tab, open up the Slack Custom Integrations settings.
- These should be at https://your-team-name.slack.com/apps/manage/custom-integrations
- Create an Outgoing Webhook
- Select a channel for the Outgoing Webhook. This will be the shared channel between the 2 Slack teams.
- In URLs, paste the generated Zapier webhook URL from step 4.
- (it may also be a good idea to customize the name of the webhook to something like "slack-bridge")
- Save the settings.
- Go to the channel you selected in step 8 and type a test message. Required for the next step!
- Go back to the Zapier tab and click the OK button.
- (You should get a Test Successful message) Click Continue.
- Zap Action = Python Code
- Configure the Run Python Input Data:
- Left box = "text". Right box, select the Catch Hook "Text" field from the dropdown.
- Left box = "username". Right box, select the Catch Hook "User Name" field from the dropdown.
- Left box = "team_domain". Right box, select the Catch Hook "Team Domain" field from the dropdown.
- Paste the code from slack-bridge-zap.py in the Code box.
- [TO BE CONTINUED]