Re: How to make the Chatbot send email
Hi @Engsoso2089,
Below is an example.
First create the Power Automate flow.
https://docs.microsoft.com/en-us/power-virtual-agents/advanced-flow
1. Add a Power Virtual Agents trigger action. Add a text input, call that EmailAddress.
2. Add a Send an email (V2) action. Use the EmailAddress field in the To field of the action.
3. Add a Return value(s) to Power Virtual Agents action. Add a Result text output. Set a message which you can use to confirm to the user the e-mail has been sent.
![sendanemail.png sendanemail.png](/_api/msdyn_richtextfiles%2826C69827-EC25-4C9E-A2DB-FC6C90E77C83%29/msdyn_imageblob/$value?size=full)
Power Virtual Agent setup.
1. Create a new topic in a bot. Call it Email. Add a trigger phrase like E-mail me. Save your topic and go to the authoring canvas.
2. Add a Question like 'What is your preferred e-mail to use?'. Use the user's entire response. Save that response in a variable like VarEmail.
3. Add a Call Action. Connect it to the flow we created earlier. Make sure you map the VarEmail to the EmailAddress input variable from the flow.
4. Add a Show message. Use the output result variable to show the confirm message to the user.
![newemailtopic.png newemailtopic.png](/_api/msdyn_richtextfiles%28A2F1F5CF-1BDA-4A91-A173-5601F50F0B4F%29/msdyn_imageblob/$value?size=full)