Azure Logic App - Create CSV from JSON

Kuzlotsky, Gerald 41 Reputation points
2022-12-01T12:53:38.217+00:00

I am pretty new to Azure Logic Apps and am hitting a wall with this.
I'm simply trying to get a JSON output into a CSV file.

I have a simple JSON

{
"Email": "dchandra@xxxxxxxx.com",
"Name": "Test Account General",
"Phone": "999-999-9999"
}

In Azure, I've passed this to a Create CSV Table action.
The output is below - great!

Email,Name,Phone
dchandra@xxxxxxxx.com,Test Account General,999-999-9999

However when I try to create a CSV file using the SharePoint Create File action,
This does not appear in the Dynamic Content section.

I must be missing a step somewhere, or I'm completely wrong with the Create CSV Table action.

Any ideas or thoughts would be helpful.

Thank you.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,244 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,925 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,731 Reputation points
    2022-12-05T11:52:59.333+00:00

    @Kuzlotsky, Gerald Thanks for reaching out. As Create File action accepts the File Content as binary datatype that is the reason you would not you would see the below error.

    We can't find any outputs to match this input format.
    Select See more to see all outputs from previous actions.

    Clicking on Show more on your create CSV action would help you in this case. Once you specify the body('Create_CSV_table') it will work as expected for the Create File action.

    267207-image.png

    You should provide the array of JSON values in the Create CSV table. If you are only providing the only one JSON value, then you would get error while parsing it to CSV table.

    [  
      {  
        "Email": "dchandra@xxxxxxxx.com",  
        "Name": "Test Account General",  
        "Phone": "999-999-9999"  
      },  
      {  
        "Email": "test@xxxxxxxx.com",  
        "Name": "Test 2",  
        "Phone": "999-999-9999"  
      }  
    ]  
    
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.