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

Email Notification when shift is assigned to team member

I'm attempting to create a flow for email notification when a team members is assigned a shift in Shifts. I currently have it set to grab the current time and add 72 hours (will be 24 once functionality is successful), grab the shift lists for that time frame, get the user info from Azure AD, and then email each person their assigned shift daily. I'm getting a few errors however..

 

matyd1_0-1593894335130.png

matyd1_1-1593894399738.png

 

matyd1_2-1593894430892.png

 

matyd1_3-1593894511532.png

matyd1_4-1593894560446.png

 

Error Output:

matyd1_5-1593894583237.png

matyd1_6-1593894607085.png

matyd1_7-1593894628072.png

 

 

It is wanting an array, I'm not sure how to create an array however. Any help would be greatly appreciated!

 

 

 

4 REPLIES 4
Highlighted
Resolver I
Resolver I

Re: Email Notification when shift is assigned to team member

Hello @matyd1 ,

 

You are assigning object value to For each loop instead you have to assign it Array . You can create/convert your object into array.

 

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#a...

Or 

Json(YOUR OBJECT)

 

https://powerusers.microsoft.com/t5/General-Power-Automate/Convert-From-multireply-string-into-a-val...

 

Thanks

 

Highlighted
Regular Visitor

Re: Email Notification when shift is assigned to team member

Thank you for your reply! I have looked through both links you have provided and I'm still confused on how to create the array (I did read the array section of the docs prior to posting my original post) and the JSON solution doesn't have much explanation on how to use JSON to pass my argument (this seems like the easier route).

 

I'm super new to a lot of this and have had a few C++ courses here and there so I'm not very seasoned when it comes to coding and/or logic. I can read it and fumble through it for the most part but this one I'm pulling blanks.. I'll continue to search JSON docs in the meantime.

Highlighted
Regular Visitor

Re: Email Notification when shift is assigned to team member

 Alright, I've got it working... slightly lol! You have pointed me in the right direction atleast. 

 

The problem I'm having now is that the email is going out as planned, however it is only sending it to me. For instance, I added a shift for myself and another team member, well the email was sent to me twice instead of once and I don't believe it was sent to that team member who was assigned. Screen shots attached.

 

matyd1_1-1594000143807.png

 

 

Highlighted
Regular Visitor

Re: Email Notification when shift is assigned to team member

Still looking for help on this. 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

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