help.chat-api.com

messengers API integration with Google sheets using API Chains

This chain will allow you to save information from messengers messages to a separate Google sheets. The chain works by the "append" method and will add data to your table at the end of the row. This is a convenient tool for identifying and storing important information for you, for example, customer phone numbers.

Customization

In the initial setup, you need to go through the OAuth2 authorization path, this is described in detail here.

After that, you need to enter "ClientID" and "clientSecret" in the settings and click on the authorization button. You will be taken to the confirmation screen from Google, where you sometimes need to select checkboxes and click on the confirmation button.

Please note that such authorization is a requirement of Google. You grant access on behalf of your Google account to your files on behalf of your application.

Then you will be redirected to the confirmation screen, where you will see a message with a successful confirmation or error. In any case, close this tab and return to the Chat API. By this time, the full authorization cycle will have passed, and you will see the  confirmation.

If this does not happen, and you see an error, then repeat the whole process. In case of an error, please contact our support.

if you see a message about the token refresh, then you need to go to https://myaccount.google.com/security

And select the third-party application section with account access. Then cancel the permission. Then go through the permission procedure again. After successful authorization, you must specify the Google Table ID.

important! You, as the user from whom authorization was obtained, must have write access to the presented table.

The identifier is located immediately after /d/ and before /edit , i.e. in this case it is "1yeo0vnj7uw-p2_6xu9aglgppdl3zrqsnobzy2st7-hy”

In the settings, you can change from which to which column Google will search for empty space to insert data into the table.

important! clean up append is not allowed!

Configure the array of data to be sent in a dynamic request. A full description of the setup can be found here.

But in short - we need to send an array of the form:

info

[

[

“What will we insert in the first column”,

“What will we insert in the second column”,

“What's in the third column”,

….

]

]

Based on the interval that was specified, the table data will be filled in, if you specified 5 columns, and there will be 6 values, then the excess value will be transferred further

Response

A full description of the request and response can be found here.

Was this article helpful?

Your opinion will be used to improve the content of the article

The Most Multifunctional API Provider

Chat API has been operating since 2015 and is one of the first and largest providers in Eastern Europe.

Here are some curious and important figures:

  • We have tremendous expertise in docker container management at scale with an SLA of 99.5+%;
  • Chat API involves in its work more than 200 servers, with the ability to quickly connect another 100;
  • 3200 cores and 25 terabytes of RAM;
  • 200+ methods and features that keep adding;
  • Highload system, Up Time servers 99.9%;
  • Support 24\7;
Get access to the API