Sync data or re-render a web page
refresh_dataPull fresh content now instead of at the next scheduled refresh.
When to use:
Before an announcement, so menus and prices are current; after someone edits a sheet that a creative repeats over; after changing a web link's crop with update_items, to see the result.
When NOT to use:
Changing a feed's or link's settings: use update_items. A screen that has not picked up a change, or is frozen: use control_screens.
What to know:
Settings never change. A failing feed is reported in the result, not thrown. Screens showing the data update when a sync succeeds. Needs integration.edit for feeds, media.edit for a web link.
A sheet published to the web changes on Google's side up to about 5 minutes after an edit, so a sync straight after an edit can still read the old rows: synced true says the sync ran, not that the edit arrived. Check rowCount with get_items and sync again after a few minutes if it is old.
Parameters:
Pass exactly one; none or two is an error.
dataSourceId: one ds_… feed from list_items kind data_sources.
allDataSources: true syncs every feed you can edit, one after another; one failure does not stop the rest; limited to 5 calls a minute.
webLinkId: one med_… web link (list_items kind media, mediaKind web); renders a new snapshot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| webLinkId | No | Web link id. | |
| dataSourceId | No | Data source id. | |
| allDataSources | No | Every data source. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | allDataSources: feeds that synced. | |
| error | No | One feed: why it did not sync. | |
| total | No | allDataSources: feeds tried. | |
| failed | No | allDataSources: feeds that failed. | |
| synced | No | One feed: true when it synced. |