Hi Pesan. Sorry for my slow reply - didn’t notice your comment here.
From looking at your screen snip, I can’t see a column for the sharing link for the folder you want to open. I would suggest adding a ‘Folder URL’ column, and then using the following formula in your ‘Open’ button:
Note the “xxxxxxxxx” above should be replaced with the unique identified for your webhook.
The formula above effectively says “If we don’t have a folder URL, then fire a webhook to create a folder, and include in the webhook the Order ID so that Integromat can find this row via the Coda API. Alternatively, if we do have a folder URL, then open the link in a new window”.
Once your Integromat scenario has created a folder and retrieved the sharing link for that folder, it will need to update the row in Coda, to populate the link URL in the ‘Folder URL’ column. To do that, you will obviously need Integromat to look up the relevant row in Coda, using the Coda-generated row key (your ‘Order ID’ column) which you passed to Integromat in the webhook as ‘RowID’.
@Kepler_Liu this is a great idea. Have you run into any trouble with it? Does it work reliably? I guess you need to kill the Image at some point in your chain (maybe via API) so your endpoint doesn’t get hammered with the same info every time someone views the row.
That trick to close the tab is killing! Loved it!
I’m currently building a few integrations with integromat, to connect Coda with a Lead Management System and that tab hanging there was killing me!
If you’re having trouble with getting the window/tab to close, it’s because of browser standards. That’s likely why different people are getting different levels of success with the methods mentioned in this thread. I’ve been trying to find a workaround with no success.
Here is the error I’m getting in the Chrome browser console: “Scripts may close only the windows that were opened by them.”
Since Packs run on Coda’s servers they won’t be able to access your local machine directly. That said you could use a tool like ngrok to expose a local server to the internet, and then have your Pack connect to it there. Of course exposing your local computer to the internet comes with some risks, so proceed with caution.
An alternative approach may be to setup a cron job (or equivalent) on your local machine that uses the Coda API to fetch information from a Coda table. Your button could merely add an entry to a “Jobs” table, and then every few minutes the job on your local machine checks the table for new jobs it should run. The button wouldn’t be quite as instant, but it would be safer since your local machine would be reaching out to Coda, instead of Coda reaching into your local machine.
Hi Eric, thanks yea would rather not go the ngrok approach, it’s also fairly complicated by nature. The table fetching idea seems like a very reasonable workaround but yes there would be some delay. Thanks for your suggestions.