Help

Re: Using Scripting Block to push a webhook on button click

4233 6
cancel
Showing results for 
Search instead for 
Did you mean: 
dave_brand
6 - Interface Innovator
6 - Interface Innovator

Hey, is it possible to create some Action Buttons to push webhooks with json data with the scripting block?

39 Replies 39

Since the button is an object in the record, clicking the button is tantamount to selecting the record. If the script is properly designed, you should not have to first select the record and then click the button.

If this were the case, why is there a button, a control that requires the user to invoke its connected actions?

If you want this to be magically automated, at the very least you should be using a script automation (which is designed to run automatically), not a script block (which requires manual invocation).

And given that this data is to be sent to Integromate anyway, why not eliminate all this script stuff and simply instrument Integromat to pull the data from these Airtable records when conditions warrant? I think @ScottWorld would agree - lacking more details, you appear to be going around the barn twice to get to the door.

@Bill.French is correct, as always!

@Kai_Dickas All you need to do is click once on your button to send your Record ID to Integromat, and then continue your automation from there.

You simply add the record ID as a parameter to the end of your webhook URL.

@ScottWorld - Kai’s complaint is the very existence of the button itself; would rather have it all automated as near as I can tell from the message.

Oh, I see, then that can be automated through a script in an Airtable automation, that could be triggered by any matching condition.

Once again - no. :winking_face:

… i have a button which starts the script. I was expecting that the script runs automaticly and the record id pushed to integromat.

The button/script – as I understand it - sends data to Integromat when conditions warrant. What’s wrong with that picture?

The button, the script, and the process in Airtable should be entirely eliminated because Integromat is fully capable of (a) detecting the conditions, and (b) acquiring any data it needs to do whatever @Kai_Dickas needs to accomplish in Integromat.

@Bill.French, once again, there are many different ways that he can accomplish his goal. Button, no button, script, no script. It’s all good.

This user expects the process to run automatically which makes me ask - why do you believe a button is all good?

In my view button bad. Furthermore, the data is needed in Integromat; so why not do it all in Integromat?

Ultimately, we have no clue what Kai is doing with a record ID in Integromat, but the requirements expressed seem to suggest a far simpler solution is possible.

Because there are 3 different types of timing scenarios going on here:

  1. IMMEDIATELY/MANUALLY: A button would trigger the scenario immediately in Integromat, because webhooks are processed immediately in Integromat. Whenever he manually clicks on the button in Airtable, it would immediately trigger the scenario. No delays.

  2. DELAYED/AUTOMATED: If he wants Integromat to “watch Airtable” and “automatically trigger” when certain conditions are met, “watching records” takes place on a schedule in Integromat. This schedule is based on the Integromat pricing plan. On the Free Plan, Integromat triggers once every 15 minutes to look for all new changes that have taken place in Airtable (or search for matching records, or whatever he would like to happen when “watching records”). On the Basic Plan, it’s every 5 minutes. On the Standard Plan and above, it’s every 1 minute.

  3. IMMEDIATELY/AUTOMATED: If he uses an Airtable automation to trigger when a condition is met, then the Airtable automation can automatically & immediately run a script which then triggers an Integromat webhook — which would then take place immediately. So this would be the fully automated, fully immediate solution.

p.s. For #3 above, I’m assuming that scripts can trigger webhooks. I don’t know if scripts can do that. Someone would have to let me know if that is possible.

Good point - but, this is entirely possible without a button, right?

  • Data condition causes record to flow into a view, triggering immediate script automation
  • Data change causes immediate script automation

Another good point - once again, no button, no script required. It’s simply a requirements question at that point - e.g., how latency-tolerant is @Kai_Dickas?

Yes - they can. No worries.

BTW, that three-point summary is the perfect outline for a hot tips video. :winking_face: