External data (API, Scripts

Hello All,

I have a back-end for different mobile applications. (AWS, GCP, and MongoDB)
I would like to collect data from those DB to sync it in Coda and use CODA to centralise, do some analytics, …
At the moment I am doing it in Airtable I wonder if it is possible in Coda ? (without using zapier, …) and use the API I have done on the different system.

Thanks
Alex

Hi @Alexandre_Husset, yup you can get data into a Coda doc using the REST API. You could write a serverless function to pull data out of your backend and into Coda.

hello,
thanks for your answer. I understand that for the rest API and the serverless function.
I wanted to know if there is a way to do it directly from a doc.
l have an application that is working with a backend and rest APIs. I would like to click on a button in a doc and in action I would like to call my API and then process the result.
is it possible in coda ?

Hi @Alexandre_Husset, you can’t write the script in a Coda doc, but if you have a 3rd party rest API you want to call with a button click, you could just have a button that opens a hyperlink (with that hyperlink calling some function you host somewhere else). The “processing” would not happen in a Coda doc–it would just be wherever your function is hosted.

thanks,
I do not see exactly how I can do with my authentification, … but I will work on it. If you have any exemples it would be great.
Then I will need to solve the way I can process the json that I have in return.

Alex

1 Like

This example might not be exactly what you’re looking for, but may spark some ideas. If you scroll down to the bottom of this doc I created on syncing data from Peloton, you’ll see how to set up a Cloud Function on Google Cloud Platform. I happen to use Cloud Scheduler to call the URL to update my Coda doc, but you could just put that URL in a button in Coda.

The caveat is I allow unauthenticated calls to the URL since it’s just a personal use case. You’ll have to customize this based on the authentication and permissions for who can call the URLs you set up on your hosting platform.

1 Like