How to make messaging between WhatsApp and Slack#
Contents#
- Setting up the Green-API application
- Creating a scenario
- Sending messages from Slack to WhatsApp
- Sending messages from WhatsApp to Slack
Setting up the Green-API application#
The setting up of the Green-API application is described in detail in the Setting up integration
Create a scenario#
Scenario - an automated process created in Make.
Each scenario consists of a trigger and an action. When a trigger is fired in one application, Make automatically performs the action in the other.
Algorithm for creating a scenario:
- Log in or register an account in Make
-
Click the
Scenarios
button in the sidebar menu -
On the scenarios page, click
Create a new scenario
to create a new scenario -
Scenario successfully created!
After creating the scenario, a plus sign (adding a module) will appear on the Make page.
Sending messages from Slack to WhatsApp#
Script template
You can create a scenario according to the instructions or use our ready-made template
Setting up a Slack trigger#
-
Click
+
and find Slack in the list of applications -
Select the Watch Private Channel Messages module
-
Log in to your Slack account
-
Select the channel to which the automation will be associated in the
Private Channel
parameter -
Specify the maximum number of results to work with during one execution cycle in the
Limit
parameter -
Run scenario with the
Run once
button to get the names of the fields that the trigger receives.
Setting up the GREEN-API action#
-
Click on the
+
sign, in the list of applications find GREEN-API for WhatsApp -
Select the Send a Message module
-
Click
Create a connection
to add a connection to the instanceSpecify the values of your instance
idInstance
andapiTokenInstance
(The scenario will receive messages from the number linked to this instance)
-
In the
Chat ID source
field, select the option for entering the chat number that is convenient for you:-
Manual
option - enter the number manuallyWhen entering the number manually, it is required to enter it in international format + postfix
c@us
-phoneNumber@c.us
.For example:
79876543210@c.us
-
From Contact List
option - select a number from the contact listWhen selecting a number from the contact list, click on the drop-down list icon on the right and select the required phone number.
The number is formatted automatically.
Automatic number formatting
Automatic number formatting is available for numbers from the Russian Federation, Kazakhstan* and Israel.
To enable, selectyes
in theNumber format
parameter and selectFormat Country
.
The parameter automatically adds@c.us
to the phone number*Kazakhstan numbers are formatted similarly to Russian numbers
-
-
Form a message from the trigger fields in the
Message
parameterFor example, specify the author of the message (
1. User Name
) and its content (1. Text
) in the textMessage formatting
When formatting a message, you can use bold, italic, or strikethrough text. You can also wrap a line and use emoji. For example:
*Bold text*
,_Italic text_
,~Strikethrough text~
. -
Run the scenario by pressing
Run Once
A generated message will be sent to the specified Chat ID
.
Setup complete!
Sending messages from WhatsApp to Slack#
Scenario template
You can create a scenario according to the instructions or use our ready-made template
Setting up the GREEN-API trigger#
- Create a new scenario
-
Click on the
+
sign, find GREEN-API for WhatsApp in the list of applications -
Select the Watch webhooks trigger at the top of the list
-
Click on the added module to open its settings
-
Click
Create a webhook
to add a webhook -
Click
Create a connection
to add a connection to the instance -
Specify your instance values
idInstance
andapiTokenInstance
(The scenario will receive messages from the number associated with this instance)
The
Connection name
field can be used to name the instance being added (e.g. "work number" or "sales").This will allow you to easily find the required account in the list of available integrations when creating.
-
Click
Save
to save the values
Setting up a Slack action#
-
Click
+
and find Slack in the list of applications -
Select the Create a Message module
-
Log in to your Slack account
-
Select the channel or chat to send the message to.
You can specify a channel manually or by selecting from the list
Rule when entering a channel or chat name
You can specify a public channel, a private channel, or an IM channel.
You can enter a channel name (#general) or an encoded identifier (C0123BE12L).- When selecting a channel from the list, specify its type in the
Channel type
parameter
Next, select the recipient from the drop-down list
- When selecting a channel from the list, specify its type in the
-
Form the message to be sent in the
Text
fieldMessage formatting
When formatting a message, you can use bold, italic, or strikethrough text. You can also wrap a line and use emoji.
For example:*Bold text*
,_Italic text_
,~Strikethrough text~
.Since the message text can be transmitted in different fields depending on the message type, it is recommended to specify the condition:
"iftextMessageData: textmessage
is not empty, then use it; otherwise, useextendedTextMessageData.text
" -
Run the scenario by pressing
Run Once
The generated message will appear in the specified channel.
The setup is complete!