Hi all, I’ve just updated my doc that enables you to get json data given a url. Now it supports POST and PUT requests. You need to provide the body and headers as json objects in the respective columns.
You can integrate it into your own doc just by copying and pasting the Main and Engine sections.
All instructions inside the doc itself: Fetch JSON v3
Original thread:
Let me know if it worked for you.
Updates
v3:
Added option to stringify body. (Some APIs need it, some don't).
Fixed time outs and treated exceptions. Much more reliable now.
v2:
Added POST support
Cool use of Google Apps Script to do the dirty work of hitting the external endpoint! We hope to have something like this native to Coda in the future, but it requires a bit of work to implement in a secure way (something that Google Apps Script has already built).
@Dalmo_Mendonca thanks for this information. I want to integrate my doc with a third party app and I have a question I was hoping you could kindly answer. The app I’m trying to integrate with, has a header authentication. They ask for Authorization: SECRETKEY (secretkey being the API).
Can I include this in the Main section under headers? If so, which is the format I should use to insert Authorization: SECRETKEY?
Hi,
First of all, I want to thank @Dalmo_Mendonca for creating this DOC. It’s really cool. I’m using it and it works beautifully.
I always try to understand the inner work of docs like this, so I can learn.
What caught my attention was the formula of “Check and Update” in the Engine Table.
Instead of:
There’s no difference really how you enumerate columns in a ModifyRows. It can be TableName.ColumnName or thisRow.ColumnName if you’re modifying thisRow. It works either way. I suspect that’s because the code is only looking at the column ID part of the reference.
I’ve noticed that autocomplete suggests thisRow.ColumnName in thisRow.ModifyRows() context.
Hi @Paul_Danyliuk.
Still I find it very confusing specially for people who are learning.
ThisRow.column is not a column at all and you shouldn’t be able to use it in this case, at least from my standpoint.
The funny thing is the [View of a table].Column is a column and you can’t use it as argument for ModifyRows. It took me a while to learn that.
We don’t have anything to share on this front with regards to changes in Coda, so you’ll have to continue to rely on an external system like Google Apps Script to do the heavy lifting.
Trying to use this, but I’m consistently getting the error:
Request failed for https://coda.io returned code 404. Truncated server response: {"statusCode":404,"statusMessage":"Not Found","message":"Not Found"} (use muteHttpExceptions option to examine full response)
at updateRow(Coda:376)
at doGet(Code:109)
Not sure what the issue is, just wanted to report the failure. I have tried twice to follow all steps from the beginning to make this work.
Yes.
I just followed the instructions.
Mine is heavily modified to fit my needs now.
I can’t really help you more than that. I only have basic knowledge of JavaScript and API.
Sorry about that.
Hi @cnr, I’ve never attempted to run @Dalmo_Mendonca’s code so I’m not sure why you’re getting a 404. You’ll need to make sure you’re running the latest version of the Google Apps Script library though, per instructions on https://coda.io/api. It’s possible that the original one is still hitting the old v1beta1 endpoints.
adding to @Irfan_Khan and @cnr that I too am getting a 404 on every try. Followed directions from doc (apiKey, token, project URL, etc). Anything else to check?