Let’s learn about how to fetch data from Cosmos DB using Power Automate and push into Dynamics CRM.
For retrieving the data from Azure Cosmos DB we will need a few details from Azure:
1. URI
2. Primary Key

Let’s jump to Power Automate and start adding the necessary component for achieving this activity.
I have used a manual trigger for reading the data from Azure Cosmos DB and pushing it into Dynamics CRM.
Chose an action –> Search for Azure Cosmos DB, then under action select Get all documents.

We will use the Azure Cosmos DB detail for establishing the connection as shown in the below image. Access Key to your Azure Cosmos DB account here we have to enter Primary Key as shown under Figure 1. Hit Create button.


Select the desired database under the Database ID and table under the Collection ID field and hit the + New step button.
After the connection has been successfully established. Search for Parse JSON and add Documents under the Content field. Paste the JSON output under the schema. Hit the + New step button.

Next, we will search for a control Apply to each.

Under, Select an output from previous steps field pastes the Body from the Dynamic content and click Add an action button.


The above action is needed as it will allow us to map the value coming from JSON to be stored inside Dynamics CRM entity attributes.

Now, we need to test our flow with a few more clicks to be performed. Click on the Test button which would appear on the right top of the screen.

The flow will start executing, once the flow has run successfully we will get the below screen.

Now, go into CRM and we will see the records have been created under the expected entity.
Hope this help anyone!