cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

create a calendar event on O365

Hi everybody,

 

I need some help for creating an flow that should create a calendar event.

My flow should look in my calendar for new events created and create a new calendar event in dependency to the new event.

 

First I check for the event subject to filter for some special contents and that is where my problems start.

In my first condition check I have used the following filter "@or(contains(triggerBody()?['Subject'], 'FIRST'),contains(triggerBody()?['Subject'], 'SECOND'),contains(triggerBody()?['Subject'], 'THIRD'))"

So it should check for the event subject if one of the three contents is inside that and go on with the flow or not...

 

But when creating an event I get a failure message:

Unable to process template language expressions for action 'check_subject' at line '1' and column '2469': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'. "

 

From that message I would assume that the subject is empty, but it's not... at least not the event I've created

Maybe someone can also tell me how to dig a little deeper in some logs fom MS flow, because I cannot see what event that flow is just processing.

 

Thanks in advance.

Thomas

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: create a calendar event on O365

Hi @Chavell3,

 

Do you want to create an event in a new calendar when an event contains specific subject is created in your calendar?

 

I have made the following flow, the condition is configured likes below:

@or(contains(triggerBody()?['Subject'], 'FIRST'),contains(triggerBody()?['Subject'], 'SECOND'),contains(triggerBody()?['Subject'], 'THIRD'))

 

It just works fine if the subject of the new event contains FIRST/SECOND/THIRD.

2.PNG1.PNG

 

Please make sure the event does have a subject and try again with it.

 

 

 Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Regular Visitor

Re: create a calendar event on O365

Hi @v-yamao-msft,

 

Well I used another event trigger "When an event is added, updated oder deleted" and changed it now.

Although it should have worked as I now haven't used any other filter for my first condition check, than only changing the trigger to "When a new event is created", as this would make more sense than my selection before...
but never the less, it should have worked with the other flow too...
So I think at first it is solved by changing my trigger to the other one, that fits more.

 

so thanks for that indirect hint 😉 as I saw the "When a new event is created" from your pictures.

Highlighted
Administrator
Administrator

Re: create a calendar event on O365

Hey, @Chavell3!

Thank you for posting to the Flow Community Forum! It appears you have found a solution to your issue! If you feel as though your issue has been solved and you are satisfied with one of the previous replies, please click "Accept as Solution" on the reply that contains the solution so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

-Gabriel
Microsoft Flow Community Manager

-Gabriel
Community Manager
Microsoft Power Automate | Power Virtual Agents
Are YOU a member of a Power Platform User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (7,312)