cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
forest2002
Helper I
Helper I

Creating an Outlook Event from a Button

Hi Guys,

 

I'm struggling to create an outlook event but everything I look at seems to be old versions of this and keeps giving me errors. I want to create an Outlook calendar event (preferably an all date event) but I'm having trouble with the Date/Time bit.

 

Office365Outlook.V4CalendarPostItem(
LookUp(Office365Outlook.CalendarGetTablesV2().value, name = "Calendar").id,
"Working From Home",

 

Where do I go from here? The time is not particularly important to me and isn't specified by the user, it's just the date which comes from a datepicker called DatePickerCal. Any help would be really appreciated.

14 REPLIES 14
StalinPonnusamy
Super User
Super User

Hi @forest2002 

 

Try one more method

Office365Outlook.V4CalendarPostItem(
    "Calendar",
    "Test using Now()",
    Now(),
    Now(),
    "(UTC) Coordinated Universal Time",
    {
        body: "Meeting Notes"
    }
)

 

forest2002
Helper I
Helper I

This above works and also now have my datepicker working and I think the problem is just how it goes into outlook. I realised when it was working it was just going in the wrong way around, until i tried Chrome. I think I just have this problem now and i'm guessing there is no solution 😞 

https://powerusers.microsoft.com/t5/I-Found-A-Bug/Confirmed-bug-with-V4CalendarPostItems/td-p/523988

 

forest2002
Helper I
Helper I

If so would a v2 solution still work and what would I need to change? Thanks for all your help on this it's really helped me figure out whats going on 

StalinPonnusamy
Super User
Super User

Hi @forest2002 

 

As a workaround, we can try to use V2

 

 

Office365Outlook.V2CalendarPostItem(
    "Calendar", //Calendar name
    "Creating using V2CalendarPostItem 3", //Subject
    DateTimeValue("10/30/2021 10:00:00 AM"), //Start
    DateTimeValue("10/30/2021 10:30:00 AM"), //End
    {body: "Meeting Notes"} //Body
)

Note: No need to convert to UTC. System considers sending time as local and system converts to UTC

 

forest2002
Helper I
Helper I

Thank you!! Thats working across all browsers and from Teams. Thanks so much for taking the time to help with this it's really appreciated!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

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.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,654)