Skip to main content

I have an email automation set up so that when an attachment is added to a field, an email is triggered to a project manager with a copy of that attachment.

Currently, we delete the old attachments before dropping a new one in so you do not receive multiple attachments with the email that gets triggered.

Now with the new Versions feature, I want to keep the old attachments in the field but only have the latest attachment added to the email. Is there any way to limit the attachment field in the email automation to only the latest one that was added?

Oh ​@ACLATL that is interesting. Let me play around with it a couple of minutes and get back to you.

Mike, Consultant @ Automatic Nation


Hmm, as a workaround, try creating an attachment field called ‘Files to send’ or something and getting your automation to paste the latest version there, then send from that attachment field?  

In the gif below, you can see that the automation takes the latest version of the file and then pastes it into ‘Files to send’, and you can use that new field for your ‘Send email’ action

 

Here’s how the automation would be set up:

And you’d add a ‘Send email’ action at the end there

let {urls} = input.config()
output.set('url', urlsburls.length - 1])

 


Hey ​@ACLATL,

For further context, I recored this YouTube video for you.
 


It is very important that on your script you create a new input variable as shown on the image below.
 


Hope this helps, and feel free to reach out as needed if you need any help! I’d be happy to hop on a brief call.

Mike, Consultant @ Automatic Nation