Example of using Green-API methods in Zapier. Example of sending a message.#
To launch Green-API methods, we use the "Webhooks by Zapier" actions. For example, we will call the sendMessage method using the Zap action:
-
Create an action with the "Webhooks by Zapier" app
-
Select "WebHooks by Zapier" as the Zap script trigger in the new window
-
Select the request type according to the documentation method sendMessage
- Specify the request type
-
Specify URL as described in the documentation:
-apiUrl
- API host link
-mediaUrl
- API host link for sending files
-idInstance
- instance unique number
-apiTokenInstance
- instance access key
-
If the method involves sending data, select the correct
payload
type and data in the request body. sendMessage has a payload type ofJSON
, and two fields in the request body:message
andchatId
-
You may test the method by clicking the Test Step button on the Test tab.
Similarly, you can customize any method that is available in our documentation, which will allow you to automate interactions with our API and external services.