04.5.06.1 Authorization instructions
Using Trigger on Webhook node
To work with Supabase service you can use URL of Trigger on Webhook nodes of Latenode platform. After registration in the Supabase application it is necessary to:
- Click on the New Project button to create a new project;
- Create a new organization by clicking the Create organization button;
- Create a new project by clicking the Create new project button;
- After creating the organization and project on the Tables tab, click on the New table button;
- Create a new table in the Create a new table under
public
window , filling in the table name. If necessary, the required columns can be added to the table;
- View the row with the new table on the Tables tab in the Database Tables block;
- To view the table, click on the menu in the row and select View table;
- Press Insert row to add a row to the created table;
- View the added row on the Table Editor tab;
- Go to the Database page and open the Webhooks tab. Click the Enable webhooks button;
- Configure the webhook in the Create a new database webhook window by adding its name (Name), defining the table (Table) and the events at which the query should be sent (Events).
Select HTTP Request (Type of webhook) as the type of webhook, POST (Method) as the method, and the address of the Trigger on Webhook node of the Latenode platform (URL) as the address. After selecting all the parameters, click on the Create Webhook button;
tip
To get the URL of the Trigger on Webhook node, you need to create a scenario and add this node to it. Clicking on the node will open its configuration window, where you can copy the URL.
- View the created webhooks in the Database Webhooks table;
- Go to the scenario page with the Trigger on Webhook (1) node whose URL was used to create the webhook in the Supabase application. Expand the scenario (2) and view its active status (3).
- Add a row (id = 2) to the Supabase table;
- View the results of the (1) scenario in the history, including the output parameters of the Trigger on Webhook node (2).
The output parameters of the Trigger on Webhook node are the added string data:
{
"body": {
"old_record": null,
"record": {
"created_at": "2024-04-25T18:13:57+00:00",
"id": 2,
"name": "Kate"
},
"schema": "public",
"table": "TestTest",
"type": "INSERT"
},
"client_ip": "",
"headers": {
"Accept": "*/*",
"Content-Length": "159",
"Content-Type": "application/json",
"User-Agent": "pg_net/0.8.0",
"X-Forwarded-For": "3.123.174.50",
"X-Forwarded-Host": "webhook.latenode.com",
"X-Forwarded-Port": "443",
"X-Forwarded-Proto": "https",
"X-Forwarded-Scheme": "https",
"X-Real-Ip": "3.123.174.50",
"X-Request-Id": "cf639da1bd83452ec3b081d57ca060b1",
"X-Scheme": "https"
},
"method": "POST",
"query": {},
"url": "http://"
}