Introduction
Download Salesforce Attachment in SSIS can be difficult the first time. In this new article, we will show how to download an Attachment from the Salesforce Source into a file using SSIS. Working with images is always tricky the first time. However, with the right article, this process is really simple. This article will show you how simple it is to do it.
Salesforce is an extremely powerful CRM based in the cloud. This company was created in California, San Francisco and it is a very common request to get the information from the cloud into a file automatically. These can be achieved with our ZappySys SSIS PowerPack plus some SSIS tasks.
Requirements
In order to do it, we will need the following components:
- SSDT for SSIS installed
- ZappySys SSIS Powerpack installed
- A connection to Salesforce. In order to create a connection to Salesforce, check this video or check our article related.
- Finally, we will need a file in Salesforce to download.
Getting Started
Creating the connection
- First of all, in SSDT, create a new SSIS project
- In order to create a connection in SSDT, go to the connection manager, and select a new connection.
- Also, Select the ZS Salesforce connection. This new connection is created by the ZS SSIS PowerPack plugin mentioned in the requirements. With this connection, we can easily connect to Salesforce and get the Information.
- Finally, write your email, password, and token. For more information about getting the token, please check our article related.
Creating the package
- First of All, Drag and drop the Data Flow Task from SSIS Toolbox and double-click it to edit.
- Secondly, in the Data Flow, we will use the Salesforce Source to connect to Salesforce and get the attachments.
- For this purpose, we will use the attachment table from Salesforce.
- In addition, we will get the columns from the table. The image is in the body, however, we have additional columns like the id, name, ContenType, BodyLenght, createDate, and more:
- Next, we will need to drag and drop SSIS Derived Column from the SSIS Toolbox below the Salesforce Source and connect it.
- Double-click on the derived column, to specify the path to store the image in a local folder.
- Now let’s, drag and drop SSIS Export Column from the SSIS Toolbox >> Other Transforms.
- Double-click on the Export column to download an image of the body. In the Extract Column map the Body column of File data and the Path Column to where you want to save that file.
- Finally, we will use the trash destination to get the image and finish the flow.
- Now, we are ready. Your package should be something like this:
- Run the package to test it.
- If everything is fine, we will be able to see the file. As you can see Downloading Salesforce Attachment in SSIS is a straightforward process.
Conclusion
In conclusion, we learned in this article how to Download Salesforce Attachment in SSIS. Basically, you need to use the ZappySys salesforce source, then use the derived column to specify the path and the Export column to get the image. Finally, the ZS Trash destination will be used If you liked this article, do not hesitate to continue testing and using ZappySys PowerPack for SSIS.