1

I have a flow setup on a SharePoint OOTB Task list (not a custom list) which lists tasks assigned to different users. The flow runs every monday and sends one email/consolidated email out to Assigned to user listing all tasks (not separate email for each task). Below is the list screenshot.

enter image description here

The flow screenshots are below with formulas n all, I have added them in the order.

enter image description here enter image description here

enter image description here enter image description here

For some reason, let's say for a task Assigned TO (people picker) column has two users listed for example, User A; UserB then the email only goes out to USER A but not User B so basically second user in assigned to column gets ignored for sending email out, I believe it has to do something in my flow variable formulas, can someone please review my flow and help with a solution. I just want to make sure that all users listed in AssignedTo column get one email listing all tasks they are responsible of.

1 Answer 1

1

There are some differences, here is my manual:

I tried it with my testing items from classic list. I added User column. User column returns Json of selected users, so you must parse this JSON and do foreach for it. I did it on one item, you will have here One foreach for collection of items and second for the Email attribute for each item.

enter image description here

  • Add: Parse Json to your first Items - Apply to each

enter image description here

  • Content: Attribute of the Email column from SP (when you test your flow, after run you will see the values of the Email column, use it as "Use sample payload to generate schema"), or you can try use mine, if its the same:
{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "@@odata.type": {
                "type": "string"
            },
            "Claims": {
                "type": "string"
            },
            "DisplayName": {
                "type": "string"
            },
            "Email": {
                "type": "string"
            },
            "Picture": {
                "type": "string"
            },
            "Department": {
                "type": "string"
            },
            "JobTitle": {
                "type": "string"
            }
        },
        "required": [
            "@@odata.type",
            "Claims",
            "DisplayName",
            "Email",
            "Picture",
            "Department",
            "JobTitle"
        ]
    }
}
  • After this insert - Apply to each, where Ooutput will be Body of the Parse JSON. Inside insert Send an email where you will use the Email attribute:

enter image description here

The flow for me looks like this: enter image description here

  • Tested with two users, it's working for me

Hope it helps!

8
  • Thanks Zdenek, can you please share screenshots, so that way its easier for me to make changes.
    – mdevm
    Commented Feb 24, 2019 at 19:07
  • Create variable - type "Array", fill it with function "Split(item[AssignedTo]Email,";")" this should create two records (or more depends on emails) which should be in the Assigned To, if there is used different delimiter fill with it. After this create "Apply To Each", where for values you will use this Array variable, add create "task/send email" inside the Foreach, in To: use value "Item" from the Variable Array. I will be in work tomorrow. Commented Feb 24, 2019 at 20:54
  • thanks Zdenek, the split formula is not right, can you double check please, i am getting invalid expression in flow upon save
    – mdevm
    Commented Feb 24, 2019 at 23:55
  • cause you need to use ' instead of "" so it will be like : split(item[AssignedTo]Email,';') - dont forget to instert proper value as first input Commented Feb 25, 2019 at 9:10
  • I used ' ' not " ", its not q valid expression it seems
    – mdevm
    Commented Feb 25, 2019 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.