Skip to content

Discord How to Set Up Messaging Between WhatsApp and Discord#

To exchange messages between WhatsApp and Discord you need to create two scenarios

Contents#

  1. Setting up the GREEN-API application
  2. Creating a scenario
  3. Creating a scenario for sending messages from Discord to WhatsApp
  4. Creating a scenario for sending messages from WhatsApp to Discord

Setting up the Green-API application#

Setting up the Green-API application is described in detail in the section Integration setup

Creating a scenario#

A Scenario is an automated process created in Make.
Each scenario consists of a trigger and an action. When a trigger is triggered in one of the applications, Make automatically performs an action in the other.

Steps to create 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.


Creating a Scenario to send message from Discord to WhatsApp#

Discord trigger setup#

  1. Click on the + sign, find Discord in the list of applications
  2. Specify the event to which you want to respond Watch Channel Messages

    watch-channel-messages

  3. Login to your Discord account

    create-a-connection

  4. Select the channel with which the automation will be associated

  5. Specify the maximum number of results to be worked with during one execution cycle.
  6. Click Save to save the settings

discord-trigger-settings

If there is a message in the selected channel, you can see which fields will be available when setting up automation.

Configuring 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!


Creating a Scenario to send message from WhatsApp to Discord#

GREEN-API trigger setup#

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.

Instance settings

When using the Watch webhooks trigger, instance setup: is automatically applied:

"webhookUrl": "https://hook.eu2.make.com/xxxxxxxxxxxxxxxxxxxx",
"incomingWebhook": "yes"

Procedure for Configuring the Trigger:

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

    app

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

    watch-webhooks

  3. Click on the added module to open its settings

  4. Click Create a webhook to add a webhook

    add-webhook

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

    create-webhook

  6. Specify your instance values ​​idInstance and apiTokenInstance

    (The scenario will receive messages from the number associated with this instance)

    make-green-api-form

    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.

  7. Click Save to save the values

Configuring the Discord action#

  1. Click on the + sign, select the Discord app
  2. Specify the action you want to perform (Send a Message)

    send-a-message

  3. Login to your Discord account or select a connection from the list

  4. From the list of methods, select send a message to a channel

    send-to-channel

  5. From the list, select the channel to which the message will be sent

  6. Form the message to be sent from the trigger fields

    Since the message text can be passed 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"

    settings-actions-discord

    Сomposing a message

    When composing a message, you can use italic text, breaking the line and emoji.
    For example: *Italic text*, _Italic text_.

  7. Run the scenario by clicking Run Once

run-once

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