Feb 21, 2024 12:02 PM
Dear Community,
I hope someone can help me with the following issue...
I have an automation sending out an email for a record ("shipment" table) with attachments.
The attachment(s) come by lookup from my "inventory" table.
Now, as some inventory items may have the same attachment (eg. an invoice covering several inventory items/lines) I consequently get several same attachments pulled to the "shipment".
How can I tell airtable or my automation to ignore files with same filename when sending out email for a record ("shipment" table) with attachments.
It's hard to explain, but I hope someone will see my issue. 🙂
Kai
Solved! Go to Solution.
Mar 09, 2024 01:00 AM
Dera Lom,
at a first glance this is exactly what we I need. If that works as described then we are golden!!! Let me have a closer look ... :excited: ...
K
Mar 09, 2024 10:32 AM
Okay, in principle the script does what it should do: it creates the unique attachment(s) in a separate attachment field. So far so good. Opening up the field and view the unique attachments online with the Airtable viewer is okay, BUT the created files come without file extension, eg. ".pdf", and that's causing inconvenience when attaching to an email by automation. I guess you see what I mean. May you amend the script to keep the initial file extensions?
Thanks a million!
K
Mar 09, 2024 10:55 PM
Hello @Kai_Muscher! Thank you for your purchase and your invaluable feedback!!
The script has been amended to keep the initial file extensions as you requested. Please regenerate your script so that you have the new functionality! You can do so here: https://www.lomlabs.io/airtable/scripts/unique-attachments
Thank you for your support and let me know there is anything else I can help you with 🙂
Mar 10, 2024 07:01 AM
Hi! That's it. Thank you so much!
Just one little thing: is it possible that I cannot run the script and send out the email with attachments within the same automation? It indeed creates the uniqueAttachements but somehow same are not attached to the email which is being generated by 2nd action, right after the script being executed. If I run a separate automation to generate the email with attachments then everything is fine as it looks like.
Automation looks like this:
TRIGGER: When a button is clicked
Action#1: Run a script
Action#2: Outlook - send an email with attachment(s)
Action#3: Update record
Best regards,
K
Mar 11, 2024 05:02 AM
Hello @Kai_Muscher ! Please add a Find record action that looks for your original record below the Run a script action and then utilise the record data from that Find record action in your Outlook - send an email with attachment(s) action!
New automation:
TRIGGER: When a button is clicked
Action#1: Run a script
Action#2: Find record
Action#3: Outlook - send an email with attachment(s) utilising the record data from the Find record action
Action#4: Update record