[โœ… Solution] Attaching files from webhook using base64 with multiple files

Hi guys,
We are migrating a records from podio with multiple files each record, i tried to use webhook from tape to migrate the files one by one, the problem is tape will only update the file attached with the newest file i tried to use attached files and select the id generated from base64 convertion still not working this is my automation image below

thanks

1 Like

Hi @comfreakph

Did you get a solution to this? I have come up against it in a slightly different way. I have built a workaround by making an attachments app and attaching each file to a single record in that app before relating them.

However, it would be great to add multiple files to the main record but it seems that the calculation overwrites rather than adds. I then tried building a variable with multiple file IDs to add at the same time (I had been looping) but that didnโ€™t work, then my head exploded hence the cheat with a separate app.

Hi Jason,
I did a same process since you canโ€™t add multiple files in 1 flow, so what i did i created new app called files library, import the converted files to that app and transfer it one by one in main app.

1 Like

Thanks, I guess at least we both solved the issue te same way.

It does seem a little crazy though and I keep expecting @Tim or someone to jump in with a really simple answer.

1 Like

Thanks for the mention @Jason, and also for assisting here with useful suggestions.

Indeed, looking at your screenshot, @comfreakph, there is one issue with your last action block assigning the โ€œFilesโ€ field. As you perform a calculation assignment, the new value will the value that your calculation yields. As you only provide the var_tape_file_id it only takes the new file and removes the rest.

An easy way around this would be to include your original variable if it exists and compose it into an array. That would look similar to this:

[...(collected_business_files_file_ids || []), var_tape_file_id]

This creates a new array with the existing file_ids and adds the new file id - the result should be all existing plus the new file being attached to the record.
Please double check the variable name ( collected_business_files_file_ids), as it may vary based on your app / field name. It is just important to use the file_ids variable of your existing field value of the collected record.

I hope that was comprehensible. Let me know if you have any further questions re. this approach.

Cheers
Tim

3 Likes