cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rick_black
Advocate II
Advocate II

Show Sent Emails in Power Apps some sort of Gallery

I am sending EMails from Power Apps directly on Submit button using Office365Outlook.SendEmailV2 by inputting an Email and subject in text boxes, Only the Message is hardcoded which contains a link to a survey. This means the Emails I am sending are not being recorded anywhere. 

I wanted to record the EMail and the time Sent on some sort of gallery so as to keep informed of who has not yet received an Email from a manual list. I don't know Power Automate can come into play with this. 

thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
PG_WorXz10
Community Champion
Community Champion

Hi @Rick_black , 

 

There is no need of adding a power automate if you can simply add the send email in a IfError condition if there is no error you can patch the email details like date and time of email or recipient into a list item. 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

Just create a list in SharePoint with columns that represent the data you want to track.  Then use a Patch() statement to save the data to the list whenever you send an email. Something like this:

Patch(datasourcename,defaults(datsasourcename),{Title:email.Text, TimeSent: Now()})


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

7 REPLIES 7
PG_WorXz10
Community Champion
Community Champion

Hi @Rick_black , 

 

There is no need of adding a power automate if you can simply add the send email in a IfError condition if there is no error you can patch the email details like date and time of email or recipient into a list item. 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Pstork1
Dual Super User
Dual Super User

Galleries don't provide permanent data storage so you'll need to use some kind of data source (SharePoint, Dataverse, Excel) to store the information.  Then bind that data source to the gallery.  Each time you send an email patch a record to the data source.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Understood. However, how do we do this @PG_WorXz10 ?

 

Hi @Rick_black ,

Something like below if it helps in your scenario. 

 

IfError(Office365Outlook.SendEmailV2("xyz@email.com","Test Email","Test Body"),Notify("Error occured. Email was not sucessfull"),Patch(DataSource,Defaults(DataSource),{EmailDate:Now(), Recipients:"xyz@email.com" }))

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

@Pstork1 , I get that I will need a data source,and SharePoint would be the best for this however, that connection from text boxes to having the data in SharePoint list so as to reference it is the problem.            

Office365Outlook.SendEmailV2(txtEmailAddress, txtEmailsubject, " Please fill for us this questionnaire  here");  //If(IsEmpty(Errors(Sharepoint)),  UpdateContext({varemailemptyerror: If(IsBlank(txtEmailAddress),true,false)}); UpdateContext({varsubjectemptyerror: If(IsBlank(txtEmailsubject),true,false)});

Notify(     "Email sent Successfully",     NotificationType.Success, 3000);

UpdateContext({resetControls: ""})

 

 

 

this is my code at the moment. Let me see how to add your code to this..

Just create a list in SharePoint with columns that represent the data you want to track.  Then use a Patch() statement to save the data to the list whenever you send an email. Something like this:

Patch(datasourcename,defaults(datsasourcename),{Title:email.Text, TimeSent: Now()})


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,739)