Skip to content

Integration setup#

Zapier - is a tool that allows you to automate tasks by connecting web applications (such as Discord, Slack, Gmail). Automated processes created in Zapier are called Zaps.

Zap - an automated process created in Zapier. Each zap consists of a trigger and an action. When a trigger fires in one of the apps, Zapier automatically performs the action in the other.

The platform Green-API has its own application in the Zapier service, with which you can send Whatsapp messages.

To use the Green API application, you need to get a registration token and an account ID in your personal account. To test our API, we recommend using the free developer plan.

Authorization#

To send messages to WhatsApp, you need to authorize the instance, for this the WhatsApp account in the phone application must be in an authorized state, then go to personal account and get a QR code, after in the WhatsApp mobile application or WhatsApp Business log in to the linked devices and scan the received QR code, the instance will enter the authorized state.

Description of GREEN API Application Methods#

Triggers#

Incoming Message Hook Trigger - the trigger fires on receiving a new incoming WhatsApp message. The trigger is based on webhooks. The trigger time is minimal, but there is a technical limitation, you can use this trigger for only one integration per green-api instance.

Last Incoming Messages - the trigger fires on receiving a new incoming WhatsApp message. The trigger is based on the lastIncomingMessages method. The trigger time is the sum of the time the message was added to the log and the frequency with which the method is requested by the zapier service (depending on the type of zapier account). You can use this trigger for multiple integrations per green-api instance.

Instance settings
  • When using the Incoming Message Hook Trigger, instance setting: is automatically set
"webhookUrl": "webhookserver zapier",
"incomingWebhook": "yes"
  • When using the Last Incoming Messages trigger, instance setting: is automatically set
"incomingWebhook": "yes"

Trigger setting#

Both triggers respond to incoming WhatsApp messages for the Green API instance and configured in the same way. To add a trigger, you need to select the recipient whose messages the trigger should work on or select the ALL option (leave the field empty) - then the trigger will respond to messages from any contact or chat.

сhat-selection

You can select a recipient either from the drop-down list of contacts:

list

Actions#

All actions repeat Green API methods, you can read more about Green API methods in documentation.

Send Message - sending a text message.

Send Contact - sending contact card.

Send File by Url - sending file by url.

Send Location - sending location.

Setup Green API applications#

green-api-application-search

  • Add your instance data IdInstance and ApiTokenInstance (messages will be sent and received from the number associated with this instance).

zapier-green-api-form

Field Short name of this account

Field Short name of this account - can be used for the name of the added instance (for example, "work number", or "sales").

This will allow you to easily find the account you need in the list of available when creating integrations.

You can find out IdInstance and ApiTokenInstance in personal account. Make sure the instance is in the "Authorized" state.

console

  • Check the connection to the added instance

account-test

If everything is done correctly and your instance is authorized, the test will pass successfully.

successful-test

Now you can move on to implementing your automation scripts.

Examples of using the Green API application#

How to make messaging between WhatsApp and Slack

How to make messaging between WhatsApp and Discord