Estudio Looker con Coda

API, Workflows, InteI am having problems using the api to collect the data from the table for example I have a table called albaram which I want to use the data to create a graph in looker studio, I have several problems the first is the continuous 404 error that gives me the use of the api to get the data from the table, I run this scrip(not real data)

import requests

api_token = '...'
url = 'https://coda.io/apis/v1/docs/rrr_drtvyP0oHjW/tables/albaram_tudrn/'

headers = {
    'Authorization': f'Bearer {api_token}',
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Error en la solicitud: {response.status_code}")

grations and all things built on Coda

Hi @sergio_cerrato_gonzalezz - Welcome to the Coda community. I don’t see anything wrong with your code, but a 404 could indicate that perhaps the token you are using doesn’t provide access to that document. Or perhaps that a table with that name wasn’t found in the document. It may be worth trying some other API endpoints to see if that can help narrow down the problem.

hello, @Eric_koleda thanks for replying to see my ultimate goal is to design a button that allows me to select the table within my document as first intent, that way I can choose one of several tables within the document.
Next I would like to know if it is possible to read the table, I have seen that with the coda api the information has to be translated and search fields by fields, and that is counterproductive, my idea is to be able to read the whole table and send it, I have not seen any information to integrate the looker studio api with coda.
I’ll tell you my ideal workflow:
I select table >> Albaram(for example)>> button to read and send to looker studio >> In looker studio have that table to be able to work with that data.
Any information is important, any data that you can give me would be of great help, thanks in advance.

As far as I can tell, Looker Studio can’t consume data straight from an API endpoint.
I have a few projects that does that, but I use Google Sheets as data source for those dashboards.

So, as I see it, the trick is to connect Coda with a Google Sheets Spreadsheet and use that as data source in Looker.

There is a connector to do just that: How to sync data between Coda docs (and Google Sheets) using Google Apps Script
And you can set up triggers to run the update action periodically, so you data source is always up-to-date.

You can now use the official Google Sheets Pack to sync data. It even allows two-way sync.