Help

Download Attachment from airtable expiring download url and send in Api Call

Topic Labels: Automations
1349 1
cancel
Showing results for 
Search instead for 
Did you mean: 
IanG_FS
4 - Data Explorer
4 - Data Explorer

Hello!

I am currently looking to download a file from an attachment field within an  Airtable Script to send it in an API Call to a REST Api, however I am having issues with downloading the attachment in the script.

I have tried downloading the file via a fetch to the download url, however all I am getting back is the download link back.

IanG_FS_0-1675094045498.png

Any help on this would be greatly appreciated!

1 Reply 1

Hey @IanG_FS

This is actually correct! You're not really aiming to "downloading" the file per se.
Instead, you're pointing to the location where the file is currently stored. That's why the the script is correctly returning the URL.

I don't have any context for the API that you're trying to send the attachment to, but you should be able to cleanly pass the API the URL to the attachment in Airtable.
The API will then be able to download and store the resource (attachment) that is represented in the URL.