Once you have your urls working, you may want to download the file from the URL into an attachment field in Airtable using an Automation.
This is not a solution to bulk generate files.
Create the Automation
You will likely find that trying to download a file the first time its generated will take too long - and the download will fail. So make sure to add both steps below to your automations.
Step 1 : Start the Rendering
Run a script before trying to download the file - to make sure the automation waits until it’s rendered.
You will need to create an input variable called url with the value from your formula field with the url.
let {url} = input.config();
let apiResponse = await fetch(url);
let data = await apiResponse.text();
Step 2 : Download the File
Once rendered, Airtable will be able to download it from the same url.
Test the Automation
Now when checkbox is checked, it runs the automation and downloads the file. The url is tied to the modified time on the record, so if the record changes - clicking and then clicking again will cause it to rerender with the new data.