• DOCUMENTATION
  • WORKATO BLOG
  • PRODUCT BLOG
  • Return to Workato
  • Log in
  • ☰
  • Community/Discussions
Solution home App Resources Salesforce

Salesforce: How to download an attachment form Salesforce and upload it to Box

Modified on: Wed, Feb 1, 2017 at 8:13 AM

Sometimes, you may have attachments in your Salesforce that you would like to archive in Box. To do so, lets take a look at how such a recipe would look like. 


In this example, we will be using the "Updated Opportunity" trigger, with the assumption that the attachment we are looking for resides in opportunities. 

Once the trigger has been set up, lets take a look at the corresponding actions. 

1. First, you will need to get the details of the object through the "Get object details" action in Salesforce.

2. Use the "Search object" action to search for the attachment within the opportunity from the trigger

3. Set up a repeat action to process each attachment in a single opportunity one by one. For the input list, use the "attachment" array pill from the Step 2 output. 

The following steps are to be nested under step 3:

4. Run a search in box for the file name of the attachment that was found in the opportunities by creating a Box "Search files/folders" action and using the "File name pill from step 3 for the search text, and preferably set exact match to yes. 

5. Next, set up a conditional action to perform if no file matching the name of the file found in salesforce was found. To do this, use the ID pill in the Data field, and set the Condition to "is not present"

The following steps are to be nested under step 5

6. Set a "Download attachment" action on salesforce using the attachement ID pill from step 3's output

7. Finally, set a Box action "upload file via file content" , and use the "attachment" pill from step 6's output in the File content field, choose the folder of your choice, and use the "File Name" pill from step 3's output in the Name of uploaded file field.

Once thats done, you will see your files move automatically from Salesforce opportunities to your Box folders!



Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

Related Articles

    Still can't find your solution?

    Visit our forums to search for answers, or post your own questions.

    Documentation
    Developer's Library
    Tutorials
    eBooks
    Product Hour
    Product Blog
    Workato Blog
    Product updates
    Customer Stories
    © Workato 2020   Privacy   Terms   +1 (844) 469-6752
    • Documentation
    • Workato Blog
    • Product Blog
    • Solutions
    • Forums
    • Tickets
    • Log in
    • Return to Workato
    Article views count