Help

Re: Automatically copy attachments between fields when one is updated

Solved
Jump to Solution
809 0
cancel
Showing results for 
Search instead for 
Did you mean: 
bedjik
6 - Interface Innovator
6 - Interface Innovator

Hello Community, 

I need help with one task that should help us save lots of time. We have two tables with attachment field in both tables. One table is called Appointments where we upload an invoice in the attachment field called "Invoice" and another table is called "Contacts" where we store all invoices in the field "All Invoices" for a certain contact. What we are trying to do: When an invoice added to attachment field in "Appointments", we want a copy of this invoice to automatically go to a dedicated attachment field in "Contacts". 

When I try Gemini AI help, the answer was like this: Airtable doesn't currently offer a built-in way to automatically copy attachments between fields when one is updated. However, you can achieve this using a combination of scripting and automations. Here's a general approach:
1. Create a script that loops through the updated record's attachments and copies them to the desired field.
2. Set up an automation triggered "when a record is updated."
3. Within the automation, use a "Run a script" action to execute the script you created in step 1.
This way, whenever a record is updated and the attachment field is modified, the script will automatically copy the attachments to the other field.

My question is this, is it possible to execute when fields are located in 2 different table and if yes, can someone help us to create a script for this automation? Thank you in advance for your help

2 Solutions

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Hmm, you don't need a script for this and can just do it with automations:

Screen Recording 2024-07-23 at 5.29.05 PM.gif

Screenshot 2024-07-23 at 5.31.24 PM.png


Link to base

If the contact has no existing invoices, we just update it with the attachment from "Appointments":

Screenshot 2024-07-23 at 5.31.51 PM.png
If they do have existing invoices, we append:

Screenshot 2024-07-23 at 5.32.14 PM.png



See Solution in Thread

Yeap, sure!  Here are some screenshots:
Screenshot 2024-07-24 at 10.14.01 AM.png

Screenshot 2024-07-24 at 10.13.52 AM.png

Screenshot 2024-07-24 at 10.13.40 AM.png

If you're still facing issues just DM me an invite link to your base and I can sort it for you real quick

See Solution in Thread

3 Replies 3
TheTimeSavingCo
18 - Pluto
18 - Pluto

Hmm, you don't need a script for this and can just do it with automations:

Screen Recording 2024-07-23 at 5.29.05 PM.gif

Screenshot 2024-07-23 at 5.31.24 PM.png


Link to base

If the contact has no existing invoices, we just update it with the attachment from "Appointments":

Screenshot 2024-07-23 at 5.31.51 PM.png
If they do have existing invoices, we append:

Screenshot 2024-07-23 at 5.32.14 PM.png



Hello and thank You for Your help, I managed to recreate all the steps that You showed, except for the last one, Otherwise Update Record in the section fields. See the screenshot please. So, my Attachments field is called "DC" and I inserted it into the "Fields". I was not able to recreate you last one which says "List of All Invoices'List of ExpiringD...", can you please specify the path how to select this option. 

I tried the automation, it works (thanks to You), but  what happened is: if the field "All Invoices" is empty, it copies the invoice without any problem, but if there is already an old invoice, it replaces it with the new one. But I need to keep both. Thanks again for your help

Yeap, sure!  Here are some screenshots:
Screenshot 2024-07-24 at 10.14.01 AM.png

Screenshot 2024-07-24 at 10.13.52 AM.png

Screenshot 2024-07-24 at 10.13.40 AM.png

If you're still facing issues just DM me an invite link to your base and I can sort it for you real quick