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 / Create calendar event ...
Power Apps
Unanswered

Create calendar event from assigned task

(0) ShareShare
ReportReport
Posted on by

We're trying to use the Tasks app in Teams to organize a lot of what we do, and members of the team want Outlook calendar events created automatically when a task is assigned to them. I've got a screenshot of the issue below, but the crux of the issue is the date formatting:

 

Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'item' validation failed in workflow operation 'Create_event_(V4)': The parameter with value '"@triggerOutputs()?['body/startDateTime']"' in path 'item/start' with type/format 'String/date-time' is not convertible to type/format 'String/date-no-tz'.'
 
In the end, I'd actually like to create a 1 hour event for 9am-10am on the due date, but at the moment I can't get it to save and run at all, pulling the date string from the Planner event. Any help?
Thanks!
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    The DateTime values you are supplying are probably in UTC mode.  They need to be converted to TimeZone independent format.  You can do that with the following format.  just substitute your input values for the UTCNow() in the fuction below.

    formatDateTime(utcNow(),'yyyy-MM-ddTHH:mm:ss.fffffff')
  • mickyb23uk Profile Picture
    50 on at

    Hi all, just bumping this one as I can't see a resolved/solved answer for it.

    I'm having exactly the same request, when creating a planner task with a due date in the future and it creating a calendar event on that due date from 9-10am every time.

     

    I've tried using these 2 expressions but it keeps reverting back to Zulu/UTC time.

    Note: These were from the Power Apps Template Library for "Create an event in Outlook on New Planner task"

     

    coalesce(triggerBody()?['startDateTime'],convertFromUtc(utcNow(),'AUS Eastern Standard Time'),'dd-MM-yyyy')
    coalesce(triggerBody()?['dueDateTime'],convertFromUtc(utcNow(),'AUS Eastern Standard Time'),'dd-MM-yyyy')

     

    mickyb23uk_0-1675749660662.png

     

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    You are converting the date/time from UTC, but then formatting it to be date only. That will automatically become midnight UTC.  The Start and End time should be input using UTC.  The Timezone setting is used to determine what time zone the user should see the event in, not what time zone is used in the Start and End time.

  • mickyb23uk Profile Picture
    50 on at

    After following a very similar guide (here) I was able to get the desired results I was after.

    Hope this helps the next person.

     

    The expressions I used in the below screenshot are:

     

    Compose Function

    Inputs : formatDateTime(triggerBody()?['dueDateTime'],'MM-dd')

    Note : I'm using just the dueDateTime value here.
    In Planner, I'm just using the quick card which only has the 'Set due date' option (along with task name & assignee)

     

    Create Event (V4)

    Start Time : addToTime(outputs('Compose'),8,'Hour') - This sets the event start time to 8:00am

    End Time : addToTime(outputs('Compose'),9,'Hour') - This sets the event end time to 09:00am

     

    mickyb23uk_0-1675810959173.png

     

     

  • BW-04020315-0 Profile Picture
    2 on at
    mickyb23uk did you have to create this flow for each of your Team members or just the creator of the task in planner? The link in your solution appears to no longer work could you please share that again? Any thoughts on creating a reminder event say one week before the due date? My team would like an outlook event reminder to pop up one month before due date, one week before due date and then on the due date.

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