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!