Webhook File Upload

Hi there :slight_smile:

I want to set up a webhook, where I can receive files as well.
Use Case:
Apple / Siri Shortcut, where I can use the “Share” Option to insert rows in my Todo table.
For strings no problem, but files (small screenshots for example) time out.

Is it possible to upload a file to coda via webhook?

Thanks :slight_smile:

1 Like

Solution:

Host it on another public URL first, like here:

Then you can use either the coda API or the webhook directly, with the URL as value:

In the shortcut like:

Unfortunately, the “Get link to File” Action from Apple, which should give you a public URL, only gives you a URL where you need to click “download” in order to get the real link to the actual file…

Now I gotta find a not super-complicated way to host files temporarily :smiley:

Update for a fully working concept:

The simplest way to upload a file to a public path seems to be Dropbox:

imageo

then provide the file link to coda, by appending, ant therefore overwriting (or changing) the dl=0 to dl=1, like this:

image

1 Like

I’ve been suggesting the same for a few years now. Actually three years.

Ideally, Packs would address many use cases if they could provide an Express-like web server with a small filesystem. But, lacking this, Replit is ideal for doing this in concert with the Coda API.

1 Like

Hi, @Bill_French2 . Could you please elaborate on this? I’m not familiar with Replit but I 'd love to learn how you do it.

Hey thanks @Bill_French2 for your response!
I’d agree 100%… for some cases, I can use npm dependencies and create and publish the pack locally.
For creating ZIP files for example, it took me quite a few hours, until @Eric_Koleda demonstrated on how to solve it, by patching the dependency to remove parts that depend on a runtime, that coda doesn’t provide (thanks again for that).
But in other use cases, e.g. where I need to crawl a website, that requires a client side javascript runtime, like e.g. clicking a button to toggle the existence of a DOM element, then there’s codas limit.

Thanks for refering to Replit, when I logged in I saw that I already used it 4 years ago, but for a completely different reason :smiley:
I’ll look into it again, this could be a good compromise.

Alternatively I’ll take time one weekend to set up a repo with CICD and Google Cloud / AWS Deployments to solve this issue.

But honestly, with these alternatives, the complexity doesn’t end, and it requires regular maintainance… I hope Replit can abstract this, I just want to click click, add my code, click click again and done gg.

I Google search turned up this free API for temporarily hosting files: https://tmpfiles.org/. They don’t have a privacy policy, so use at your own risk, but it seems like a low-effort way to host some files temporarily.