Create new records in CRM from JSON data in Blob Storage

Posted On March 30, 2022 by Shruti Gupta Posted in  Tagged in , , ,

If you want to create new records from a json data, you can do it by using Logic App.

First you need to make sure to upload json file in blob container

Steps for Logic App:

  • First select a HTTP Trigger block in a new logic app designer
  • Next step is to select Get blob content (V2) and choose the storage account name and the blob file where you uploaded the json file.

Note: If you don’t have a connection to Blob Storage account already you need to create one by clicking on change connection and the Add New.

You need to fill the details properly to create a correct connection.

Access Key of the storage account can be found in Storage account in access keys section

  • Now select Parse Json block to extract all values. Click on use sample payload and paste your payload there to get a schema.

Note: In Content if you directly put File content then you will get error after you run the logic.

Error:

You get this error so for the you need to convert the octet-stream file to json file by writing the following function

json(body(‘Get_blob_content_(V2)’))

  • Now once your json is parsed you need to create record in CRM using this data by selecting Create a new record block in CRM.

You need to first sign in with your CRM account and then choose the organization and entity.

Later you need to map the fields.

Note: If there are mulitple records in json then the logic app will automatically take the create new record block in  for each block as a step.

Now the records will be created in CRM.


Share Story :

Secured By miniOrange