Let's say you have an attachment field in Airtable where you are using the Versions feature.

You upload the first version of a document, then someone makes some changes and you upload version 2, followed by version 3.

You want to keep all of those versions in Airtable so you have the complete history.

The problem comes when you want to send the latest version through an automation. You don't want to send all the previous versions. You only want the person receiving the email to get the latest one.

One option is to delete the previous versions before sending the email, but then you lose the version history.

Instead, you can use a small script to get the latest version, copy it to a separate attachment field, and use that field in your email automation.

Airtable automation that selects the latest attachment version and sends only that file by email

Create a field for the latest version

First, keep your existing attachment field with all the versions.

Then create another attachment field. You can call it something like Latest Version.

This field will only hold the latest file that you want to send.

You also need something to trigger the automation. For example, you can add a checkbox called Send Email. When you check it, the automation runs.

The workflow looks like this:

Checkbox is checked → Get latest version → Add it to Latest Version → Send email

Get the latest attachment version

Create an automation and use your checkbox, status, button, or whatever makes sense for your workflow as the trigger.

Then add a Run a script action.

Create an input variable called urls and map it to the attachment field that contains all your versions.

Add this script:

let { urls } = input.config();
output.set("url", urls[urls.length - 1]);

The script takes the list of attachment URLs and returns the last one, which is the latest version.

You don't need to change anything in the script as long as your input variable is called urls.

Add the latest version to the new field

Next, add an Update record action.

Select the same record that triggered the automation and update the Latest Version attachment field.

For the attachment value, use the url returned by the script.

Now you have two attachment fields.

Your original field still contains all the versions you have uploaded. The Latest Version field contains only the newest one.

Send the latest version by email

Finally, add a Send email action.

Instead of adding your original attachment field to the email, use the Latest Version field.

Now when you trigger the automation, Airtable gets the latest version, adds it to the separate attachment field, and sends only that file in the email.

Your previous versions stay in the original attachment field, so you still have the complete version history in Airtable.

Once everything is set up, all you need to do is trigger the automation whenever you want to send the latest file.