Google sheet Error- importdata() shows HTML code on google sheets

It tried importing data from Redash to google sheets via API key but the result on G-sheet returns HTML code. Can anyone help with this?

Atttaching SS for reference

image

What happens if you visit the redash.zomans.com link in your browser? Does the result download?

It looks like when IMPORTDATA hits the URL it’s being redirected to a login page.

Yes, it asks for login in case there is no current session is active otherwise it opens a home page(attaching ss). Also, the URL with the API key downloads the result when entered in any browser’s search bar.

I wonder if you struck this issue: https://github.com/getredash/redash/issues/4805

Can you confirm that the query in question has group permissions assigned to it?

Just to confirm: you try this from an incognito browser where you haven’t logged-in to Redash, right?

Yes. Also, if I visit the API URL via a browser that downloads the data in .csv format and I think that verifies it too.

Nope, using signed in browser only.

Sounds like a permissions error then. The API download link should work when visiting from an incognito browser. If it requires you to be logged-in then of course it won’t work within Google Sheets either.

Check the data source permissions for query 37689 to make sure it’s part of at least one group.

Hi,

I am facing this issue when tying to export data from a redash application deployed into aws ecs instance and accessible trough cloudflare argo tunnel.
Is there any workaround to make it working with private instances ?

Thank you

Welcome to the community! IMPORTDATA is naive about where data comes from. It basically just runs curl <user provided URL> and loads the data. So if you can give it a URL that resolves, it should behave. AFAIK there’s no mechanism to make Google use a proxy for this curl. Although you could probably insert your own proxy to expose only certain URLs to the public internet.

Hi @jesse

I got the idea, thank you for your reply

Hi community, I’m adding a few queries to a report in Sheets through the IMPORTDATA() function and there are several that result in an error “resource at url not found”. I can’t find the pattern or reason for it. What could be causing this random error?