How to use button function linked with a webhook for generating contracts or invoices

I’ve given it a test and it works wonderfully :tada:
What’s especially key is that I’ve managed to set up a fail-safe mechanism. This is crucial because, in Airtable, I frequently use such a button linked with a webhook for generating contracts or invoices, and it’s important to guard against unintended clicks.

Here’s a guide for others on how to do this:

  1. First, add a checkbox field (a boolean in Baserow). I will name the field ‘Check’. You can use any other name you need)

  2. Then, create a formula field using this example:

    IF(field(‘Check’),
    button(‘http://google.com’, ‘:rocket: rocket launch’),
    button(‘’, ‘:rocket: rocket launch’))

    Feel free to replace ‘http://google.com’ with any URL you need. I use a webhook URL here to trigger actions in n8n. And button text of course)

  3. When the checkbox is unchecked, the button stays inactive. Once checked, it becomes active – a very convenient setup. In n8n, after completing the necessary logic, I include a step to uncheck the checkbox automatically, deactivating the button.

This approach ensures the button is only active when needed, minimizing the risk of accidental activations.

In the screenshot below, you can see that the buttons next to the unchecked checkboxes remain inactive.

4 Likes

Hi @Alexander,

Thanks for sharing this flow.

I’m looking to do something similar…
Could you please elaborate on how you structured the webhook request in the button link?

Thanks,
Dominic

Hi! Sure!

:one: Always active button with webhook:

button(CONCAT(‘https://n8n.my.server/webhook/cd19bfac-7f0c-4bd6-baf2-7c1095087144789321?database_id=77&table_id=232&record_id=',field('Row(ID)’)), ‘:radio_button: BUTTON :radio_button:’)

:two: Button with webhook active only then a checkbox field is on.

IF(field(‘Activate buttons’), button(CONCAT(‘https://n8n.my.server/webhook/cd19bfac-7f0c-4bd6-baf2-7c1095087144789321?database_id=77&table_id=232&record_id=',field('Row(ID)’)), ‘:radio_button: Create oferta :radio_button:’), button(‘’, ‘Create Oferta’))

it will look like this:

Did I manage to answer your question? Or you need some more specific info?

1 Like

Hi, Alexander!

I’m trying your approach, used this formula:

IF(field(‘Check’),
button(CONCAT(‘https://google.com’, field(‘Check’)), ‘:white_check_mark: Working’),
button(‘’, ‘:cross_mark_button: Not working’)

However, I cannot achieve a “greyed out” look/state as on your screenshot.

How did you do it?

I can confirm the same behavior:
Buttons without a link text are not greyed out anymore.
Could you please take a look into it?
@olgatrykush

1 Like

Hey @kuechleo, I’m not sure I understand the issue. What exactly isn’t looking the way you want it to? :eyes:

If you look at @Alexander 's picture, the buttons without link are greyed/deactivated.
If you take a look at @Georgy 's picture, you can see that the buttons without link are no longer grey. They appear as normal buttons (but if you press them, nothing happens).

I would expect buttons without a hyperlink should be grey.

1 Like

Hey @kuechleo, I see what you mean now, thanks for explaining!

I also did a quick test, and you’re right — that’s how it works at the moment. I’ll check with the team whether we want to change this behavior. :slightly_smiling_face:

1 Like

Dope!

Though it was different, strange that it changed.

Yes, I also remember it being different before. Must have been killed in one of the releases in between.

1 Like

Hey @kuechleo and @Georgy, I checked this with the development team, and it looks like this is a regression bug.

We’ve created an issue to track and fix it: Button formula function does not appear disabled when link is empty · Issue #5574 · baserow/baserow · GitHub

Thanks for pointing this out :raising_hands: