Expand my Community achievements bar.

SOLVED

Workfront/Salesforce | Downloading a document from an SF Opportunity and Uploading to a WF Project

Avatar

Level 3

Hello,

 

I am having trouble getting a file from my SF Opportunity to my WF Project. When it is uploaded on the WF end it ends up as an unreadable file.

Eric_D_Miller_0-1725560432987.png

 

 

Here are the modules I am using to process this:

Eric_D_Miller_1-1725560464421.png

 

Eric_D_Miller_2-1725560495179.png

Eric_D_Miller_3-1725560524899.png

 

Does anyone have any idea what I am doing wrong? Is it due to downloading the ContentDocument vs just the Document option?

 

Any help is greatly appreciated.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Did you try to click on Map and map the field File Content to the File Content of the received bundle?

View solution in original post

8 Replies

Avatar

Level 10

Hello Eric,

 

First of all I would inspect, what kind of data you get from the Salesforce download module. In my experience unfortunately not all given modules work as expected.

 

The binary data should come as Buffer, codepage: binary, to directly map them to the Workfront -> Upload Document module without problems.

 

As we do not use Salesforce, I tried to download a file from Google Drive using the Google Drive -> Download a File module.

Here for example the data comes as a Collection and provides me with an error message, when mapping this to the Workfront -> Upload Document module. I did not find a resolution for this yet.

 

I will keep you updated, if I make progress concerning this, but in the meantime you should check, what the Salesforce module returns.

 

 

Regards

Lars

Avatar

Level 3

Hi Lars,

Thank you for the reply. Below are some screenshots from my scenario. Indeed it is coming in as Buffer, codepage: binary,...

 

Here is a successful download (with ContentDocument selected)
Eric_D_Miller_0-1725623687234.png
And here is a failed run (with Document selected)

Eric_D_Miller_1-1725623723806.png

Does this provide any insight to my issue?

 

Thank you,

Eric

 

Avatar

Level 10

Hi,

 

As far as I understand the Salesforce API documentation, you should go for the ContentDocument type of download.

 

"Represents a document that has been uploaded to a library in Salesforce CRM Content or Salesforce Files"

 

A Document on the other hand "Represents a file that a user has uploaded. Unlike Attachment records, documents are not attached to a parent object."

 

 

To upload the downloaded ContentDocument, I would try to map the Source File directly to the File Content.

 

 

Regards

Lars

Avatar

Level 1

What do you have as the name for your upload? Are you specifying the file extension? 

Avatar

Community Advisor

What do you have mapped as your file name? Are you including your file extension? I ask because that's usually what it looks like when I forget to include that.

Avatar

Correct answer by
Level 10

Did you try to click on Map and map the field File Content to the File Content of the received bundle?

Avatar

Level 3

Eric_D_Miller_0-1725646860802.png

 

I changed the Upload module to Map and added .pdf to the extension. This seems to have worked!