cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chavell3
Level: Powered On

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

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.
Chavell3
Level: Powered On

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.

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
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

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!

Users Online
Currently online: 360 members 5,608 guests
Please welcome our newest community members: