Question

How to access PDF file stored in Airtable to send it as an attachment

  • 2 August 2023
  • 6 replies
  • 120 views

Hi all ! 

I have a pdf file stored in an Airtable field, but when I try to send it through an Outlook step in Zapier, it only “generates” a blank page with the title of the file written in it. Not the actual pdf.

Any idea on how to get around that ? I m really stuck !

Best,

Quentin 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +14

Hi @Quentin Zakoian 

Good question.

To help us have full context, please post detailed screenshots with how your Zap steps are configured, thanks.

Userlevel 7
Badge +6

Hi there @Quentin Zakoian,

Welcome to the Community! 🎉

It seems like there might be a little mix-up with the "Attachment" field in your Microsoft Outlook step. This field is on the lookout for a file object or a direct download URL. If it's been mapped with non-file data, it might not work as expected.

Here's a guide about sending files with Zaps that might help: https://help.zapier.com/hc/en-us/articles/8496288813453-Send-files-in-Zaps

If the trigger is returning the file object or a direct download URL, you might want to use that instead for the "Attachment" field.

Hopefully, this helps! 😊

 

Hi,

Thanks for the answers, I try to look into what you wrote @ken.a but I m still struggling.

Here are a few pictures of my situation @Troy Tessalone :


Here is what I tried:
 

But that’s not working because the file is not public indeed.

I tried that as well : 
 

But yeah that’s not working either.

Here are the options that I have :
 




Any idea how to get around that ?

Thanks !!

Userlevel 7
Badge +6

Hi @Quentin Zakoian,

Thanks for the additional details.

I did some digging into this, and it seems like this is happening because file links from Airtable started expiring after "a couple of hours." You can read more about it here:
https://support.airtable.com/docs/airtable-attachment-url-behavior

The trick here would be to use Google Drive (or another file storage step) to upload that file from Airtable using the “Upload File” action and use the file object or URL from Google Drive to the Microsoft Outlook step for a more permanent solution.

Please give that a try, and let me know how it goes. 😊

Hi @ken.a,

Unfortunately, it still doesn’t work even if I try with the Drive Upload step.

If I take the url, I get an error “This URL has expired” as well. :(

And if I take the filename, I still only get the white txt file with only the title. 

Any more thoughts ?

Cheers !

Userlevel 7
Badge +6

Hi @Quentin Zakoian,

Thanks for the update!

Could you please try using the hydrate file on your Google Drive step? Like so:

6fc26726c0ab12592d56d79a68f882ba.png
(view larger)

And if that still doesn’t work since the attachments from Airtable are expiring every couple of hours. How about creating a new record with an attachment in your Airtable app? Once you've done that, you can load this new record as your sample data. Just head over to the "Test" section of your trigger and click on the "Find more records" button.

Please keep us posted! 😊