- Purpose of the article: This blog explains how to get updated and modified files from Azure Blob to Salesforce.
- Intended Audience: This article will help our Organizational level kind of developers working on Azure Blob To Salesforce by using Logic apps.
- Tools and Technology: Azure Blob To salesforce
- Keywords: Getting modified and multiple files to Blob To salesforce by using logic apps.
Description: Using this logic app flow, we can create or update multiple files in Salesforce from Azure Blob Storage. If any new file is added to the Blob by a specific time, Logic app flow will directly connect to the Blob Storage, and flow will be triggered. By logic presented in the flow will fetch the Blob attachment, which will be directly created into the Salesforce Cloud.
Process Diagram:
Step 1: first, we need to create a storage account and upload a file to it.
Steps to implement a flow
Step 2: In logic apps, set a component as when a blob is added or modified.
When a blob is added or modified in Salesforce, it will trigger the flow. Add the storage account name and container name to it.
This is the output of the storage account (Tejasree) and the container (timestamp). The updated or modified files should display to that azure blob storage.
Step 3: To get blob content, add a storage account name and take a list of files path in the blob.
Step 4: Here, I’m initializing the File name dynamically.
Condition: I am differentiating the files based on file types by using a condition connector. If the file path ends with .pdf or .xlsx files, the true condition will be satisfied. In the true condition, we are storing the file data which is getting from HTTP as $content.
Create Record: In the true condition, I’m taking ‘create record’ connector from Salesforce and object type as content versions (we can store files and attachments in Salesforce), plus added parameters such as title, path on the client, and version data.
False condition: If the file path ends with. CSV. JSON. TXT, files, the false condition will get satisfied. In the false condition, we are storing the file data from decode base64 HTTP as $content.
Create record: In the true condition, I’m taking ‘create record’ connector from Salesforce and object type as content versions (we can store files and attachments in Salesforce) and added parameters such as title, path on the client, and version data.
This is the final output from getting updated files from Azure Blob Storage to Salesforce.
Author Bio:
Tejasree RACHURI
Associate Software Engineer
Hello, I am Tejasree RACHURI. I am an Associate Software Engineering at MOURI Tech for the past 1.3 years. I have good experience in Azure Data Factory, Logic Apps, API Management, and SQL.