cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Filtering items to then email

Hi, very new to Microsoft flow but i have spent many days researching this and i cannot get it to work how i want it to.

 

so i have a list created where a new member of staff is created i then use Flow to assign tasks to myself as IT depending on department for example Admin dept new staff require a computer account, office 365 account, ID and Email for example in a task list.

 

this part works

 
 

task list pic.jpg

The issue i have is with the next step i want to then email the person the tasks are assigned to but only of each new record as its created, not all records and off all the tasks for the new employee.

 

currently i get an email sent to me after each new employee is added of each employee in the task list every time for example i add 1 new user i get one email, i add the second user i will get two emails, user 1 and user 2 and so on.

recieve emails.jpg

 

Also in each individual email i will see all the tasks assigned to me even if they are not for that user.

 

recieved email contents.jpg

As you can see under task name it repeats the same 5 assigned tasks 3 times as there are 3 new employees and if i add another employee i would end up with another time all 5 tasks would appear.

 

below is my flow to send the email, i run two flows, one to create the tasks as new members are added and a second to get the task results once created and then email them, i'm sure it can be done in one flow but i don't know how to get it to work.

 

flow1.jpgflow2.jpgflow3.jpg

 

thanks

Michael

2 REPLIES 2
Super User III
Super User III

hi @Mpowis  friend ist is not necessary to get items becouse when you select when a new item is created you have all the data in that row. But if you need to list all the values into all list and send just one email, please follow this example.

 

1.PNG

 

then outside apply to each you can add send an email just to one person with all your data inside array variable



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Hi Christian,

thank you for your reply but what is Credo? and i need the email to be sent to who the tasks are assigned to, i have a settings list so when the new employee is created it looks at the setting list for the department.

 

1. New employee created in Admin department

2. check settings list for tasks related to the Admin department

What To Do?        Department     Assigned To   Email

    - Computer       Admin             IT                    IT@email.co.uk

    - Email              Admin             IT                    IT@email.co.uk

    - ID                   Admin             IT                    IT@email.co.uk

    - Payroll            Admin             HR                   HR@email.co.uk

    - Info Pack        Admin             HR                   IHR@email.co.uk

 

3. Create Tasks in Task List

Task Name                     Due Date                             Assigned To     Created              First Name    Last Name

Requires Computer        adddays(UTCNOW(), 2)       IT                      UTCNOW()        First Name    Last Name

Requires Email                adddays(UTCNOW(), 2)       IT                      UTCNOW()        First Name    Last Name

Requires ID                    adddays(UTCNOW(), 2)       IT                      UTCNOW()        First Name    Last Name

Requires Payroll              adddays(UTCNOW(), 2)       HR                     UTCNOW()        First Name    Last Name

Requires Info Pack          adddays(UTCNOW(), 2)       HR                      UTCNOW()        First Name    Last Name

 

4. (the part i'm stuck on)

I want to send an email to IT with the list of tasks they need to do for this new user and an email to HR showing only the tasks they need to do for a newly created employee.

 

What i want:

New Employee > Tasks > Send Email to IT showing only the Tasks for this new user 

 

What is happening:

New Employee > Tasks > Send Email to IT showing all tasks assigned to IT for all employees in the Tasks List, then repeat for every employee in the list of new employees

 

thanks

Michael

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (9,571)