Question

Salesforce PDF Attachments

  • 17 July 2020
  • 7 replies
  • 617 views

Userlevel 1

Trying to send a salesforce attachement (PDF) to Box or Dropbox.  I can’t seem to find the actual PDF document to send to Box or Dropbox.  I see the attachment record and all the data, but not the actual pdf.  I believe it’s actually a URL link I need.  If so how to do get the PDF and send it to BOX or Dropbox.   I hope that’s clear enough.

 


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

7 replies

Userlevel 7
Badge +10

@Bigacuta that’s perfect, thanks for those screenshots. 

 

Note if you scroll down in the first screenshot (“Find Data” section of your trigger step) and can find a field that has “Exists but not shown” then skip everything I say here and go to the last paragraph it’ll solve both issues quickly.

 

We’ve got two issues going on here, the first issue is that the “Attributes: URL:” field has a relative URL and not the full URL, you’ll see this in your first screenshot where it shows the URL value as /services/data/v46.0/(etc...) for it to be a full URL it needs to start with https:// 

 

So one of the ways to fix this is via salesforce look for a link to that PDF and copy the link, you’ll find the same /services/data in that URL and you just need to copy everything in front of the /services/data and put that into the Box action step so you would get something like this:

Note this is Dropbox and I don;t have a salesforce relative URL, but you can see the concept of putting text in front of a value to create a full URL

The second issue is that Box is looking for a File object OR text. So since you are not putting a file object in there it’s assuming it’s text.  (notice the fine print under the Box “File” field vs the fine print under the dropbox “File” field, one mentions a URL, the other does not) So my assumption is you need to fix issue #1 (relative URL) and then put that URL into a different service (like dropbox, google drive etc) which will return a file object that you can then place into Box. 

 

Seems slightly cumbersome, but unless the Salesforce output of step 1 has the “File” or something similar that shows “Exists but not shown” then you will have to go through the URL uploading to a different service.

 

If however Salesforce has the “Exists but not shown” (File Object) you can skip issue one and two and just use the output of that field in the “File” field in Box and boom it’ll work!

Userlevel 7
Badge +10

Hi @Bigacuta 

@BretTruchan was right on where he’s showing you the spot in Dropbox where to put the URL and how that functionality works. 

However, I’m thinking that you might actually be struggling with the Trigger step, specifically the output from salesforce. you said

 I see the attachment record and all the data, but not the actual pdf.

Zapier will not show the actual PDF ever. How Zapier handles files is two ways, you’re either see a URL (for the file) OR you’ll see “(Exists but not shown)” When you see this it’s called a “File Object”. That’s because the fields in the Zapier interface cannot display a file. So it says hey, this file object exisits but I cannot display it. However it is there, and as seen in @BretTruchan’s screenshot the “File” field in Dropbox accepts either URLs or a File object which is what you might have from Salesforce. 

 

To better help you can you share a screenshot of the trigger step, specifically the “Send Data” portion where it has sample data? Where you can see “the attachment record and all the data” -- this will help us guide you to put it in the Box or Dropbox action step.

Userlevel 1

after I sent the response, I started down the same URL path you are outlining.  It’s good to know I wasn’t entirely off base.  Of course, you have identified some other stuff for me and I appreciate that.  I will try your suggestions and let you know.  THANKS SO MUCH FOR YOUR HELP!

Userlevel 7
Badge +10

Happy to help. Follow up here either way and let us know if it works or if you need additional help :muscle_tone3:

Userlevel 1

@PaulKortman I am getting close!  I have been able to create a PDF, PARTY (almost).  When I try to view it in Box, the PDF is protected (I think) so I can’t see it…

 

 

Userlevel 1

Hi Bigacuta,

I’m just another user, so take this with a grain of salt.  I think that this would be done in the Dropbox action?   In the File field, you’d select the filename from whatever the previous step is, which I’m assuming is some Salesforce related trigger.  Shot in the dark, but I hope it helps.

 

Dropbox would then download the PDF from the server (specified via the filename) and put it in your dropbox account in whichever folder you select for Folder in the action.

Userlevel 1

Tirigger step

 

Next Step

Result in Box is a text file.