Programatically click a button

575 5
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast

I am new to Airtable. I am trying to do one automation which is as follows.

I have a table named "(OMS) Invoices" having 2 newly added columns which I want to use for this automation.

First Column name is "Generate Invoice" which is a button with following configurationScreenshot 2024-06-13 090058.pngScreenshot 2024-06-13 091148.png

Second Column name is "Invoice PDF" which is an attachment.

Manually when the button in "Generate Invoice" is clicked it loads an extension "Invoice" and performs the action as mention in button configuration "Open in Page Designer". This populates all necessary values in invoice PDF from airtable table "(OMS) Invoices".

Screenshot 2024-06-13 090236.png

What I want to automate is, whenever "Status" is changed to "Order" in "(OMS) Invoices", it should programmatically click button inside "Generate Invoice" so that it loads up the extension with invoice pdf having values. Further to that this PDF will be saved in the "Invoice PDF" and then emailed to the customer associated with that Invoice.

Is this possible by using ONLY AIRTABLE INHOUSE AUTOMATION? Maybe using scripting, APIs or any other way to do that?

I tried scripting, but unable to understand how to define and invoke click event for the button inside a cell.

I am aware of how to do this via Zapier or 3rd party tools, and I am not looking for that route. Maybe other route I am thinking is google docs or sheets to design any template to populate these values and then process further. 

Any help in this is highly appreciated.

5 Replies 5

Hello @tusharbjobs 
First of all, you need to understand the difference between an extension script and automation with script.

Extension Script are running on our browser and used our computer resources. It's always run based on manual start(input) or using button click.
Automation scripts are run on Airtable server based on some perticular actions( add, update. change, etc).

In your usecase you've used Page Designer for create invoice and then use button to open it. Generate invoice button just show you page designer on extension panel, It's not able to generate PDF and save it. You need to print that(as PDF) invoice and then upload.

If you need to save PDF as automatic then use craftmypdf.

We can't automate the Page Designer extension currently, so a third party tool's the only option I'm afraid.  I like DocsAutomator; integrates directly with Airtable and usable via Airtable Automation scripts:

Thanks for your response Dilip.

A follow up question -

1. Yes, the extension won't save PDF automatically and it has to be done manually for sure. I want to understand if programmatically clicking of button inside "Generate Invoice" is possible via run script action in airtable automation so that it loads up the extension with invoice. From your explaination I understand, it can not be as it is an external script which needs to be triggered manually. Correct me if I am wrong.

2. I am aware of craftmypdf, but I wish to not use any external apps here. So I am trying to understand if there is a way this can be achieved using airtable scripting again in actions of automation.

Hello @tusharbjobs ,
No, till now extension script button doesn't have any connection with the automation run.

Automation always runs based on add, edit or on specific record conditions. Button actions are still not supported by the database side. 
When you're on the interface side it has a button action control to run automation but still, there are no specific functionalities that can able to generate PDFs.
It would help if you used an external tool with an airtable script OR external automation(zapier, make) to generate and save a PDF.

Check this if you plan to use craftmypdf

Thanks again Dilip for clearing this up.

I will rethink on this. 🙂