web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Insert good ‘morning/e...
Power Automate
Unanswered

Insert good ‘morning/evening’ into email

(0) ShareShare
ReportReport
Posted on by 77
Hi all, Wondering how I can automatically insert greeting into email based on time of day. Have no idea on what the expression would look like and or the flow. Maybe using utcNow() to determine current time and cross match that against a condition. Cheers, Gerard
Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @Gerard2 :

    Could you tell me:

    What time zone are you in?

    I assume you use UCT time then please try this flow:

    v-bofeng-msft_0-1606980319162.jpeg

     

    Reference Expression:

    if(greater(int(formatDateTime(utcNow(),'HH')),18),'Good evening',if(greater(int(formatDateTime(utcNow(),'HH')),11),'Good Afternoon','Good Morning'))

    If you are in another time zone, just add the offset value. I assume you are in the UCT+8 time zone

    The expression should be:

    if(greater(int(formatDateTime(addHours(utcNow(),8),'HH')),18),'Good evening',if(greater(int(formatDateTime(addHours(utcNow(),8),'HH')),11),'Good Afternoon','Good Morning'))

    Best Regards,

    Bof

  • Gerard2 Profile Picture
    77 on at

    Hi Bof,


    Australian Eastern Standard Time UTC +11.

     

    My flow is 

     

    • When an item or file is modified
    • Get changes for an item or file (properties only) 
    • Condition ( Has Column Changed: Column XYZ - equals true
    • If Yes 
    • Send an email ( Good morning/ evening DisplayName - PERSON has completed form - please review when ready)

    Can I just plonk that expression into my ‘Send an email’ connector - I’m using dynamic content to fill out details like PERSON etc and I’m using HTML formatting.

     

    Thanks so much.

     

    Gerard

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Gerard2 :

    Please try this:

    11.gif1.JPG

    The Result

    2.JPG

    Best Regards,

    Bof

  • Gerard2 Profile Picture
    77 on at

    Thanks Bof - very much appreciated.

    I’ll give it a go tomorrow and post the results.

     

    Cheers,

     

    Gerard

     

     

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi  @Gerard2 :
    Has the problem been solved?
    Is there anything else I can help?
    If my post helps, then please consider Accept it as the solution to help others.Thanks
    Best Regards,
    Bof

  • Gerard2 Profile Picture
    77 on at
    It worked - thank you so much Bof. Sorry for the slow reply - couldn’t respond to thread on my phone, The only thing I am trying to fix now is formatting. In the email ‘Good morning’ appears but when I draw in the persons name using dynamic content I get the following ‘Good morning Person , As you can see a space has been added between person and the commanand I’m not sure how to remove it. I am using HTML to format the email. In the body of the email using HTML and dynamic content I have the following; Fxif(...)[PERSON],

    The comma is right next to person but it always adds a space - any idea on how to remove the space? Cheers, Gerard

  • LegionsMan Profile Picture
    2 on at

    Hi. I've never used Power Automate before, but this is something I desperately need with the amount of emails I send. Is there a detailed, step-by-step to achieve this desired outcome? Will this also take hold in the Outlook 365 Desktop application? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard