web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow creating tasks in...
Power Automate
Unanswered

Flow creating tasks in planner - getting timings right

(0) ShareShare
ReportReport
Posted on by

I'm setting up a flow that reads an excel table, then creating a task for each entry in the table.

The table looks like this:

Bucket Name

Task Name

Progress

Priority

Assigned To

Created By

Day of week

Start Time

Due Time

Description

Daily Tasks

Daily Task 1 - Monday

Not started

Medium

my@email.com

my@email.com

1

9.00

12.00

1st Daily Task added by Excel

The schedule is planned to start on a Sunday at 4am.  The Day of the week, 1 is Monday, 2 is Tuesday, etc.

When the (planner) 'create a task' step runs the start / due uses the following expression to set up the correct day:
addDays(utcNow(),int(items('Apply_to_each')?['Day of week']))

I then update the description after a delay, then using the 'Update a task (V2)' want to add in the 'timings' so the tasks appear in the correct order for the day:

addHours(body('create_a_task')?['startDateTime'],int(items('Apply_to_each')?['Start Time']))

and

addHours(body('create_a_task')?['dueDateTime'],int(items('Apply_to_each')?['Due Time']))

This works... sort of!

As the tasks are scheduled to run at 4am the timings run from when the actual task is created, so some the tasks for later in the day are running over to the following day.

When I create the initial start / due dates how can I force it to 00:00?

I'm going to be running similar flows for a variety of teams / planners and want to stagger when the run. 

Also in planner and when you view it in Outlook as a linked iCalendar can the tasks be seen across there times, not as an 'all day' task?

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at
    Re: Flow creating tasks in planner - getting timings right

    Hello @Anonymous 

    As I understood, you need to remove the time from some date fields. You can do it using the following expression:

    addDays(utcNow(),int(items('Apply_to_each')?['Day of week']),'yyyy-MM-dd')

     

    On the other hand, if a planner task starts in one day and finishes on another different one, you will see the event as a full day one in Outlook/iCal.

     

    Hope it helps!

    Ferran

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard