The purpose of this flow is to create a Planner task from an Email with attachments.
The attachments are saved in a SharePoint folder. Links to the folder are included in the planner task:
When I test this Flow with an E-mail with 2 attachments, it is completed. But the logic test however returns a false.
The result is that no attachments are saved and the planner task created does not have file-links.
This is the formula in the logic test: equals(body('Get_email')?['HasAttachment'], true)
Solved! Go to Solution.
I do not think it is the scope that is at error. So what is the apply to each doing in your flow? IN my flow, I have defined a scope and am checking if there are attachments and then apply to each attachment to do something:
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
After checking the has attachments option, you can put the attachment array in the yes branch if the condition is true or else leave the no branch as is.
@yashag2255 You are totally right. It does make more sense to apply the "for each" in the branch, after testing for their presence.
So far my flow is actually no longer failing the test! Now I'll go on to 1) save the files in SharePoint and 2) add links in the planner task created earlier.
Messing around with that now. Cheers, feeling optimistic I can solve this.