PRICING
PRODUCT
SOLUTIONS
by use cases
AI Lead ManagementInvoicingSocial MediaProject ManagementData Managementby Industry
learn more
BlogTemplatesVideosYoutubeRESOURCES
COMMUNITIES AND SOCIAL MEDIA
PARTNERS
Let's set up a script that allows using "Latenode" to create and update a record in the table from the database "Airtable";
Go to the "Airtable" website;
Links to all the sites are at the bottom of the article;
If you already had tables, go back to the home page, create a new one using the "Start from scratch" button and select "Kanban";
After creating, select the "Priority" column in the bottom menu, and check that "Status" and "Assignee" were also selected;
If you are just signing up, select "Tasks" in the step titled "Now, we'll add some info" to create a pre-built Kanban board with the three tasks already added;
Let's go to the "Airtable create personal token" link;
Click the "Create new token" button in the upper right corner;
Enter any name you like, for example "AirtableLatenode";
In "Scope" add the following: data.records:read data.records:write schema.bases:read;
Under "Permissions" select the desired "workspace" to which you want to grant access in order to manage it using the "API";
Click "Create token";
Save the resulting token, for example for a while in a notepad;
Go to our list of projects in "Latenode";
Let's create a new project;
Next create the first node "Webhook";
Copy its address into your rest client or notepad;
Saving the node;
Create a "JavaScript" (JS) node and copy the code from the article into it;
For now, without changing anything, just save it;
Let's start the project;
Using the rest client, we make a request by inserting the address from the webhook node in the address bar;
Let's go back to the "JS" node and edit it;
Check that when you set the text cursor inside the node, this data appears in the side menu. If it doesn't, repeat running and calling the web hook;
Insert the data that was sent in the request into the designated places;
Saving our changes;
Create four new "HTTP request" nodes to get the list of databases;
And in each copy the code below and save, most importantly do not mix them up, you can give each a transparent name;
Now we will add one by one to the chain and call them to set up the data retrieval;
Change everything in square brackets to data from queries and other nodes;
In each you need to add the created personal token;
In those places where it is used to access arrays, specify the desired index, it begins with zero, as elsewhere, despite the fact that in the side menu the first will be number one;
In the add request, don't forget to check that POST is selected as the method type;
Below are screenshots of how each of these nodes should look in the end after all the edits;
After calling the query with adding a record, go to our table Airtable and check that there is a new task with the text "Send data from Latenode!", if not check each query individually, perhaps somewhere not replaced the data, forgot to substitute a token;
Let's delete this task;
At the end of the chain, let's add a "Webhook response" node for convenience;
Let's make it return the ID of the new record created;
Start the project and call Webhook;
Let's make sure that the object with record_id is returned in response to the request;
Let's go back to our task table and check that it was created;
I hope it worked out for you too;
Airtable сreating a personal token (Airtable Developers)
https://developers.google.com/gmail/api/reference/rest/v1/users.messages/send
https://developers.google.com/gmail/api/reference/rest/v1/users.messages#Message
Application One + Application Two