Skip to content

Slack How to make messaging between WhatsApp and Slack#

Contents#

  1. Setting up the Green-API application
  2. Creating a scenario
  3. Sending messages from Slack to WhatsApp
  4. 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

    go-to-scenarios

  • On the scenarios page, click Create a new scenario to create a new scenario

    create-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#

Scenario template

You can create a scenario according to the instructions or use our ready-made template

Setting up a Slack trigger#

  1. Click + and find Slack in the list of applications

    Slack

  2. Select the Watch Private Channel Messages module

    Slack

  3. Log in to your Slack account

    Slack

  4. Select the channel to which the automation will be associated in the Private Channel parameter

    Slack

  5. Specify the maximum number of results to work with during one execution cycle in the Limit parameter

    Slack

  6. Run scenario with the Run once button to get the names of the fields that the trigger receives.

    Slack


Setting up the GREEN-API action#

  1. Click on the + sign, in the list of applications find GREEN-API for WhatsApp

    app

  2. Select the Send a Message module

    Image with the "Send a Message" module selected

  3. Click Create a connection to add a connection to the instance

    Specify the values ​​of your instance idInstance and apiTokenInstance

    (The scenario will receive messages from the number linked to this instance)

    create-connection

  4. In the Chat ID source field, select the option for entering the chat number that is convenient for you:

    chat-id

    • Manual option - enter the number manually

      When 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 list

      When 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.

    contacts

    Automatic number formatting

    Automatic number formatting is available for numbers from the Russian Federation, Kazakhstan* and Israel.
    To enable, select yes in the Number format parameter and select Format Country.
    The parameter automatically adds @c.us to the phone number

    *Kazakhstan numbers are formatted similarly to Russian numbers

    format

  5. Form a message from the trigger fields in the Message parameter

    For example, specify the author of the message (1. User Name) and its content (1. Text) in the text

    Message

    Message 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~.

  6. Run the scenario by pressing Run Once

    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#

To receive messages in Make, you need to set up a trigger:

Trigger is an event that activates your scenario. For example, it could be a new message in WhatsApp, a new entry in Google Sheets, or something else.

Setting up an instance

When using the Watch Incoming Webhooks trigger, instance setup is automatically installed:

"webhookUrl": "https://hook.eu2.make.com/xxxxxxxxxxxxxxxxxxxx",
"incomingWebhook": "yes"
  1. Create a new scenario
  2. Click on the + sign, in the list of applications find GREEN-API for WhatsApp

    app

  3. Select the Watch Incoming Webhooks trigger at the top of the list

    watch-webhooks

  4. Click on the added module to open its settings

  5. Click Create a webhook to add a webhook

    add-webhook

  6. Click Create a connection to add a connection to the instance

    create-webhook

    • Specify the values of your idInstance and apiTokenInstance
      (The script will receive messages from the number linked to this instance)

    make-green-api-form

    The Connection name field can be used to name the instance being added (for example, "work number" or "sales").
    This will allow you to easily find the required account in the list of available integrations when creating.

Filter messages by sender number

By default, the script activates when a message is received from any number.
To run the script when a message is received from a specific number (or several specific numbers), use the chatIds parameter.

chatIds

  • The number can be selected from the contact list by clicking on the drop-down list icon:

    specify-chat-yes-contactlist

  • The number can be added manually by entering it in the ChatId field:

    specify-chat-yes-manual

When filling in the number manually, enter it in international format + postfix c@us - phoneNumber@c.us.
For example: 79876543210@c.us.

To add multiple numbers, add the required number of fields by clicking Add item

chatIds

  • Click Save to save your settings

  • Test by clicking Run once.

If the selected chat has incoming messages and the test is successful, click the magnifer to see what fields will be available when configuring the action.

test-trigger

Done! The trigger is set up, ready to use!


Setting up a Slack action#

  1. Click + and find Slack in the list of applications

    Slack

  2. Select the Create a Message module

    Slack

  3. Log in to your Slack account

    Slack

  4. Select the channel or chat to send the message to.

    You can specify a channel manually or by selecting from the list

    Slack

    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

    Slack

    Next, select the recipient from the drop-down list

    Slack

  5. Form the message to be sent in the Text field

    Slack

    Message 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:
    "if textMessageData: textmessage is not empty, then use it; otherwise, use extendedTextMessageData.text"

    Image with filled message

  6. Run the scenario by pressing Run Once

    run-once

The generated message will appear in the specified channel.
The setup is complete!