automatically export logic app run history details to csv

Ananya Dixith 61 Reputation points
2024-02-27T07:37:46.78+00:00

Hi, Our requirement is to automatically export all logic app run history details to csv file. as soon as logic app runs those run details must be stored in .csv file It is a standard logic app and we need to export run history details of each workflow. Csv file should include Identifier, status, start time and duration of all runs which occurs. Pls help us with this. Thanks

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,087 questions
{count} votes

Accepted answer
  1. Barry Evanz 235 Reputation points
    2024-02-29T15:37:06.7733333+00:00

    Automatically exporting Logic App run history into a CSV file is a practical approach for detailed monitoring. Let's streamline this process. First, connect your Logic App to Azure Log Analytics. This captures all necessary data in one place, simplifying your task. Next, use Kusto Query Language within Log Analytics to extract specific run details like identifier, status, start time, and duration. This step turns raw data into actionable insights. For automation, combine Azure Automation with a PowerShell script. This script will run periodically, executing your KQL query, fetching the data, and exporting it to a CSV file stored in Azure Blob Storage. Ensure your script has the necessary permissions to access Log Analytics and Blob Storage for smooth operation. Regular monitoring of this setup is key. Adjust as needed to keep your documentation relevant and accurate. By leveraging Azure's tools and a bit of scripting, you create an efficient system that keeps you updated on your Logic App's performance, aiding in better decision-making.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 19,976 Reputation points Microsoft Employee
    2024-02-28T08:28:12.1666667+00:00

    @Ananya Dixith Thank you for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    Unfortunately, we don't have any direct/ out of the box solution for this.

    To achieve your requirement, you need to create solution which should be calling this Workflow Trigger Histories Rest API to pull the list of histories of a particular workflow inside a standard logic app and by using the $filter parameter to pull/extract Identifier, status, start time , duration the run.

    Alternatively, you can enable the diagnostic setting (Workflow Runtime Logs) for your logic apps under Monitoring section in the portal, send those logs to resources Log Analytics Workspace and there by using the KQL queries you can further pull the required information and you can export to csv or in other formats as well as shown below. User's image

    Hope this helps, Let me know if you have any further questions on this.

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.