Exporting embedded files

Hello, how do I proceed when I want to bulk download embedded files from Tabidoo.
Example: new records are created in Tabidoo that include a photo. The photos are saved in a File type entry so that I take a photo on my mobile phone and save 1-n photos in this entry. However, I don’t know how I can bulk download these photos from Tabidoo and at the same time name these files as needed.

Thank you. Milan

Hey, Milan,
there are several ways to get files from Tabidoo. It depends on how you want to work with the data - i.e. whether you want to get the data through the Tabidoo API, through integration platforms like Make.com, or whether you intended to download all the record attachments through the Tabidoo UI.
Can you specify what the purpose is? We will then be happy to advise you on the best method.

With kind regards,
Tabidoo

Hello, thank you for your response, I would like to use the Tabidoo environment to download files in bulk + at the same time I would like the downloaded files to be automatically renamed to names composed of some items of the table in which the files are located. For example, the table contains a Name field, the file will then be named with the value of the Name item + the date the file was created.

M.

Hello, may I ask for an answer? Thank you very much. Milan

Hello,
I do not think Tabidoo support this functionality.
Regards
Michal

Hello Michal, what does Tabidoo not support, bulk downloads of embedded files or downloads associated with renaming embedded files? What are the options then?

Thank you very much. Milan

Hello,
It is not possible to download all attachments at once. However that functionality is in our Roadmap, so it will be implemented later (I have no term yet).
Auto-renaming during download is something we haven’t discussed yet. We have no other customer to ask for that. Maybe using js script in client workflow (trigger = button) can help here.
Best regards
Michal

Hello Milan, here is a generic script that (with some modifications) you could use to download all files from selected records. The fileFields array contains the field names of files you wish to download.

const fileFields = [‘document’, ‘document_1’, ‘document_2’, ‘document_3’]
const record = await doo.table.getRecord(‘table’, doo.model.id);

for (const fileField of fileFields) {
    let fileInfoArray = record.data.fields[fileField]?.map(file => ({
        url: file.fileUrl,
        name: file.fileName
    }));

    if (fileInfoArray) {
        for (let fileInfo of fileInfoArray) {

            const anchor = document.createElement("a");
            anchor.href = fileInfo.url; 
            anchor.download = fileInfo.name;
            anchor.target='_blank';

            document.body.appendChild(anchor);
            anchor.click();
            document.body.removeChild(anchor);

        }
    }
}

This script can be run in a workflow, trigger Button, action Loo. When you select the option Iterate main grid, it will download all files from selected records. Just be careful, if you don’t select the option Iterate main grid, it would download all files from all records.

Hope this will help you, or anyone else who would need to download multiple files from multiple records.
Anna

1 Like