Home > front end >  How to insert data into Azure Cosmos DB using Azure Logic apps?
How to insert data into Azure Cosmos DB using Azure Logic apps?

Time:11-04

I would like to store the outcome of a logic app (success/failure) into a table in Cosmos DB for reporting purposes using logic app.

I would like to know;

  1. How do I create Azure Cosmos DB and a table to store success/failure messages as the last step of the same logic app ?

Thanks in advance.

CodePudding user response:

There are a few workarounds that we can give it a try

WAY-1:

  • In this way, we must need to have a particular parameter that defines the whole logic app success or failure of the condition so that we can use the condition connector.

    (NOTE: Here we need to keep in mind that when a connector fails the flow stops till there itself and so we are using this method )

  • Set the required variable to success/failure.
  • creating own format using compose connector.
  • Sending the compose outputs to our table in cosmos DB.

Below are the screenshots for your reference enter image description here

enter image description here

enter image description here

Here is the output :

enter image description here enter image description here


WAY-2 Create nested logic apps

(NOTE: Even in this case we must remember that if one connector in one logic app fails it won't reach the next logic app )

  • Related