Download Salesforce Attachment in SSIS

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:

  1. SSDT for SSIS installed
  2. ZappySys SSIS Powerpack installed
  3. A connection to Salesforce. In order to create a connection to Salesforce, check this video or check our article related.
  4. Finally, we will need a file in Salesforce to download.

Getting Started

Creating the connection

  1. First of all, in SSDT, create a new SSIS project
  2. In order to create a connection in SSDT, go to the connection manager, and select a new connection.
    Salesforce Connection

    ssis-create-salesforce-connection

  3. 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.
    Select SSIS Salesforce

    Select SSIS Salesforce connection

  4. Finally, write your email, password, and token. For more information about getting the token, please check our article related.
    SSIS salesforce credentials

    Salesforce credentials in SSIS

Creating the package

    1. First of All, Drag and drop the Data Flow Task from SSIS Toolbox and double click it
      to edit.

Data Flow Task

  1. Secondly, in the Data Flow, we will use the Salesforce Source to connect to salesforce and
    get the attachments.
  2. For this purpose, we will use the attachment table from Salesforce.
  3. 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:
    Salesforece columns in SSIS

    SSIS Salesforce Columns

  4. Next, we will need the derived column, to specify the path to store the image in a local folder.
    saleforece download image

    SSIS derived column download image salesforce

  5. Also, we will require the Export column to download into an image of the body. This component is specially used to get images or ntext data types.
    Download attachment salesforce

    SSIS export column salesforce image

  6. Finally, we will use the trash destination to get the image and finish the flow.
    Destination ssis salesforce

    SSIS Trash destination

  7. Now, we are ready. Your package should be something like this:
    Download Salesforce Attachment in SSIS

    ssis-full-download-package

  8. Run the package to test it.
  9. If everything is fine, we will be able to see the file. As you can see Download 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.

Posted in REST API, SSIS Salesforce Source and tagged , , .