Set up permanent attachment links
Open the Permanent Public URLs for Attachments automation in the workspace and base containing your files.
Under Setup, choose the Table and Attachments Field containing the files you want to link to.
Open Formula For Permanent URLs. Copy the formula into a new formula field in the same Airtable table.
Open a generated link from a record that contains attachments and confirm the expected file is shown. The supplied formula covers up to the first five attachments; the instructions below explain how to include more.
These are public file links, so share them only for files you intend recipients to access. If you replace an attachment, the cached file can remain visible for up to five hours.
Our Permanent Public URLs for Attachments automation generates individual URLs for each file in the attachment field. You can modify the index in the URL to access a specific file within the field. The index begins at 1. Here is an example URL.
https://web.miniextensions.com/api/public-attachments/l9v2rOh9nqDPG1z8OVzi/rec1xGA04dDbrQjxb/1
You just need to change the number at the very end of the URL to change the index, which will in turn give you the 1st, 2nd, 3rd etc. attachment in the field.
How to include links to several attachments in the same field
The automation provides a formula that will generate links for the first up to 5 files in the field. If your field may contain more than 5 files you can expand the formula as needed. For each additional file you need to cover, the block you add to your formula would look something like this (this example shows the 6th link):
& IF(IF(fldRTREhdsGaNTu4H=BLANK(), 0, LEN(fldRTREhdsGaNTu4H)-LEN(SUBSTITUTE(fldRTREhdsGaNTu4H,",",""))+1)>=6, ' https://web.miniextensions.com/api/public-attachments/35E6eQgFZsEVHolixH1T/' & RECORD_ID() & '/6')
To expand your formula, simply copy the appropriate block from the formula generated by your automation (not the block from this example) and replace the number 6 highlighted in bold above with the number of the attachment you want to link to. Say, if you have up to 10 files in your attachment field, you'd add this block five times to the end of the pre-generated formula, replacing the index with 6, 7, 8, 9, and finally, 10.
What is the impact on existing URLs that do not include the index?
If the URL does not include the index number, it will function as before and display the first file in the attachment field. You can just add the new parameter in your existing URL if you want to change it to another file in the field.