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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Determine in PVA if wh...
Copilot Studio
Answered

Determine in PVA if where are in the morning, afternoon or at night ?

(0) ShareShare
ReportReport
Posted on by 1,066

Dear community,

In my previous version of Power Virtual Agent i connected a Power Automate flow to greet the customer.

The Power Automate flow retrieves the user from the Office365 connector and Time connector determines

if where are the morning, afternoon or at night.

 

So it displays the following message:

"Good afternoon Peter, I am the chatbot. How can i help you?

 

In het new version of PVA i do not need the PA flow to get my name from the office365 connector. I just use

the prebuild variable User.Firstname

 

My question: is it possible to determine if we are in the morning, afternoon or at night using perhaps the variables Conversation.LocalTimeZone and / or the variable Conversation.LocalTimeZoneOffset

 

This is my power automate flow: 

PeKi72_0-1696937671506.png

 

the value of the initialize variable is: int(body('Hour'))

the value of the compose is: 

if(less(variables('varNumber'),04),'Goedenacht ', if(less(variables('varNumber'),12),'Goedemorgen ', if(less(variables('varNumber'),18),'Goedemiddag ','Goedeavond ')))
 
Can this be done better now that i have the new version of PVA ?

Gr.P

 

 

I have the same question (0)
  • Verified answer
    remidyon Profile Picture
    Microsoft Employee on at

    Hi @PeKi72 

    If you bot is in a single timezone you could use the Now() PowerFX and adjust the value based on your timezone.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 645

#2
Vish WR Profile Picture

Vish WR 234

#3
Haque Profile Picture

Haque 211

Last 30 days Overall leaderboard