Collecting files via attachment

Hi Airtable community,

Is there any way to:

  1. collect files via form attachment
  2. copy and upload the files to box.com
  3. delete the files in Airtable

(Tried using Zapier, but unable to automate deleting the files in Airtable)

Or are there any other ways that this can be achieved other than form attachent, as I know it is not ideal…

Thanks in advance!

Hi @Sean_Oo
Do you just want to remove the attachment or remove the entire row from the form submission?

Make.com has the ability to gather the attachment, upload to box.com and delete the record from Airtable.

I only want to delete the attachment. :frowning: I was using make and did not find a way to do it without deleting the entire record…

With the scripting app you can pass a blank array to the field to clear it out.

multipleAttachments

Attachments allow you to add images, documents, or other files which can then be viewed or downloaded.

When updating an existing attachment cell value, the specified array will overwrite the current cell value. If you want to add a new attachment without deleting the current attachments, you can spread the current cell value like so:


let newAttachmentUrl = 'example.com/cute-cats.jpeg';

myTable.updateRecordAsync(myRecord, {

'myAttachmentField': [

...myRecord.getCellValue('myAttachmentField'),

{ url: newAttachmentUrl }

]

})

Similarly, you can clear the current cell value by passing an empty array, or remove specific attachments by passing a filtered array of the current cell value.

Note: when you pass an existing attachment, you must pass the full attachment object. New attachments only require the url property. You can optionally pass the filename property to give it a readable name.

Airtable generated attachment URLs do not currently expire, but this will change in the future. If you want to persist the attachments, we recommend downloading them instead of saving the URL. Before this change is rolled out, we will post a more detailed deprecation timeline.

2 Likes

To clear out any field in Integromat or Make.com, you simply update the field with the null function that appears on the general functions tab:

3 Likes

Thanks Scott. Can I ask another question?

Why is box not downloading the files fully from AirTable’s attachment? The files downloaded are less than 100kb…

No idea. Are you sure that Box is looking for a URL? It could be looking for an actual file. If it’s looking for a URL and it’s still not working, then I would reach out to Make tech support to ask them, and report back here with what they say.

1 Like

Figured it out with Zapier instead. Might have to use both of these automation tools now… haha
Thanks again Scott! Appreciate your help.

1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.