Skip to main content

Notifications

Calling Actions from Copilot Studio
Answered

Get Email (v3) return to PVA

Posted on by 94

Hi PVA community, 

Apologies, bit of an amateur trying to get to grips with flows in PVA. I wondered if it was possible using the Get Email V3 function to return content to PVA. 

 

For context I'm hoping employees can search to see if an email has been received from a customer to a shared mailbox. Using power automate to then inform the employee via PVA whether or not the email has been received.

 

I've attach the below image for what I'm hoping to achieve, I'm just having difficulties with the branched conditions. I've tried using condition & compose but no avail. 

 

Thank you so much for any help.

 

Matthew5_0-1639424139151.png

 

Categories:
  • Matthew5 Profile Picture
    Matthew5 94 on at
    Re: Get Email (v3) return to PVA

    Thank you so much! I really appreciate your help

  • Expiscornovus Profile Picture
    Expiscornovus 1,708 on at
    Re: Get Email (v3) return to PVA

    Hi @Matthew5,

     

    Yes, you can use a formatdatetime function for that.

     

    Change the expression to for example to the below to get 15-12-2021 (dd-MM-yyyy).

     

    formatDateTime(first(outputs('Get_emails_(V3)')?['body/value'])['receivedDateTime'], 'dd-MM-yyyy')

     

     

  • Matthew5 Profile Picture
    Matthew5 94 on at
    Re: Get Email (v3) return to PVA

    Thank you so much! That's worked. 

    Not the end of the world but I don't suppose you know if there's a way to format the way the date/time is returned. It's in an unusual format.

     

    Matthew5_0-1639569803418.png

     

  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 1,708 on at
    Re: Get Email (v3) return to PVA

    Hi @Matthew5,

     

    I would use a string variable at the beginning of your flow. In the condition you can set that variable with either the receivedDateTime value (of the first e-mail it found) or your own custom message if it hasn't found anything.

     

    Below is an example of that approach.

     

    first(outputs('Get_emails_(V3)')?['body/value'])['receivedDateTime']

     

    messagefrombot.png 

  • Matthew5 Profile Picture
    Matthew5 94 on at
    Re: Get Email (v3) return to PVA

    Checking out similar posts in the power automate community Solved: Get emails (V3) - action if no results - Power Platform Community (microsoft.com),

    I think I've got the action if no email received (I hope).

     

    Ideally it would have an action for - if 0 emails received return a message to PVA along the lines of "no email received"
    However, if there was an email there it would return date/time received etc.

    Thank you!

     

    Matthew5_0-1639426733902.png

     

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,997

#3
Expiscornovus Profile Picture

Expiscornovus 1,708

Leaderboard

Featured topics