I am trying to create an email that launches from Power Apps and I want to add a hyperlink that will return the user to the app, however the hyperlink looks messy within the body of the email. I would like to change the hyperlink to the app to say 'here'. Can anyone help me with this. I am a complete and utter newbie to Power Apps and I am self taught so hoping the solution is a fairly simple one. Thanks
To make it obvious to anyone else finding this thread:
Use the Office365Outlook.SendEmailV2 connector, not Office365Outlook.SendMail.
This will allow you to use HTML links in the form <a href="url">link text</a> within a string in your Power App formula. For example:
Office365Outlook.SendEmailV2(User().Email, "Email Subject", "Message body. Please use the following link <a href='https://apps.powerapps.com/play/...'>Link Text They See</a>");
I realised where we were getting our differences. My start was set to Office365Outlook.SendEmail and yours was Office365Outlook.SendEmailV2.
Also there was a close bracket at the end of my URL, so found another URL for my app and added that instead. I found the URL in the app settings.
So I changed both, however, then it turned my whole email into Times New Roman and without carriage returns
Figured out who to add them in and change the font and it now looks like this.
Office365Outlook.SendEmailV2(DataCardValue11,
"Sub Approvals Board Slot Booked: " & Date_of_Meeting,
"<font face = Calibri (Body)>" & "<b> A Sub Approvals Board slot has been booked on: </b>" & Date_of_Meeting &
"<br>" &
"<b> Programme: </b>" & DataCardValue6 &
"<br>" &
"<b> Programme/Project: </b>" & DataCardValue7 &
"<br>" &
"<b> Project ID: </b>" & DataCardValue8 &
"<br>" &
"<b> Current Gateway Stage: </b> " & DataCardValue12 &
"<br>" &
"<b> Gateway Stage for Review: </b>" & DataCardValue5 &
"<br>" &
"<b> PM: </b>" & DataCardValue10 &
"<br>" &
"<b> Requested by: </b>" & DataCardValue11 &
"<br>" &
"<b> Gateway Workbook Due </b>" & AllDocumentationDue &
"<br>" &
"<b> All Documentation Due </b>" & Label12 &
"<br><br>" &
"To upload your documentation open the app, <a href='URL'> here</a>, find your board date, " & Date_of_Meeting & ", open your selected Sub Approvals Board slot, and select the SharePoint documentation link (available 2 weeks before your booked date) and add your xx link. Please adhere to the documentation due dates above, or your Sub Approvals board slot will be cancelled." & "</Font>"
,{Cc:"xxx@xx.co.uk"}
);
SubmitForm(Attendance_Selection_Screen)
I am now happy to said this has been solved.
However as a bonus, if you can help me change the low importance flag to normal that would be great 😉
Hi @SaraW1987 ,
The previous solution will work, however I went on a bit of exploring with sending HTML directly from the Office365Outlook connector.
Office365Outlook.SendEmailV2("wxxxxxxx@xxxxxxx.com","Testing HTML Link","To upload your document open the app: <a href='https:apps.powerapps.com/play/ . . .' > here </a>
find your board slot . . . ")
and got back an email as below - the hyperlink worked fine.
I think you only need to get this bit between quotes "" in the concatenation at it should work perfectly as above.
If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item.
Hi @SaraW1987 ,
Try putting it last bit in a HTML box (you can hide it or put it on another screen) and then adding (I will call it HTMLBox)
& HTMLBox.HTMLText &
to wherever you need to add it in your email.
Incidentally, the easiest way to send HTML by email and see exactly what the output is going to be is to use a HTML box for the whole lot (you even test if the link works with the Alt key or play) and then simply send the HTMLBox.HtmlText as the body of the email.
If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item.
I think I might just be confusing matters here with me being new to Power Apps but I am not entering the code to a html box, it is on a button. When the button is selected it generates an email, then saves the data to sharepoint. Does that make a difference? I have done what you said with the quotes and that is what is causing the text in the email to pull through that I sent to you before.
Sorry, if I am just being irritating. I am grateful for any help.
Hi @SaraW1987 ,
You need to concatenate the last bit in quotes - put some quotes before To open your document and after slot
To stop second-guessing myself, I have just loaded the exact code into a blank HTML box
And the output was (and the hyperlink worked, but obviously the URL was invalid)
If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item.
It no longer has any errors but it has pulled everything I wrote to the email. The email text that came through is below.
Hi @SaraW1987 ,
I missed the possibility you were hard-coding the PowerApps URL - this is far less complex - just add the bit from the second code - no concatenation needed. The URL just need to be in single quotes to work in HTML
To upload your document open the app: <a href='https:apps.powerapps.com/play/ . . .' > here </a>
find your board slot . . .
If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item.
I have sent something over to you. Thanks for helping.
MS.Ragavendar
14
LC-26081402-0
10
stampcoin
6