Skip to content

Setting up Make and WhatsApp integration#

The Green-API platform has its own application on Make .

To use it, just find the GREEN-API for Whatsapp module on the scenario page:

  1. Open or create a scenario
  2. Click +
  3. Enter GREEN-API in the search bar

app

Outdated application version

Link to install the application.

If an error occurs when installing the application via the specified links in Make, we recommend that you specify the subdomain in the link where you logged in to the site.

The availability of the site via the link depends on the subdomain.
Examples of available domains: eu1, eu2, us1, us2.

EU1

Setting up the application:

  1. Log in or register an account in Make
  2. Install the Green-API application in Make from link
  3. Click the Install button

install

  1. Select the organization to which the Green-API application will be installed and click the Install button

install-organization

  1. On the Installed Apps page, you can check the availability of the application in your organization

check-installed-app

Setup procedure integrations:

  1. Setting up the GREEN-API application
  2. Creating a scenario
  3. Setting up receiving incoming messages
  4. Setting up an action
  5. Examples of using the GREEN-API application

1. Setting up the Green-API application#

To use the GREEN-API application, you need to get a registration token and an instance ID in the console.
For testing, we recommend using the free developer plan.

  1. Log in or register an account in GREEN-API
  2. Create an instance on the free "Developer" plan.
    To do this, in the console click the Create instance button and select a plan.

    create-instance
    developer

  3. Authorize the instance. To do this:

    • You can scan the QR code on the instance setup page.
      In the WhatsApp or WhatsApp Business mobile app, sign in to your linked devices and scan the QR code you received.

    scan-qr

    • Or request a six-digit authorization code to bind by phone number.
      In the WhatsApp or WhatsApp Business mobile app, sign in to your linked devices and click Likn with phone number.

    scan-qr

    After successful authorization, the instance should receive the Authorized status. You can check the instance status using the GetStateInstance method

  4. Copy the idInstance and apiTokenInstance values ​​for working with Make scripts

    console

2. Creating a scenario#

Scenario is an automated process created in Make. Each scenario consists of a trigger and an action. When a trigger is fired, Make automatically performs an action.

Algorithm for creating a scenario:

  • Log in or register an account in Make
  • Click the Scenarios button in the sidebar

    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.

3. Setting up incoming messages#

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": "webhookserver make",
"incomingWebhook": "yes"

Procedure for Configuring the Trigger:

  • Create a new scenario
  • Click on the + sign, in the list of applications find GREEN-API for WhatsApp

    app

  • Select the Watch webhooks trigger at the top of the list

    watch-webhooks

  • Click on the added module to open its settings

  • Click Create a webhook to add a webhook

    add-webhook

  • Click Create a connection to add a connection to the instance

    create-webhook

  • Specify your instance values ​​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 (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

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

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!

4. Setting up the action#

To send messages, you need to set up an action in Make.
The action needs to be set up after setting up the trigger so that messages are sent automatically.

You can also set up the action alone, without the trigger. But in this case, the script will be runned manually.

Available actions#

All actions repeat GREEN-API methods.

Methods for sending messages:

Concise descriptions of the methods
  1. Journal methods:

  2. Methods for working with groups:

  3. Methods for working with queues:

  4. Service:

  5. Settings:

  6. Receiving:

Sending a message#

To add an action, click on the semicircle next to the trigger. A circle with a plus sign will appear (adding a module).

add-action

  • Select an application to perform the action.
    To do this, find GREEN-API for WhatsApp in the list of applications

    empty-action

  • Select one of the methods for sending a message.
    For example, the Send a Message method

    send-message

  • From the Connection list, select a ready-made connection or add a new connection by clicking the add button.

    When adding a new connection, fill in your instance data idInstance and apiTokenInstance
    Then click Save to save.

    connection-action

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

    • Manual option - enter the number manually
    • From Contact List option - select the number from the contact list

    chat-id

    When entering the number manually, it must be entered in international format + postfix c@us - phoneNumber@c.us.
    For example: 79876543210@c.us

Automatic number formatting

Automatic number formatting is available for Russian, Kazakh* and Israeli numbers.
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

In the Chat Id field, you can specify either a static number to which messages will be sent when the script is run, or set a variable to send a response message to the number that wrote to your account.

  • When selecting a number from the contact list, click the drop-down icon on the right and select the required phone number.

    The number is formatted automatically.

    contacts

  • To send a reply to the number from which the incoming message was received, click on the Chat Id input field.
    A window with the data received via the trigger will open on the right.
    Specify the sender variable from the senderData object as Chat Id.

    The number is formatted automatically.

    sender1
    sender2

Enter the text of the message to send in the Message field.
You can specify a generic text or form it from the variables received in the notification trigger.

setup-message

How to quote an incoming message in a response?

To add a quote in the message you send, fill in the quotedMessageId field with the ID Message variable

quote

Then click OK.


  • Run a test by clicking the Run once button.
    If the test is successful, click the magnifer to see the action result details.

test-action

Done! The action is configured, ready to use!

GREEN-API Application Usage Examples#

How to make messaging between WhatsApp and Slack

How to make messaging between WhatsApp and Discord