Help

Re: Temporary filename of PDF after upload

Solved
Jump to Solution
1747 0
cancel
Showing results for 
Search instead for 
Did you mean: 
jacedh
5 - Automation Enthusiast
5 - Automation Enthusiast

I have an automation that handles bulk uploaded PDF-files, with logic that extracts an ID-number and date from the filename. It then copies the attachment to a record with matching ID in another table. It also checks a checkbox on the original record of the uploaded PDF to mark it as complete and avoid multiple runs.

The automation runs fine, with just one weird "bug": The filename of the copied attachment changes to a random string "XxxxXxxxXXXx". However, if I now delete the copied attachment and go back to the uploaded file record and uncheck the "completed" checkbox to trigger the automation again, the file is copied with its original filename kept!

I suspect the reason is related to the automation starting to work before the file has been fully processed by Airtable, and some kind of temporary name is used. But this is also contradicted by the fact that the automation relies on data from the filename to be extracted before it can run...

My first idea was to add a delay to the automation, but there doesn't seem to be a way to add a short delay (less than 1min) without external services or "hacky" scripts, which I'd like to avoid...

Would love to hear some of your thoughts on this, maybe someone has encountered something similar? 

1 Solution

Accepted Solutions
Alexey_Gusev
13 - Mars
13 - Mars

Hi,

I think you should dig into run history to find a cause, but instead you can just change the trigger to the checkbox field, remove 'fill checkbox' step and do it manually (you can check whole column by pasting '1')

See Solution in Thread

2 Replies 2
Alexey_Gusev
13 - Mars
13 - Mars

Hi,

I think you should dig into run history to find a cause, but instead you can just change the trigger to the checkbox field, remove 'fill checkbox' step and do it manually (you can check whole column by pasting '1')

Hello!

I'm not able to see anything in run history that looks wrong, there are no error on the runs that end up with wrong names. I think this can be considered a bug.

I tried your solution with an additional checkbox to trigger the automation. It's an extra step that I would like to avoid... But just waiting a couple of seconds after the upload is complete results in the correct name being set on the copied attachment! So this will have to do until the bug is fixed or I find a more elegant solution.