cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JLam63
Level: Powered On

Create event in O365/Outlook calendar

Hi, I'm wondering if it is possible (and if so how) to create an event and have it added to your O365/Outlook calendar. I believe the 'Out of Office' app did this but I cannot understand how it is done.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Create event in O365/Outlook calendar

Hi @JLam63,

 

Here is how you do this:

  1. Create a Blank App
  2. Add an “Office 365 Outlook” data source.
  3. Insert a Drop down to show a list of available Calendars. Rename the control to “calendarDropDown”.
  4. Set the Items property to: Office365.CalendarGetTables().value
    powerapps1.jpg
    You should see a list of your available calendars:
    powerapps2.jpg
  5. Insert a Gallery to show the list of calendar items.
  6. Set the Items property to: Office365.CalendarGetItems(calendarDropDown.Selected.Name).value
    You should see the list of items in the selected calendar.
  7. Format the gallery as necessary by adding/deleting controls.  Some of the properties you can use include “Subject”, “Start”, “End”, “WebLink”, “BodyPreview”, etc.
    powerapps3.jpg
  8. Format the gallery as necessary by adding/deleting controls.  Some of the properties you can use include “Subject”, “Start”, “End”, “WebLink”, “BodyPreview”, etc.
  9. To create a calendar item, you can insert controls for taking user inputs and call the following operation on the connector:
Office365.CalendarPostItem(
    calendarDropDown2.Selected.Name,
    Text(startDatePicker.SelectedDate, DateTimeFormat.UTC),
    subjectTextInput.Text,
    { Body: { Content: messageTextInput.Text, ContentType: "HTML" }}
    )

Let me know if this helps.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support Team
Community Support Team

Re: Create event in O365/Outlook calendar

Hi @JLam63,

 

Here is how you do this:

  1. Create a Blank App
  2. Add an “Office 365 Outlook” data source.
  3. Insert a Drop down to show a list of available Calendars. Rename the control to “calendarDropDown”.
  4. Set the Items property to: Office365.CalendarGetTables().value
    powerapps1.jpg
    You should see a list of your available calendars:
    powerapps2.jpg
  5. Insert a Gallery to show the list of calendar items.
  6. Set the Items property to: Office365.CalendarGetItems(calendarDropDown.Selected.Name).value
    You should see the list of items in the selected calendar.
  7. Format the gallery as necessary by adding/deleting controls.  Some of the properties you can use include “Subject”, “Start”, “End”, “WebLink”, “BodyPreview”, etc.
    powerapps3.jpg
  8. Format the gallery as necessary by adding/deleting controls.  Some of the properties you can use include “Subject”, “Start”, “End”, “WebLink”, “BodyPreview”, etc.
  9. To create a calendar item, you can insert controls for taking user inputs and call the following operation on the connector:
Office365.CalendarPostItem(
    calendarDropDown2.Selected.Name,
    Text(startDatePicker.SelectedDate, DateTimeFormat.UTC),
    subjectTextInput.Text,
    { Body: { Content: messageTextInput.Text, ContentType: "HTML" }}
    )

Let me know if this helps.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

slongwell
Level: Power Up

Re: Create event in O365/Outlook calendar

Hi @v-monli-msft.  Creating the gallery of calendar events is the easy part, thanks for your clear directions. Can you expand on step # 9 to create new calendar items? This is the part that I can't find good directions for. Thanks

santosh910
Level: Powered On

Re: Create event in O365/Outlook calendar

Hello Mona,

 

I was going through your tutorial, which is very easy and helpful, thank you!

 

One quick thing I would like to find is how to send to a different individual in the organization?

 

I have used your tutorial, but I am able to only send to myself as there is no option to select an email address, like we can do for sending email ID.

 

Any help or guidance is greatly appreciated.

 

Office365.CalendarPostItem(
    calendarDropDown2.Selected.Name,
    Text(startDatePicker.SelectedDate, DateTimeFormat.UTC),
    subjectTextInput.Text,
    { Body: { Content: messageTextInput.Text, ContentType: "HTML" }}
    )

Best,

Santosh

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 227 members 3,246 guests
Please welcome our newest community members: