PRICING
PRODUCT
SOLUTIONS
by use cases
AI Lead ManagementInvoicingSocial MediaProject ManagementData Managementby Industry
learn more
BlogTemplatesVideosYoutubeRESOURCES
COMMUNITIES AND SOCIAL MEDIA
PARTNERS
Note: After adding new nodes in the Latenode chain of a project, to access the data from the previous nodes, you need to run the project and call the chain with all the necessary data. Data substituted from "JavaScript" node into "HTTP request" node often needs to be escaped with double quotes. Complex objects or arrays received in response to request from remote servers and coming as string must be processed by JSON.parse in order to work with them in "JavaScript" nodes as with corresponding data type.
First of all let's get the token according to the instructions in our article, but in the list choose "Google Sheets API v..." scope "www.googleapis.com/auth/spreadsheets" and "www.googleapis.com/auth/drive";
Create a new table, you can for example call it "LatenodeTestSheet4Add", with two columns "ID" and "Name";
Let's prepare a request for our rest client;
Let's substitute our token obtained from the step at the beginning;
Create a "Webhook" node: "+ Add node" => "Http" => "Webhook";
Copy the Webhook address and paste it into the rest client address bar;
Next, add another "JavaScript" node: "+ Add Node" => "Code" => "JavaScript";
Save;
Tie the nodes together;
Let's start and call the chain to transfer data between the nodes;
Let's copy the contents into it:
Let's check in all constructions like "data["{{1.body.name}}"]" that the number of Webhook corresponds to the one we are getting data from, if not replace it with the necessary one (let me remind you that 1 is the node number written just below the node name above the node type, then if it is a query then the object field responsible for the type of sent/received data is selected - body for forms or query for query parameters);
Save the changes;
Create the "HTTP request" node to get the id of the table file: "+ Add node" => "Http" => "HTTP request";
Save;
Tie the nodes together;
Let's start and call the chain to transfer data between the nodes;
Let's form the "Url" field: at the beginning let's substitute the variable "apiDriveURI" from "JavaScript", after it we specify ?:q=name "variable tableFileName from "JavaScript"";
Make sure that the default method is "Get";
Let's add the "Autorization" header and the "bToken" variable from "JavaScript" to its value;
Click "Save";
Create the "HTTP request" node to add data: "+ Add node" => "Http" => "HTTP request";
Save;
Tie the nodes together;
Let's start and call the chain to transfer data between the nodes;
Let's form the "Url" field: at the beginning let's substitute the variable "apiSheetURI" from "JavaScript", after it /spreadsheets/, then let's substitute the value we got in the previous node {{ 3.body.files[ 0 ].id}}, and then /values/A:B;
Make sure that the default method is "Get";
Let's add the "Autorization" header and the "bToken" variable from the first "JavaScript" node to its value;
Click "Save";
Let's create a "Webhook response" node to return found values: "+ Add node" => "Http" => "Webhook response";
Save;
Tie the nodes together;
Let's start and call the chain to transfer data between the nodes;
Let's add in the return values from the previous query with the data from cells {{ 4.body.values.[ 0 ]}}
After calling the whole chain, the contents of the cells will be returned;
At the end of the whole chain in Latenode will look like this:
See you in new articles;