Hello, I'm still having issues with the Append to variable step. It expects an Array or string but it comes with an Object.
My only difference is that the AssignedTo field is not set to allow multiple people, just one.
It could be that?
Thanks in advance
Hi @ZachRoberts I have added in the DistinctEmailArray to my flow, but I am receiving an error on the Send an Email step. I am using a SharePoint list, not a task list. I am able to get the flow to work using my email as the recipient and I receive the correct number of emails, but when I use the formula to have the emails sent to the emails in the SharePoint list it is resulting in an error. I've attached screenshots of the error screen and the flow in the edit screen and copied the error message below. Can you please help me resolve this? Thank you.
Error details: One or more recipients are invalid.
Hi @kneppers0 ,
Are you using a people column in your SharePoint list? I am using a regular SharePoint list for my flow as well.
It looks like your formula for creating the email array is not correct, it should look like below:
I have a write up on my blog that may help you with this flow https://spodev.com/task-reminders-microsoft-flow-and-sharepoint/
@fzer0 Did you ever figure out how to extract all values within the 'AssignedTo' column for a task with multiple people assigned?
@ZachRoberts @dmistry Any help would be appreciated on this. I've followed the flow listed within this email thread very closely - using both the 'AssignedToEmailArray' and 'DistinctEmailArray' to send one consolidated email of all tasks assigned to each user. I am just having trouble with cases where multiple users are assigned to a task via the 'AssignedTo' column - the flow is only returning the email of the first user within the column for each record.
Really appreciate all the help you both have provided within the thread.
Hi @DylanBaxter ,
You can follow the solution on my blog, please make sure your columns in the SharePoint list are setup correctly.
Hi @ZachRoberts - appreciate the prompt response.
We may have a misunderstanding. I apologize for any confusion caused on my end.
Following your blog post - I have confirmed my columns are set up correctly, my issue is I am attempting to get the flow to work for line items with multiple users in the 'AssignedTo' column.
Task # Column AssignedTo Column
Task 1 User 1
Task 2 User 2
Task 3 User 1 & User 2
In the above, my flow would send 1 email to User 1 with Tasks 1&3, and 1 email to User 2 with Task 2. I am trying to include Task 3 in User 2's email as well, or create a separate email addressed to both user 1 & user 2 for Task 3.
Here's a quick look into my flow -
Appreciate the help.
Can you post screenshots of your flow with the formulas showing? The flow should be functioning the way you are describing where a user will get an email for every task they are apart of.
-Edit - sorry didn't see the earlier screenshot but more detailed ones would be easier to troubleshoot.
Hey @ZachRoberts - I just updated my previous reply to include a screenshot within the flow.
Let me know if you need me to expand any of the actions.
Could it have anything to do with the 'Send an Email' command being addressed to first(variables('DistinctEmailArray')) ?
Yes can you please send screenshots with the fields expanded and formulas visible.
That should be correct for you To field in the email step, after the email is sent you should then be stepping through your distinct email array to the next address.
Hi @ZachRoberts / rest of thread -
Has anyone been able to solve the issue of sending an email to multiple users assigned to the main task?
Took another swing at it over the weekend and haven't been having much luck.
Thanks for this post, very helpful to get me going. Quite a challenge tho.
It took me a day to get this to work. In the end I changed a bunch of things to simplify the flow and decided to use a serarated SP List that included the users, this allowed me to skip a few steps. Also, I added formulas in the odata Filter queries to make the flow Sorter (In my case, I filtered out the Items that were recently updated.
I faced a lot of issues, the 2 main ones were these:
1) The first problem for me was this:
This only works when the Person column allows multiple users and it took me hours to find out that it can be solved by changing it to this. There's a comment here somewhere with the same conclusion:
the "first(" part is not the first object of the array i reckon, but the multiple person column and I just couldn't wrap my head around it.
2) The Filter Array didn't work for me.
I tried everything, even tried to the Filter Query from the Get Items operator.
I still don't know why unfortunately, but the formula didn't work until I tried "last(" instead of "first("
That seemed to do the trick for me, filtering the data was the hard part.
ignore this it was the problem with my outlook
I am having a strange issue with this. I've managed to make it work without having the send email action. But if i add the send email action the workflow runs forever without giving any error message and i have to cancel it.
Any help would be appreciated.
Features releasing from October 2020 through March 2021
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!