The IMPORTDATA() function has a latency of approximately 1 hour, as explained in this post on the Google Product Forum.
You mentioned the fact that a script was being fired by a time based Google Apps Script trigger. I was thinking, if you're using a script in the first place, why not fetch the CSV file as well, like so:
var url = 'url to public CSV ...
Generating a direct download link, as described in this article seems to work fine with the =IMPORTDATA function.
To summarize, you take the SITE_ID string from the sharing link you have:
Using this, you can generate the direct download link for use with the =IMPORTDATA function:
You are right, the import functions updates their result at certain intervals.
From Change a spreadsheet's locale, time zone, recalculation, and language, a help article from the official documentation,
Note: External data functions recalculate at the following intervals:
ImportRange: 30 minutes
Across all the sheets you have created. I have run into this same issue before. this includes test sheets youve played with etc. anytime you have added those import functions and not removed them or left them in a state where they will not try to refresh on their own.
(maybe not the answer, but here is a quick humble scraping guide)
the first choice is always IMPORTHTML and slowly (1-by-1 row) dragged down
=IMPORTHTML("URL"; "TABLE"; ROW(A1)-1)
if that fails then repeat it with:
=IMPORTHTML("URL"; "LIST"; ROW(A1)-1)
IMPORTDATA, IMPORTFEED, IMPORTHTML and IMPORTXML are able to get content from resources hosted on websites that are:
Publicly available. This means that the resource doesn't require authorization / to be logged in into any service to access it.
The content is "static". This mean that if you open the resource using the view source code option of modern web ...