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 / Power Apps / Send Email as well as ...
Power Apps
Answered

Send Email as well as send data to Excel

(0) ShareShare
ReportReport
Posted on by 69

Thanks to this forum my very first app is nearly ready for people to test, the only thing left is to be able to send the data in a form in a calander request to someone.  I've had a look at sending emails via Flows but it never seems to send or I dont have the options when I try to create the Flow.

 

Firstly is being able to send email/calander requests in a PowerApp only available if you use Flows or is it even possible to send an email with only using PowerApps.  The data that I want to send will be in the form that I'm clicking to create a ticket.. 

 

Kind Regards

James

Categories:
I have the same question (0)
  • BitLord69 Profile Picture
    914 on at

    It is very doable to send an email from within PA. I have done that, but not a calendar request. You send an email by using the Office365.SendEmail function and you can use fields from your gallery or collection, see my example below:

     

    Office365.SendEmail(ThisItem.BestEpost; "Din beställning till IT-avdelningen har behandlats"; "Beställningen du skickade " & ThisItem.Bestallningsdatum & " har nu blivit inlagd i beställningslistan av " & User().FullName & "." & Char(13) & "Du beställde:" & Char(13) & Char(13) & Concat(gOnskeRader.AllItems; Anvandare & " " & Avdelning_Plats & " " & Benamning & " " & Antal & Char(13)) & Char(13) & "Mvh" & Char(13) & "IT-avdelningen")

    I use the function Concat to loop through a gallery to add information for each row and Char(13) to force a new line.

     

    The Office365 object also has a function called CalendarPostItem, but the guide, found here https://powerapps.microsoft.com/en-us/tutorials/connection-office365-outlook/, doesn't give any details as to how to use it. Maybe that's a possibility, but you'd have to do a bit of research on how to use it.

     

    Best of luck!

     

    EDIT - I found a link to a discussion about the CalendarPostItem here: https://community.powerapps.com/t5/PowerApps-Forum/Writing-an-Event-to-Outlook-Calendar/m-p/51818

  • JamesOxton Profile Picture
    69 on at

    Hi there,

     

    Many thanks for the info I've been playing around and I've got the standard parts setup for a basic form :-

     

    Office365.SendEmail(DataCardValue19, DataCardValue20, DataCardValue21); ResetForm(Form1)

     

    That returns the correct information so far, but I've got more fields and I can't work out how to add those fields to the email?  

     

    Within your example :-

     

    Office365.SendEmail(ThisItem.BestEpost;

     

    What is this doing and what information do I need to put there in my line?

     

    Any help most welcome 🙂

  • Verified answer
    BitLord69 Profile Picture
    914 on at

    As the Help says, the parameters for SendEmail are: Office365.SendEmail(adress, topic, body), all strings

     

    In my example, ThisItem.BestEPost refers to a field with the email address I want to send the email to

     

    "Din beställning till IT-avdelningen har behandlats" is the topic

     

    The next parameter is a concatenation of the body: First I have some initial text, then I add a field (using the &-operator), some more text, the name of the user, a new line, some more text and two more new lines. Then it gets interesting - by using Concat I loop through a gallery (gOnskeRader.AllItems) and add fields from each row in the gallery to the body of the email.

     

    At the very end I add two more blank lines and a greeting to top things off.

     

    "Beställningen du skickade " & ThisItem.Bestallningsdatum & " har nu blivit inlagd i beställningslistan av " & User().FullName & "." & Char(13) & "Du beställde:" & Char(13) & Char(13) & Concat(gOnskeRader.AllItems; Anvandare & " " & Avdelning_Plats & " " & Benamning & " " & Antal & Char(13)) & Char(13) & "Mvh" & Char(13) & "IT-avdelningen"

     

    So, in the topic or body (or both), you just have to string together what you want the topic/body to say.

     

    NB - You might run into trouble just referencing the Datacard, fopr instance DataCardValue21. Instead it might be better to reference the vaue of the datacard, DataCardValue21.Value as has been reported elsewhere.

     

    Good luck!

  • JamesOxton Profile Picture
    69 on at

    Many thanks for the input it seems to work like a charm via email... now onto the Calendar 🙂

  • BitLord69 Profile Picture
    914 on at

    Glad I could help, @JamesOxton!

     

    Good luck with the calendar, I haven't used it yet! If you find a solution, post it here!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard