Importing Insights Data into Google Sheets
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide shows how to import insights data from the ClearFeed API into Google Sheets using Google Apps Script.
A ClearFeed API token (see )
A Google Sheet to import the data into
You will:
Open a Google Sheet and add a bound script
Use Apps Script to call the ClearFeed API
Populate the sheet with data from the API
In your Google Sheet:
Go to Extensions > Apps Script
Replace the line:
With your actual ClearFeed API token.
Save the script.
Click the ▶️ Run button
Authorize the script when prompted
After running, your sheet will be populated with insights data like:
normal
2025-05-13T00:00:00.000
1
87.0000000000000000
high
2025-05-18T00:00:00.000
1
240.0000000000000000
The script clears the sheet each time before writing new data
If no data is returned, the message "No data found"
is placed in cell A1
The script writes all keys from the API response as column headers
To run this automatically (e.g. daily):
Open the script editor
Click the clock icon ("Triggers")
Add a trigger for fetchClearfeedInsights
Choose "Time-driven" and select your schedule
For convenience, this example uses a hardcoded API token. In production or multi-user environments, consider using secure methods such as PropertiesService
or Google Secrets Manager.
Replace the default code with the following. The script below populates a simple report based on the example in the Documentation. It can be tailored to your requirements subsequently:
For help with API queries or customizations, reach out to ClearFeed Support ().