cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bodgerrolls
Level: Power Up

Flow Create All-day Event from Due Date

Hi,

 

I'm trying to create flow that adds an all-day event into my calendar when a google task is created. I'm editing a library flow which currently creates a 30 min event at midnight.

 

My problem is that the dynamic content from the trigger is limited to due date and in order to make the event an all day one I believe I need to set the end time to 24H after the start time.

 

I am attempting to do this with addHours: 

 

Screenshot from 2019-01-07 19-58-04.png

 

But it's not working out. 

 

Apologies - I'm a little our of my depth but have spent some hours trying to work it out. If someone could show me how to construct the expression and strings correctly I'd be grateful. Many thanks!

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow Create All-day Event from Due Date

Hi @bodgerrolls,

 

Could you provide a clear screenshot of the Flow configuration?

I am not sure what the trigger you are using.

If the trigger you configured is "When a task is added to a task list", you could use the following method to create "all day event".

  1. Configure Get a task from a task list action to get the Due date of the task.
  2. When configuring Task ID, first select "Enter custom value", then fill in "Items Task Id" output from the trigger.
  3. Then configure the Due output of this action in End time, use addDays () function to get the start time of the day and populate it in Start Time field.
  4. Finally, you need to set "Is all day event?" option to Yes.

Start time-Expression:

addDays(body('Get_a_task_from_a_task_list')?['due'],-1)

Image reference:

1.PNG

Please take a try again.

 

Best Regards,

Barry

Community Support Team _ Barry
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

4 REPLIES 4
Community Support Team
Community Support Team

Re: Flow Create All-day Event from Due Date

Hi @bodgerrolls,

 

Could you provide a clear screenshot of the Flow configuration?

I am not sure what the trigger you are using.

If the trigger you configured is "When a task is added to a task list", you could use the following method to create "all day event".

  1. Configure Get a task from a task list action to get the Due date of the task.
  2. When configuring Task ID, first select "Enter custom value", then fill in "Items Task Id" output from the trigger.
  3. Then configure the Due output of this action in End time, use addDays () function to get the start time of the day and populate it in Start Time field.
  4. Finally, you need to set "Is all day event?" option to Yes.

Start time-Expression:

addDays(body('Get_a_task_from_a_task_list')?['due'],-1)

Image reference:

1.PNG

Please take a try again.

 

Best Regards,

Barry

Community Support Team _ Barry
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

bodgerrolls
Level: Power Up

Re: Flow Create All-day Event from Due Date

Thank you so much for your reply! And sorry for the slow response.

 

I've tried your solution, which makes sense, but I'm still haveing no success with the date string. Here's a screenshot with both the flow and the test output.

 

The full output reads:

 

{
"status": 400,
"message": "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.\r\nclientRequestId: fbb42bad-3002-4abc-ae47-f6509862a30c",
"source": "office365-ne.azconn-ne.p.azurewebsites.net"
}

 

Have I misapplied the solution?

 

Regards,

 

Rog

 

Screenshot from 2019-01-19 13-52-50.png

Community Support Team
Community Support Team

Re: Flow Create All-day Event from Due Date

Hi @bodgerrolls,

 

Thank you for your reply.

Maybe my description is confusing to you.

I provide your formula to be filled in Expression before it can be applied to the corresponding field.

Like:

26.PNG

Also for the use of Expression, please refer to the Online doc:

https://docs.microsoft.com/en-us/flow/use-expressions-in-conditions

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bodgerrolls
Level: Power Up

Re: Flow Create All-day Event from Due Date

Thank you - that sorted it, I've learnt something.

 

Unfortunately Flow doesn't seem to be able to handle what I need to do at the moment, while this Flow works when I add a task with a due date prior to the Flow running, when I add a task, then add a due date it reports an error because it expects a due date. I'm sure it would be possible to tweek it so that error wasn't reported, but it still wouldn't change the Outlook event's date when the due date is changed in Google tasks. I realise what I'm after is fully reliable Sync and that doesn't seem available at the moment.

 

I would however commend to MS that a full Google Tasks - Office 365 Tasks sync is made available.

 

Many thanks for your help though!

 

Best,

 

Roger

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,109)