cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Office 365 Calendar events with dynamic date

Hi all,

 

I want to create a flow that will create a new event in my Office 365 calendar.

So this works fine, but now I want that flow creates a event automaticly after I add an event to my calender and the start time should be one hour earylier.

I try the addhours(StartTime, -1) but always get an wrong time.

 

#Office365 #Calendar #Flow #Date #Outlook #Time #addhours

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted

Hi @Anonymous,

 

You should be able to identify the language through the following way:

1. First add the dynamic content (For example, the [Start Time] here) into the formula, just like you did before:

"@Addhours(body([Start Time], -1)"

2. Then save the flow, it will show you that the formula is not right, which would expose the code used for the dynamic content in the error messages part:

46.PNG

3. After that, remove the @{} symbol, which would leave only the contents body('Create_event')['Start'], then use this as the function parameter.

Hope this information would be helpful.

Adding the language reference:

Workflow Definition Language

Regards

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

Highlighted
Anonymous
Not applicable

Hi @v-micsh-msft,

 

Now it works!

But I don´t get the name of the trigger.

I have tried this: "@Addhours(triggerBody()?['Start'], 1)"

With this everything works fine! 🙂

 

Thanks for your help!

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Hi @Anonymous,

 

Currently I can't find a successful way to writing code directly with the Start Time fields. Even the date would generated rightly, there would be a double quotes with the result if the code is writing directly with the Start Time fields, and this would make the start time not recognized by the Inputs as a correct time format.

The way I make it work is the following:

1. under the first Create Event Action, add a Compose Action, 

2. Use the following code as the Inputs of the Compose Action (with Double quotes): 

"@Addhours(body('Create_event')['Start'], -1)"

3. Add another Create Event Action, input the needed calendar, specify the End time with the previous Start Time (Dynamic content generated from Create Event Action), and the Compose Outputs as the Start Time:

36.PNG

The result is the following:

37.PNG38.PNG

 

 

Hope the information here would be helpful.

If you need any further assistance of the steps above, please post back.

Regards

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Hi  @v-micsh-msft,

 

thanks for your answer.

So my problem is I use another trigger and a another language.

Where can I see the real names of a trigger (like Create_event)?

I want to use the "When a new event is created" trigger, in german (Wenn ein neuer Termin erstellt wird).

Can you tell me how I can get the name from this trigger?

Highlighted

Hi @Anonymous,

 

You should be able to identify the language through the following way:

1. First add the dynamic content (For example, the [Start Time] here) into the formula, just like you did before:

"@Addhours(body([Start Time], -1)"

2. Then save the flow, it will show you that the formula is not right, which would expose the code used for the dynamic content in the error messages part:

46.PNG

3. After that, remove the @{} symbol, which would leave only the contents body('Create_event')['Start'], then use this as the function parameter.

Hope this information would be helpful.

Adding the language reference:

Workflow Definition Language

Regards

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

Highlighted
Anonymous
Not applicable

Hi @v-micsh-msft,

 

Now it works!

But I don´t get the name of the trigger.

I have tried this: "@Addhours(triggerBody()?['Start'], 1)"

With this everything works fine! 🙂

 

Thanks for your help!

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (10,440)