Skip to main content
A dynamic data link keeps a Google Sheet connected to a table widget, but two separate refreshes decide how fresh the sheet is. Adriel regenerates the data behind the link, and Google Sheets re-reads the link. This page covers both, and how to automate the Google Sheets side with an Apps Script so the sheet updates without manual edits. For creating the link itself, see Exporting widget data. Adriel regenerates the data behind a dynamic data link every 4 hours. To see when it last ran, open the table widget’s 3 vertical dots menu, click Export to GSS, and check Last updated under Dynamic data link. To regenerate the data immediately instead of waiting for the next cycle, click Refresh now next to Last updated. Processing time depends on the size of the table. When it finishes, Last updated shows the new time. The link always uses the latest published version of the dashboard, including its saved date range. A date range changed only while viewing the dashboard is not applied to the link.

Why the sheet can still show older data

Google Sheets caches the result of IMPORTDATA and recalculates it about once an hour (Google Docs Editors Help). So even after Adriel regenerates the link, a sheet that uses =IMPORTDATA("link") can keep showing the previous data for up to an hour. To pull the latest data into the sheet right away, change the URL inside the formula so Google Sheets treats it as a new request. For example, add &v=2 to the end of the link, and increase the number each time:
The extra parameter doesn’t change the data the link returns. To skip this manual step, use the Apps Script below.

Automate the refresh with Apps Script

The script fetches the dynamic data link directly and writes the result into a tab as plain values. Compared with IMPORTDATA:
  • It is not cached by Google Sheets, so each run returns the latest data Adriel has generated.
  • If a fetch fails, the previous data stays in the tab instead of turning into an error.
  • The values can be edited, sorted, and referenced like any other cells. They are replaced on the next run.
The script clears the whole target tab on every run. Use a dedicated tab for the Adriel data, and keep formulas, notes, and calculations on other tabs that reference it. Do not put an IMPORTDATA formula on the same tab.
1

Copy the dynamic data link

In Adriel, open the table widget’s 3 vertical dots menu, click Export to GSS, and click Copy dynamic data link.
2

Open the Apps Script editor

In the Google Sheet, create or pick the tab that will hold the data and note its exact name. Then click Extensions > Apps Script.
3

Paste the script

Delete any code in the editor and paste the script below.
4

Enter the link and the tab name

Replace PASTE_YOUR_DYNAMIC_DATA_LINK_HERE with the copied link and PASTE_YOUR_TAB_NAME_HERE with the tab name. Keep the quotation marks. The tab name must match exactly, including spaces and case.
5

Save and run once

Click Save, select refreshAdrielData in the function list, and click Run. On the first run, Google asks for permission to access the spreadsheet and external services. Review and allow it.
6

Check the sheet

Return to the sheet and confirm the data appears in the target tab. Reload the sheet to add the Adriel > Refresh data menu for refreshing on demand.

Run the script on a schedule

To refresh the tab automatically, add a time-driven trigger in the Apps Script editor (Apps Script triggers guide).
1

Open the triggers page

In the Apps Script editor, click Triggers (clock icon) on the left.
2

Add a trigger

Click Add Trigger. Set the function to refreshAdrielData, the event source to Time-driven, and pick an interval.
3

Save the trigger

Click Save.
Adriel regenerates the link every 4 hours, so an hourly trigger keeps the sheet within an hour of the latest version. After clicking Refresh now in Adriel, use Adriel > Refresh data in the sheet once Last updated shows the new time.
A trigger runs under the Google account that created it. If a scheduled run fails, Google emails that account a failure summary.

Troubleshooting

SHEET_NAME doesn’t match any tab. Copy the tab name exactly, including spaces and case, and save the script again.
The link returned an error, so the previous data was kept. Check that CSV_URL contains the full dynamic data link copied from Adriel. If the dashboard is password protected, the data isn’t accessible from Google Sheets.
Compare the time of the last script run with Last updated in the Export to GSS modal. If Adriel hasn’t regenerated the link yet, click Refresh now, wait for Last updated to change, and run the script again.
Authorization for Apps Script is managed in the Google account or Workspace, not in Adriel. See Why does a Google Apps Script OAuth error occur for what to check.

Exporting widget data

Export a widget to PDF, CSV, XLSX, Google Sheets, or email.

Scheduled exports

Manage recurring exports across the workspace.

Google Sheets FAQs

Common questions about Google Sheets and Adriel, including Apps Script OAuth errors.