I'm trying to generate a reminder email only for items that are NOT complete and in between a reminder date and a due date. It works and sends the email when the email is hard-coded (blah@blah.com) , but fails if I try to use the "Author email" field from the associated SharePoint list.
My Power Flow is associated with a SharePoint list.
- Get items:
- Only items with a "Status" NOT EQUAL to "Complete". "Status" is a column from the SharePoint list.
- Filters columns by using "Limit Columns by View". I made sure to include the multiple person/group column, "Author" which I use later for the email.
- Condition: Today's date is greater than the "Reminder Date" and less than or equal to the "Due Date".
- Switch on "Status": For testing, I am only handling the case where Status equals "Writing Report".
- Send an email: This is where I need help. If I hard-code an email address, it sends the emails without error. But if I use the Dynamic Value "Author Email" it errors and fails to send the email. NOTE: The "Apply to each 2" step with "Current item" was generated automatically when I added the Author Email field.
The ERROR:
ExpressionEvaluationFailed. 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.