cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bbsin
Post Prodigy
Post Prodigy

is there anyway auto send email to outlook to user ???

Hi

 

I like to know is there any way to auto send email notification to user when they click the book and unbook button 

- stating that they have successful booked with event date and time and link back to powerapps if needed in the email body?

 

Can anyone help with the syntax . thanks 

 

bbsin_0-1631694701533.png

bbsin_2-1631694749025.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FraserCDear
Frequent Visitor

Hi again @bbsin 

 

So given what you have said, it sounds like you are not keeping bookings in the list if they have been cancelled so if this is how you want to do it, you can use the 'When an item is deleted' trigger to run your flow to E-Mail the user.  There are lots of Sharepoint triggers : 

 

FraserCDear_0-1631778695413.png

With regards to the calendar ID.  (If I understand you correctly) You want to add it to the Calendar of the person making the booking? 

 

In order to get the users general calendar you can use the 'GetMyProfile (V2)' and then select Calendar in the Drop down.  In Power Automate the actions higher in the flow create dynamic content for the actions below them.   When you get My Profile you can then use the returned attributes in the Create Event.

FraserCDear_1-1631779338265.png

 

Sending an E-Mail 5 mins before the end could be done a couple of different ways, but I would say that it really depends on the use case.  A quick a simple way to do it would be to run a flow every 5 minutes which filters your SP list on date and then use a condition to looking for meetings that finish in the next 5 minutes.  This isnt the most efficient or clever use of Power Automate but it would work.  

 

Hope thats helpful?

 

 

 

View solution in original post

12 REPLIES 12
FraserCDear
Frequent Visitor

Hi BBSin,  

There are a number of ways to do this. You could trigger a flow using PowerAutomate to send an E-Mail or do it direct from the app using a send Email.  

 

The following Syntax should work :

Office365Outlook.SendEmailV2(
Email,
Subject.Text,EmailBody.HTMLText
)

 

It really depends what you want to say and what needs to be in the E-Mail. 

 

I find using flow can help with structuring the E-Mail as you have more control over who the E-Mail comes from, urgency, attachments etc. 

 

What exactly do you want it to say?

zmansuri
Super User
Super User

App.OnStart

Set(varUser,User())

 

Add Outlook connector.

Button OnClick property;

Office365Outlook.SendEmailV2(varUser.Email,"Subject","Body")

---------------------------------------------------------------------------------------------------------------------------


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

bbsin
Post Prodigy
Post Prodigy

@FraserCDear 

 

thank, how to set the workflow?  I can try

 

Basically when the button book is click there's a pop up message to tell them a slot is booked

 

the user should at this time receive any notification in outlook email

 

"Thank You for booking event title , date and time, and the link back to powerapps.

Is it 

bbsin_0-1631699313272.png

is there a option to set for them to also save it as outlook calendar when  the received the email in the email body?

 

How about if it's unBooked it's will removed the record in the SP list, how to add in here to auto send if the item is deleted?

 

 

PowerApps... 

not too sure.. 

bbsin_0-1631697922201.png

 

It should show the 

Title, Category and time and date booked by the person.

bbsin_1-1631698068607.png

 

 

Regards

 

@zmansuri 

 

Thanks.  O- ,"Subject","Body" - do you mean I need to type in sentences?? where to get the subject and body?

bbsin_0-1631697345032.png

 

On start I already hv 

bbsin_1-1631697454179.png

 

varUser.Email E will be capital. and yes you need to write email subject and email body in there in double quotes

---------------------------------------------------------------------------------------------------------------------------


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

Hi Again, 

 

I can see you are using sharepoint as your data store which means that when someone deletes a booking, what happens on the sharepoint list.  Are you updating a field? 

 

In Power Automate you can select another trigger called When an item or a file is modified. 

FraserCDear_0-1631703311483.png

 

Then use a condition to say if 'Status' (or whatever you are using in your sharepoint list) = "Cancelled"

 

Send Cancellation E-Mail. 

 

 

You can actually create a meeting directly in the user who has made the booking's calendar by using another PowerAutomate connector called : Create Event.  If you put this after your E-Mail in the flow, then the user will get the E-Mail and then the booking will appear in their calendar... You can do the same for deletions : 

 

FraserCDear_1-1631703500379.png

 

Hope that helps! 🙂 

 

Hi @FraserCDear 

 

I dont have a status inside SP list, when the user unbook.  The record inside SP list will auto delete it away.

 

Thus how to set the deleted record notification of unbook?  Thank you

 

The create event.. I have not use before..

What is the calendar id?  I don't have a calendar,  this calendar should link to where?

What if my calendar for the event is not the same link as the item created SP

 

Also is there a way to send the email notification 5min before the end time ?  Thank you

 

Please advise thanks.

 

bbsin_0-1631766988527.png

 

FraserCDear
Frequent Visitor

Hi again @bbsin 

 

So given what you have said, it sounds like you are not keeping bookings in the list if they have been cancelled so if this is how you want to do it, you can use the 'When an item is deleted' trigger to run your flow to E-Mail the user.  There are lots of Sharepoint triggers : 

 

FraserCDear_0-1631778695413.png

With regards to the calendar ID.  (If I understand you correctly) You want to add it to the Calendar of the person making the booking? 

 

In order to get the users general calendar you can use the 'GetMyProfile (V2)' and then select Calendar in the Drop down.  In Power Automate the actions higher in the flow create dynamic content for the actions below them.   When you get My Profile you can then use the returned attributes in the Create Event.

FraserCDear_1-1631779338265.png

 

Sending an E-Mail 5 mins before the end could be done a couple of different ways, but I would say that it really depends on the use case.  A quick a simple way to do it would be to run a flow every 5 minutes which filters your SP list on date and then use a condition to looking for meetings that finish in the next 5 minutes.  This isnt the most efficient or clever use of Power Automate but it would work.  

 

Hope thats helpful?

 

 

 

Hi @FraserCDear,

 

ok noted with thanks ":)

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,888)