Slack
Here is a typical use case of using Swallow with Slack to receive alerts when quotes are created.
Quote Alerting Example (with Slack)
In this example, we are going to build an alert anytime a new quote is emitted. To create this workflow, we are using:
Swallow's webhook when a new quote is emitted;
Slack as the "receiver" to alert your team anytime a new quote is created.
1. Create a Slack App
Go to the Slack API website (https://api.slack.com/apps) and click "Create New App".
Choose "From scratch" and give your app a name and select your workspace.
Once created, go to "OAuth & Permissions" in the sidebar.
Scroll down to "Scopes" and add the following Bot Token Scopes:
chat:write
incoming-webhook
At the top of the page, click "Install to Workspace" and authorize the app.
2. Set up Incoming Webhooks
In your Slack App settings, go to "Incoming Webhooks" in the sidebar.
Toggle "Activate Incoming Webhooks" to On.
Click "Add New Webhook to Workspace".
Choose the channel where you want to receive alerts and click "Allow".
Copy the Webhook URL that is generated.
3. Configure Swallow Webhook
In Swallow, navigate to Settings then Webhooks > Add a webhook.
Paste the Slack Webhook URL you copied earlier.
Save the webhook configuration.
4. Test the Integration
In Swallow, create a new quote or trigger an action that would normally create a quote.
Check the specified Slack channel. You should see a message with the quote details.
5. Customize the Message (Optional)
If you want to customize the message format, you may need to use an intermediary service like Zapier or write a small application to receive the webhook from Swallow, format the message, and then send it to Slack.
Here's an example of what the Slack message might look like:
By following these steps, you'll have set up a direct integration between Swallow and Slack, allowing your team to receive immediate notifications when new quotes are created.
Last updated