Hello all,
Seeking advice on my dilemma, I am building a flow which will take a csv that is created daily, and upload it into a sharepoint list.
I have gotten quite far by using a combination of other posts on this forum, and the flow actually worked when I was using test data, however I am facing an error from the Parse to JSON function (the second last step).
The error happens between the 'parse JSON' and 'create item in sharepoint list' function blocks (see images below), and the exact error is listed here
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@variables('JSON Array')' is of type 'Object'. The result must be a valid array.
Resources:
Parse CSV - Get Rows from CSV file using Power Automate - YouTube
Parse CSV script - Blog-Resources/Get Rows from CSV file using Power Automate.js at main · cfernandes-muhimbi/Blog-Reso...
Automated upload flow - Solved: Re: Daily extract of content of csv to SharePoint ... - Power Platform Community (microsoft....
This flow is a combination of these two tutorials.
I am open to reworking the entire thing, but would prefer not to.
This is my current flow, I have not included any of the first few blocks, because I have to initialize 38 variables, and the trigger for this flow is, "when a new file is created in a sharepoint folder", but I have been doing this manually while testing.
the expression for 'Yesterday Date' is:
the expression for 'Compose 2' is:
Solved! Go to Solution.
The JSON schema was the issue, but has been resolved now. Follow this tutorial:
Hi @s_raja
To create the item you can select the dynamic values of the Parse JSON action.
Hope this helps
Best regards.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have already added all the dynamic values into the create item function, my main problems lie with both the json schema and the output from the script being run.
But thanks for the attempt.
The JSON schema was the issue, but has been resolved now. Follow this tutorial:
User | Count |
---|---|
93 | |
45 | |
19 | |
18 | |
15 |
User | Count |
---|---|
137 | |
54 | |
42 | |
41 | |
30 |