web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Inserting template fro...
Power Apps
Unanswered

Inserting template from a SharePoint List into body of Email using Add-in

(1) ShareShare
ReportReport
Posted on by 2
I created an Outlook Add-in to load be available to click when a new email is created.  This add-in opens my Power App successfully.  In this App, I am pulling in a SharePoint list.  In this list, it has staff and Email Templates that I created.  This all works.

The part that I am getting stuck on:
I created a "Insert Template" Button in my app.  I want that button to "copy/insert that Email Template text that I selected directly into the body of the email.  I DO NOT want it to send, as staff will need/want to edit this info before manually sending.
 
When I am testing in Power Apps, my Button works and copies the text.  Which I am not sure if this is the correct function to use initially, then a paste function.  But I tried just the copy function in the Outlook add-in but it doesn't work at all.   The code I attached to the button is this:
Copy( $"{DataCardValue2.Text}")

DataCardValue2 is a label where the Email Description gets pulled in from my list.  I also included a visual of what I am trying to accomplish.
 
Any help would be greatly appreciated!
 
Thanks!

I have the same question (0)
  • Suggested answer
    MMcCloud Profile Picture
    351 Super User 2025 Season 2 on at
    Good Afternoon, 
     
    Not sure I quite understand the use case entirely but, I can attempt to assist.

    If your goal is to send an email to a user or a customer for example with a template built into it accessed from Power Apps you could just create a gallery to select your templates, then once a template is selected have it filled into a text input field so that the user can add what they need into the message. Then once they do this allow them to select an email whether you source it from another DataSource(list, office365) or have them natively type it is fine but, then click the button to send from within the app. If you want the email sent from a specific mailbox you can set your run only user permissions from the Power Automate Flow Management screen.
    So step-by-step:
     
    1.  Connect your list with the different templates
    2. Create a gallery to select which template the user wants to use
    3. Connect your Office365Users Connector (allow you to dynamically select a recipient)
    4. Connect your Office365Outlook Connecor
    5. Create a text input field that is filled with currentItem.Template ( However you are connected to the selected item in the Gallery and its template in it )
    6. Create a button with the 
    Office365Outlook.SendEmailV2(Recipient,Subject, Body)
    For your values
    7. Recipient can be a dropdown field with the office365users.allusers
    In my understanding you cannot have the text copy in the Power App and automatically appear in an Email(in outlook). That is why I didn't follow that process.
    8. Add a gallery with a similar statment and a textinput for a search bar for the following 
    Office365Users.SearchUserV2({searchTerm:TextInput1.Text,top:5}).value
    So just to rehash at this point a user can: Use Gallery1 to look for a template, Select that template, in textInput2 search for a user they want to send to, in textInput1 continue to edit/add on to the template they have selected, then click the send button and send their email.

    The only thing I would change is I would build the main portion of the email process into a Power Automate Flow that is called that way you can control which connectors a run-only user is operating under incase you want to use a company-wide email or something.
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    You cannot copy text from the app to Outlook using a button but you could use the app to generate an email in the drafts folder then use Outlook to send the mail.
  • KM-07042227-0 Profile Picture
    2 on at
    Maybe I'm trying to much and don't need a button.  I have the SharePoint list pulling in correctly.  It's a list that shows the staff names.  You can click the staff name and that shows the staff templates they can select to be entered into the body.  When the "description" they want in the body of the email is clicked, that gets entered in the body of the email.  They will need to modify this before sending, so I want sending to be manual.  
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard