I am stuck with my first Workflow with n8n when uploading Files to Airtable.
I would be very happy about help or hints.
What I want to achieve:
Incoming emails have several attachments, only the PDFs should be saved in Aritable in one cell. I don’t know how many pdfs will be attached. Images and other attachments should be ignored.
I can’t upload the files in binary state because they are over the 5MB limit of Airtbale. I uploadet the files to Google Drive first and try to pass the share-link and filename to Airtable in an Array.
I have made sure that it is an attachment field in Airtable and I can manually store
multiple files there.
Not sure what you meant by “I have made sure that it is an attachment field in Airtable and I can manually store multiple files there”, but short string is fine for storing links.
@jabbson Thank you for creating a workflow. I have tested it.
I’m sorry, I did not make myself clear. I want to upload the PDF files to Airtable. So that they are stored there. Your workflow stores URLs, I would like to have attachments.
I want all PDFs to be saved in one cell per mail. Your workflow saves each URL in a new line.
This is the result of your workflow, with my data from one email:
When creating an attachment, url is required, and filename is optional. Airtable will download the file at the given url and keep its own copy of it. All other attachment object properties will be generated server-side soon afterward.
The PDFs form the Mails, can be up to 40MB in size. This sometimes makes it difficult to process as a binary.
I want one row per mail, and then all PDFs in one cell. In Airtbale it should look like this:
The Screenshot shows the desired result of 3 mails:
the first has 6 PDF attachments
the second mail had one
The third mail had 3 attachments
Not sure what you meant by “I have made sure that it is an attachment field in Airtable and I can manually store multiple files there”, but short string is fine for storing links.
In order for files to be stored in Airtable, the field in Airtable must be an attachment field. I have checked this by adding several files.
Thank you so much for creating a workflow so quickly.
As you can see this involved sharing the file with “anyone who has the link”.
If you would like to unshare after uploading, you can do that with an http request node (there is no native unshare operation for google drive node). I’ve added 30s delay, just to make sure Airtable has the tile to download the files. Change to whatever you think this needs to be.
I just wanted to say a huge thank you for your incredible help! I really appreciate that you stuck with the problem for so long and worked through it with me. Your solution worked perfectly and helped me immensely. I also learned a lot from it.
I’m so grateful you took the time to tackle my issue. By the way, I’ll just delete the files on Google Drive instead of revoking access (I’d shared the entire folder initially, rather than individual files).