跳到主要内容

Slack Webhook

This guide contains information to set up a Slack Sink in Vanus Connect.

Introduction

Slack is a cloud-based team collaboration platform that allows users to communicate, share files, and integrate with other tools and services.

With Slack Sink connector in Vanus Connect, you can easily forward real-time updates to a Slack group chat, allowing your team to stay up-to-date on all events generated by your application.

Prerequisites

Before forwarding events to Slack, you must have:

Getting Started

To set up an app for receiving events in your Slack channel:

备注

If you have created a Slack App already, you can skip Step 1 and directly go to Step 2. But ensure that you avoid using the same Slack app for both your Slack source and Slack webhook connections.

Step 1: Create a Slack App

  1. Create an App① on Slack.

slack-sink-1

  1. Select From scratch②.

slack-sink-2

  1. Set the App Name③ and Workspace④, then click Create App⑤.

slack-sink-3


Step 2: Create an Incoming Webhook

  1. Select Incoming Webhooks① in the sidebar menu.

slack-sink-4

  1. Turn on Activate Incoming Webhooks②.

slack-sink-5

  1. Scroll down, and click Add New Webhook to Workspace③ to add a new one.

slack-sink-6

  1. Select the channel④ to receive messages and click Allow⑤.

slack-sink-7

  1. Now Copy⑥ the webhook URL.

slack-sink-8

  1. Return to the Vanus Connect page and paste your webhook URL in the Webhook URL⑦ field.

slack-sink-9


Step 3: Personalize Event Structure

备注

This is a general instruction on how to personalize your event structure. You can structure your events to suit your specific requirements and create connections for different scenarios.

  1. Click on Display sample events① for reference, compose your preferred message, then type $ followed by the desired event② to access a list of associated event values③, and choose the one you prefer.

slack-sink-10

  1. You can structure the content as you prefer and fill in as many values④ as you wish to receive.

slack-sink-11

  1. Click Submit⑤ to finish the configuration process.

slack-sink-12


Required Data Format

The event data must be JSON format, here a simple message, example:

{
"data": {
"subject": "Test",
"message": "Hello Slack!:wave: This is Sink Slack!"
}
}