cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
msudhansu89
Helper I
Helper I

Flow to send email at a particular time with Delay function and with consolidated list for one user.

Hi Experts,

With the help from this forum, I have manged to create a flow that Sends mail from an excel placed in SharePoint when the email is provided in "Assigned to" column.

 

1- An immediate notification option :- when an  email ID is Provided and Immediate Notification is marked yes (trigger the flow) notification will be sent to the Assigned person.

 

Excel sheet.png

 

Now, I want to make it more dynamic so that , if user selects Immediate Notification as No then everyday at 5 PM it should filter for all the issues Identified on a particular date and send a consolidated report to  the particular user email assigned.

Here is my flow,

 

Delay.PNG

I am stuck with this Delay function and filtering option:(

 

10 REPLIES 10
DamoBird365
Super User
Super User

Hi @msudhansu89 

 

If you are looking to delay until 5pm, you could use the action "Delay Until".

 

You would need to construct todays date and time

DamoBird365_0-1616050029658.png

You could use an expression similar to below for today's date + 17:00.

 

concat(formatDateTime(utcnow(),'yyyy-MM-ddT'),'17:00:00Z')
 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

Hi @DamoBird365 ,

Thanks a lot for helping me here.

Just wanted to know would the expression that you have suggested would be a dynamic one?

concat(formatDateTime(utcnow(),'yyyy-MM-ddT'),'17:00:00Z')

 

What I Mean to say is that, would this take dates automatically? Let's say I give todays date ,then when I open it tomorrow, then will it take tomorrows date? I want it to be automatically take the date and send a consolidated report to the users.

DamoBird365
Super User
Super User

Hi @msudhansu89 

 

If you copy that expression into the expression tab (rather than the dynamic content tab), it will build you an expression which will evaluate each time the flow is run.  As it calls upon utcnow() this will always get today's date but append in to 17:00, so when run, the flow will always return the utcnow date + 17:00.

 

Hope that makes sense.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

Super:)

Thanks for the explanation. Will try this and keep you posted.

 

Could you please guide me for the Filtering option and how to send a consolidated list of issues assigned to one user ?

if you could share me the Screenshot of the flow would be just awesome.

Thanks dear 🙂

DamoBird365
Super User
Super User

Hi @msudhansu89 

 

You can filter your rows on a column name e.g. Owner eq 'Damien'

DamoBird365_1-1616054393176.png

 

and then when it comes to sending an email, you could construct an HTML table from the value.  

 

DamoBird365_2-1616054446674.png

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

Hi @DamoBird365 

 

I have tried your suggestion and followed exactly as per your provided screenshot as I am just starting with Power Automate. However at the end I get this error message. Could you please guide me?

 

emailissue.png

Hi @msudhansu89 

 

It's because the email field you are calling is an object { email addy }.  If you stick the email into a compose you will be able to see the format.  You need to retrieve just the email address.  If you can share the expression you have to retrieve the email and the object format (look at the history of the run by using a compose) and I will try and help if you are unsure.

 

Damien

HI @DamoBird365 

 

Not sure from where I can get you the "If you can share the expression you have to retrieve the email and the object format (look at the history of the run by using a compose) ,

But are the below what you wanted?

 

 

tempsnip_.pngCapture_2.PNG

Hi @msudhansu89 

 

That's kind of what I am looking for, what is in your select to get that object of emails and null values?  Do you not have a dynamic value for issue action owner?  If it puts that in an apply to each and they are ALL the same, i.e. your filter is on the name being the same, you can just retrieve the first element of that object in the compose.

 

Something like the following where Owner is your field name from the list rows.

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Owner']

 

This would retrieve the first email retrieved - hence the [0] as the element count starts at 0.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien

hi @DamoBird365 

 

I am so so sorry to have you occupied here. Please accept my apologies.

My select contains the below. Also The name/Email is same for time being as I am just running it for me. But in real scenarios, it will be different.

I found out that with the help of below code we can convert the Value to string and tried it, but still no luck with this as well 😞

String(outputs('compose')

select.PNG

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,431)