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 / PVA Send mail with Mes...
Copilot Studio
Unanswered

PVA Send mail with Message INput

(0) ShareShare
ReportReport
Posted on by 508

Can someone please present an example of how I can build a PVA flow where I can ask the bot to send an email to someone in the ACTIVE directory, not sure if we can use the name or do we need to input the whole email...that is a minor thing though. The second thing would be to send a message. So first the bot would say who do you want to send an email to and the second thing would be what do you want to say.  Is that possible ?  If so if someone would be kind enough to show an example that would be awesome..Thank you kindly.

Categories:
I have the same question (0)
  • Monkeyman Profile Picture
    325 on at

    Yes. You can do this with Power Automate. 

    Steps

     

    1. Go into Power Virtual Agents and to the topic you want to use the cloud flow.

    2. Click on the plus icon under a step and click call an action and then create a power automate cloud flow

    3. Power Automate will open with a trigger step from Power Virtual Agents and an end step returning values back to Power Virtual Agents. 
    4. Expand the trigger step and create two text inputs, one for Email Address, the other for Email Message. 

    5. Add another step under this in the flow and search for Office365 Users, and use the Get Profile action

    6. For the UPN choose the  Email Address from the step above in the dynamic content box that appears. 
    7. Add a compose step, and type in The Email address is invalid. 
    8. Click the three dots on the compose step and select configure run after, only tick the is failed box.

    9. Add a new step under the compose and find the Send an Email action

    10. Use the mail from the Office 365 action in the To: field and use the Email message value in the body section. 

    11. Click on the three dots on Send an email action and click Configure run after, click the tick in the failed checkbox only.

    12. Add a new step, a compose action and in the text field type “The message has been sent successfully”. 
    13. In the Return values to Power Virtual agent step, add an output and select both output dynamic content values from both the first and second compose steps. 

    mark this as a solution if this helped. Thanks. 

  • VeeLearnMSFT Profile Picture
    508 on at

    HI Monkeyman,

    Also is there a way for a user to type the persons name and the chatbot provides a list of addresses? or does the user always have to input an accurate email address?  Is there a way to provide a selection of an email address?

     

    So I got it to work only after removing the configure run after and selecting successful. If i change it to is failed it does not send.  When I pass the email you can see in the Get user profiel (v2) that it matched that the account is enabled but it fails in the first componse action when I enable the "if failed".  Do I need to flip it to successful?

    VeeLearnMSFT_6-1651928323459.png

     

    VeeLearnMSFT_0-1651927528258.png

    It fails at the compose if i enable if failed:

    VeeLearnMSFT_1-1651927561408.png

    VeeLearnMSFT_4-1651927968477.png

     

    If I remove the "if fails" run after my flow works:

     

     

     

    VeeLearnMSFT_2-1651927663350.png

    VeeLearnMSFT_3-1651927698213.png

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Using Bot Framework Composer makes life easier when dealing with forms on PVA.

    It takes a bit to set up everything, but when is ready all goes flawlessly.

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 637

#2
chiaraalina Profile Picture

chiaraalina 171 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 141

Last 30 days Overall leaderboard