Help

Re: How to remotely run an extension

31 0
cancel
Showing results for 
Search instead for 
Did you mean: 
blopez
4 - Data Explorer
4 - Data Explorer

I need to automatically trigger a script that makes use of `Field.updateOptionsAsync`to add options to my single-select field. I first wrote this as an automation script so I could easily set up a trigger, but saw this API is only allowed in scripting extensions. So then, I wrote it as a script extension and couldn't figure out how to automatically trigger it to run. So then I found out about block-cli and released the extension to my base because I misunderstood that `block run --remote` does not run the extension remotely, leaving me with 2 extensions that do the exact same thing. So:

  1. Is it possible to run extensions remotely / trigger them to run automatically? How so if it is?
  2. Can we get the ability to use `updateOptionsAsync` in an automation script?
  3. Is there yet another way to achieve what I am trying to do?

 

2 Replies 2

Hi,
I'm not sure it's the best workaround for this, but I described how I solved the problem HERE.
In short, automation can add option when you update record with the new value. So I did dedicated automation for this, triggered by webhook.

re: Is it possible to run extensions remotely / trigger them to run automatically? How so if it is?

Not at this time I'm afraid

---

re: Can we get the ability to use `updateOptionsAsync` in an automation script?  Is there yet another way to achieve what I am trying to do?

Kind of; we can create new options via a POST / PATCH call within an automation script to the same base.  This exposes your API key to anyone who has access to the base though, and you also can't set the color of the option either