I'm having an odd issue, and I seem to be doing everything right based off of the MS post about Office 365 Groups Mail connector.
The issue that I'm having is that when I used "Get a Thread Post" action is that it creates a "Apply to each" for the the conversation id variable, and then creates a second nested "apply to each" to the post id variable. When I then run the flow I get an error on the second "Apply to each" saying:
"The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each')' is of type 'Object'. The result must be a valid array."
This is infuriating on two levels, I'm not adding the apply to each, MS is. And there's only one e-mail in each thread there's not even multiple items to parse. Secondly, MS' own post on the connector does this same flow and there's no issues with it: https://flow.microsoft.com/en-us/blog/use-our-new-office-365-groups-mail-connector/
Can someone direct me to what I need to tweak to fix the error on the second "apply to each"?
Solved! Go to Solution.
It looks like you have to use "Posts" instead of "Current item" in the "Apply to each 2"
Show your flow with the error.
Sure thing. First image is the snippet of the flow with connectors and code in question. Second screenshot is the error log from running it. My assumption is it's complaining because it wants an array of multiple posts in a thread to parse, and I'm giving it a thread that only has a lone post, and that will be the case every time the flow is run.
It looks like you have to use "Posts" instead of "Current item" in the "Apply to each 2"
Brilliant. That was it. Thank you kindly 👍
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
32 | |
32 | |
24 | |
24 | |
21 |
User | Count |
---|---|
64 | |
57 | |
43 | |
37 | |
28 |