Introduction
Slack in this instruction is just an example — n8n allows creating integrations with a large number of SaaS applications. Its main advantage is that they have read the instructions of these applications and provide pre-prepared actions and connection instructions.
Creating a webhook in n8n
For this instruction, you will need the Totum scheme, a Slack account, and an n8n.io account (or its instance installed on your own server).
In n8n
, in a new workflow
, click +
and add a webhook
.
Creating a call in Totum
In Totum, we create a button and make a call using the getFromScript
function:
= : getFromScript(uri: "https://totum.app.n8n.cloud/webhook-test/2bd51c53-0175-405d-8cc3-1d122d19e379"; post: "param_1" = "ferrum"; post: "param_2" = "water")
param_1
, param_2
, and their values yourself.x-www-form-urlencoded
format will be executed.Testing the hook
In n8n
, click Listen for test event
and execute the button from Totum.
Setting up integration with Slack
In n8n
, add the following Slack
step, specify the channel, and compose the message.
Creating an app in Slack
Go to https://api.slack.com, navigate to the app management (top right) and add an application.
Select From scratch
.
Enter the name and choose a workspace.
Go to the Permissions
section.
Scroll down to the Scopes
— Bot token scopes
section and add one or more permissions.
Scroll back up and install to the workspace Install to Workspace
.
Copy the token and add it to n8n
.
Adding the app to a channel
In the Slack
workspace, add the created bot to the channel.
Enabling the workflow
We enable the process in n8n
and change the address of the request in Totum from test to production.