Set Attachment Filename with the Airtable API (PATCH)
Use the Airtable API to make a PATCH Request that will set the filename for a new file in an Attachment type field.
- Get your Airtable API Key: https://support.airtable.com/hc/en-us/articles/219046777-How-do-I-get-my-API-key-
- Get your Airtable Base ID: https://support.airtable.com/hc/en-us/articles/4405741487383-Understanding-Airtable-IDs
- Get your Attachment type field name.
- NOTE: If you change the name of the Attachment field, then the Zap will break.
- This can only be used to create new files in an Attachment type field.
- Cannot update existing Attachment file names.
- This will replace existing files in the Attachment field.
- Review help article with how to send files in Zaps: https://zapier.com/help/create/basics/send-files-in-zaps
- For the Action step App, use Webhooks: https://zapier.com/apps/webhook/help
- For the Action step Event, use the Custom Request option
- Set the Method to PATCH
- In the URL
- Replace [APP_ID] with your Base ID
- Replace [RECORD_ID] with your Record ID
- In the Data
- Replace [FILE_URL] with the file link or file object
- Replace [FILE_NAME] with the filename
- In the Headers
- Replace [API_KEY] with your API Key
- Leave all other fields set to their default values (these may be empty)
Make sure to test and verify the results.
Use an Formula field to extract the file name from attachments.