Help

Re: Interface button to run a scripting block

Solved
Jump to Solution
3021 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrey_Kovalev
8 - Airtable Astronomer
8 - Airtable Astronomer

Hello everyone!

I ran into a problem which I currently have no idea how to resolve.

I have a script using an API call which logs the user into external system. This is not an automation script, but the script from a scripting extention. This is because fetch() function behaves differently and only passes authentication data when used in scripting extention. I can run the script pressing a field button in a grid layout.

Data grid:

2023-10-20_13h22_09.png

Now I need to provide the user with an interface button that would finally resulted with logged in state. But this seems not as easy as it can be imagined. It is not possible to directly call a script with a button action as it is only capable of running an automation script, not scripting extention.

Interface:

2023-10-20_13h25_05.png

However, using an interface button I can change the state of a checkbox field of the same record where the field button is, but I do not get the idea how to bind these two so when I tick a checkbox the filed button would be pressed. As far as I know a field button has no state feature.

So, any ideas how to workaround this issue? Your suggestions are very much appreciated.

PS: added some visuals

Regards,

Andrey

1 Solution

Accepted Solutions
ScottWorld
18 - Pluto
18 - Pluto

You’re welcome! 😀

Unfortunately, you have already discovered that there is no solution in Airtable, because extensions can’t be automated and extensions can’t be installed into interfaces.

Maybe Airtable will bring extensions to interfaces in the future sometime, but I haven’t heard of any plans for them to do that. 😪

But maybe somebody else will have some other ideas for you!

Another thing you can do is have your interface button open a Make webhook URL directly, which would then run your 0CodeKit code. This would enable you to bypass Airtable’s automations altogether.

I show how to do that in this episode of the BuiltOnAir podcast (although I show how to do it in the context of an email).

See Solution in Thread

5 Replies 5
ScottWorld
18 - Pluto
18 - Pluto

The only solution that I know of for this problem is to use external apps that support running full JavaScript code, such as 0CodeKit.

You would then use your interface button to trigger an automation script in Airtable, which then triggers a full JavaScript call in 0CodeKit.

However, I believe that Airtable’s automation scripts have a maximum time limit on how long they can run (and it is a very low amount of time), so you can actually have your Airtable automation script call a webhook in Make to perform your automation there, because Make has a much longer time limit (40 minutes) and Make also has full support for 0CodeKit.

I discuss how to call webhooks in Make in this thread.

@ScottWorld Thank you for your suggestion, but I hope to find the solution within Airtable. If I fail then I would consider the way you suggest. Thanks anyway for replying so quickly, this is valuable.

ScottWorld
18 - Pluto
18 - Pluto

You’re welcome! 😀

Unfortunately, you have already discovered that there is no solution in Airtable, because extensions can’t be automated and extensions can’t be installed into interfaces.

Maybe Airtable will bring extensions to interfaces in the future sometime, but I haven’t heard of any plans for them to do that. 😪

But maybe somebody else will have some other ideas for you!

Another thing you can do is have your interface button open a Make webhook URL directly, which would then run your 0CodeKit code. This would enable you to bypass Airtable’s automations altogether.

I show how to do that in this episode of the BuiltOnAir podcast (although I show how to do it in the context of an email).

Andrey_Kovalev
8 - Airtable Astronomer
8 - Airtable Astronomer

@ScottWorld Thank you for reminding me about make.com. It seems that I found a solution without running 0-CodeKit block. Hopefully, make has HTTP request blocks which I needed. And yes, I could eliminate some scripting in Airtable too.

ScottWorld
18 - Pluto
18 - Pluto

You’re welcome! Yes, here are all of Make’s HTTP request modules, which are very comprehensive and should cover everything!