Logic App - Export to CSV Issues

Son 311 Reputation points
2023-10-27T07:55:21.4633333+00:00

Hi,

I am very new to Logic Apps so just learning the ropes currently.

We are using Azure AUM for patching our virtual machines so would like to pull a patch status report, export to CSV and send on via email or even upload directly into Power BI so my manager can view reports on status etc. I have the following so far, I am creating a variable, running a Azure Resource Graph query which collects the required information, but then trying to export to CSV is failing, I am unsure of how I get the resulting data into a variable of an Array type:

Patch Status 1

Patch Status 2

Patch Status 3

This is the result and error:

Patch Status Result

Hoping someone can help or point me in the direction of learning material for this particular use case.

Thanks!

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,944 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,160 questions
{count} votes

Accepted answer
  1. Mike Urnun 9,776 Reputation points Microsoft Employee
    2023-10-30T23:28:53.6133333+00:00

    Welcome to Azure, @Son , and thanks for reaching out.

    Based on the screenshots, the Create CSV table action should have the response data from the HTTP 2 action instead of the PatchStatus variable (which carries the KQL for the Azure Resource Graph). When you place your cursor on the From field in the Create CSV table action, you should have the Dynamic Contents popup show, and in the same popup, you should be able to select the correct response data from the HTTP 2 action.

    Adding the response data directly from the HTTP 2 action as-is might result in the same error as the response data will likely be a type of Object whereas the From field in the Create CSV table action expects it to be of type Array. In that case, you can simply leverage the Compose action to construct a new array output which can then be referenced in the From field. The Perform data operations in Azure Logic Apps doc should provide some context & help but feel free to use the comments below for any follow-up questions ;)


    Please "Accept Answer" if the answer is helpful so that others in the community may benefit from your experience.


0 additional answers

Sort by: Most helpful