cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

ADDMINUTES Workflow function

I'm trying to create a flow that generates calendar entries for me to block for driving time when I travel to a meeting outside of my town.

I can easily create the calendar entry, but want it to be relative in time to my customer meeting.

The end time should be the same as the customer meeting start time.

The *start* time should be 30 minutes earlier:

 

@{addminutes(Start time×​​,-30)

 

That seems to fail, though, even though this looks like the right syntax to me:

 

@{addminutes(@{triggerBody()?['Start']},-30))}

 

What am I doing wrong?

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: ADDMINUTES Workflow function

you can't have additional AT symbols nested inside an expression. What i find helpful is to use the dynamic content in the compose action, then get the error, then copy out the direct call to the item. Especially helpful when the displayed name of dynamic content doesn't match the actual parameter name.

 

"@addminutes(triggerBody()?['Start'],-30))"

 

Compose block needs ""s around the expression.

 

Another issue I've run into is the minus sign being recognised as a string. try int('-30') or sub(0,30)

View solution in original post

1 REPLY 1
Highlighted
Microsoft
Microsoft

Re: ADDMINUTES Workflow function

you can't have additional AT symbols nested inside an expression. What i find helpful is to use the dynamic content in the compose action, then get the error, then copy out the direct call to the item. Especially helpful when the displayed name of dynamic content doesn't match the actual parameter name.

 

"@addminutes(triggerBody()?['Start'],-30))"

 

Compose block needs ""s around the expression.

 

Another issue I've run into is the minus sign being recognised as a string. try int('-30') or sub(0,30)

View solution in original post

Helpful resources

Announcements
Did you attend MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’ve streamed the digital event live, or you're watching on-demand, claim your attendee badge to sport on your profile.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,096)