Custom code to trigger a webhook alongside a click of the new action buttons? (getElementById / querySelector)

Hi builders, I am trying to figure out the IDs of the new action buttons so I can use custom code to trigger webhooks (in addition to opening the link as per open url of the action button); the following should work as far as I understand but currently does not yet work…

var button1 = document.getElementById(‘button1’);

I also tried querySelector (to be able to find the first of several buttons in one element) but its not working either:

var button1 = document. querySelector(‘#button1’);

thanks in advance for any pointers!


I will let @artur answer you as I didn’t check this already. But I’m pretty sure this wouldn’t be that simple, for example, with the CTA buttons I need to play with the Css pseudo class :nth-child()… (see an example here New - unofficial - feature: TABS - Hide/Show multiple blocks horizontally) or with button index.

1 Like

Hey folks I’m not sure we have added persistent selectors to those. I will ask the team to add so you can easily select them.

1 Like

@artur, any updates on this?

I am trying to solve for submitting data to a webhook upon action button click as well.

Any updates here?

thanks for your help in prioritizing this as the current new buttons are not very helpful for me without being able to select them with custom code…