Actions
Zapier actions
Tutorial
You can watch this video to learn how to set up Zapier actions from Dataland:
The video references some below code that you can copy and paste for your use:
Supporting code for tutorial
Replace the authToken, workspace_id, and table_id with the right variables.
// this is wrapped in an `async` function
// you can use await throughout the function
const response = await fetch("https://resnapshot-table.software-4de.workers.dev/", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
auth_token: "",
workspace_id: 0,
table_id: 0
})
})
output = await response.json()
To generate auth_token (see video at 11:50 mark for walkthrough)
- Open app.dataland.io to your workspace.
- Open Chrome Developer Tools (right click on the page, > Inspect > then click Console)
- In the console tab, run this code:
await window.Clerk.session.getToken({template: 'long_lived_action_token'})
- Copy the results back
To find workspace_id and table_id (see video at 12:24 for walkthrough)
- In Dataland, open the table you want Zapier to refresh
- Click on the table name, and click Diagnostics
- You'll see
workspace_id
andtable_id
-- copy those and put them back into the Zapier code.