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:

  1. Swallow's webhook when a new quote is emitted;

  2. Slack as the "receiver" to alert your team anytime a new quote is created.

1. Create a Slack App

  1. Go to the Slack API website (https://api.slack.com/apps) and click "Create New App".

  2. Choose "From scratch" and give your app a name and select your workspace.

  3. Once created, go to "OAuth & Permissions" in the sidebar.

  4. Scroll down to "Scopes" and add the following Bot Token Scopes:

    • chat:write

    • incoming-webhook

  5. At the top of the page, click "Install to Workspace" and authorize the app.

2. Set up Incoming Webhooks

  1. In your Slack App settings, go to "Incoming Webhooks" in the sidebar.

  2. Toggle "Activate Incoming Webhooks" to On.

  3. Click "Add New Webhook to Workspace".

  4. Choose the channel where you want to receive alerts and click "Allow".

  5. Copy the Webhook URL that is generated.

3. Configure Swallow Webhook

  1. In Swallow, navigate to Settings then Webhooks > Add a webhook.

  2. Paste the Slack Webhook URL you copied earlier.

  3. Save the webhook configuration.

4. Test the Integration

  1. In Swallow, create a new quote or trigger an action that would normally create a quote.

  2. 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:

New Quote Created!
Quote reference: {quote_reference}
Total Amount: ${total_amount}
Due Date: {due_date}

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