Google Sheets Integration
Overview
In this guide, we’ll walk through the process of fetching data from the Kadoa API and adding it to a Google Sheet using Google Apps Script.
Prerequisites
Before you begin, make sure you have the following:
- A Google account
- A Google Sheet where you want to store the data
- Access to the Kadoa API and your API key
Step-by-Step Guide
-
In your Google Sheet, go to “Extensions” -> “Apps Script” to open the Google Apps Script editor.
-
Replace the contents of the script editor with the following code:
-
Replace
'YOUR_WORKFLOW_ID'
with your Kadoa workflow ID and'YOUR_API_KEY'
with your Kadoa API key. -
Save the script and run the
fetchDataFromKadoa
function either by clicking the play button in the toolbar or by going to “Run” -> “Run function” -> “fetchDataFromKadoa”. -
If this is your first time running a script accessing external APIs, authorize the script to access external services.
-
Check your Google Sheet. The data from the Kadoa API should now be populated.
Scheduling Automatic Updates (Optional)
To keep your Google Sheet data in sync with Kadoa, you can set up a trigger to run the script on a schedule:
- In the script editor, go to “Edit” > “Current project’s triggers”.
- Click “Add Trigger” and configure the desired frequency.
- Save the trigger.
The script will now automatically fetch and update the data in your Google Sheet based on the specified schedule.