web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create Calendar event ...
Power Automate
Unanswered

Create Calendar event upon receipt of email [O365]

(0) ShareShare
ReportReport
Posted on by

Hi all, first time using Flow to build my own specific flow. It's not going very well!

I want to achieve the following:


- Receive email with particular text in the subject (O365 Outlook)
- Create calendar event that starts at the time the email was received, and ends 4 hours later (O365 Outlook)


I've spent a long time looking for solutions to this and haven't been able to find anything. Here's what I'm doing:

[When a new email arrives (V3)
Folder: Inbox
Subject Filter: [required text goes here]

[Create event (V4)]
Calendar ID: Calendar
Subject: [dynamic content for email subject]
Start time: [dynamic content for Email Received time]
End time: [dynamic content for Email Received time again]
Time zone: My time zone (UTC+00:00 Dublin, Edinburgh, Lisbon, London)

Using these values gives the following error message when I try to save:

Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'item' validation failed in workflow operation 'Create_event_(V4)': The parameter with value '"@triggerOutputs()?['body/receivedDateTime']"' in path 'item/start' with type/format 'String/date-time' is not convertible to type/format 'String/date-no-tz'.'.

I then tried something similar with a pushbutton flow, which worked great:

Button

Create event (V4)
Calendar ID: Calendar
Subject: Test
Start time: [Timestamp]
End time: [Timestamp]
Timezone: GMT (as above)

This worked without any issues.

Following a bit of Googling on the "no-tz" error above, I found several suggestions that the code should be wrapped in "convertToUtc" info. So, I went back to the version that relies on email, and instead of having the start and end times be the dynamic content for Received Time, put the following in as an expression:

convertToUtc(triggerOutputs()?['body/receivedDateTime'], 'GMT Standard Time')
This then gives the following error:

Unable to process template language expressions in action 'Create_event_(V4)' inputs at line '1' and column '32500': 'The template language function 'convertToUtc' expects its second parameter to be a time zone matching the time zone indicated by the timestamp. The provided value '(UTC+00:00) Dublin, Edinburgh, Lisbon, London' is not valid or does not match the timestamp '2021-03-01T16:52:56.0000000+00:00'. Please see https://aka.ms/logicexpressions#ConvertToUtc for usage details.'.

I haven't a clue where I'm going wrong at this point, it feels like Flow/Power Automate is intended to allow simple automation of tasks but it is not very good at helping you work through errors! Hoping someone can help. Thank you in advance.

Bonus - I am aware that I have been setting the start and end times of my calendar event to the same thing. I've tried it with addhours( at the start to extend the meeting and that didn't work either, and the pushbutton meeting worked fine with both values being the same, so am happy to figure that bit out once the flow itself actually works!
Categories:
I have the same question (0)
  • RaashiSen Profile Picture
    on at

    Hi @Anonymous ,

     

    Can you try using 2 Variables or 2 compose actions to get the Date/time for start date and endDate. Design something like this-

    RaashiSen_0-1614695466631.png

    The compose or string variable you will use here, will help you understand what you are receiving as the result. once you are sure, you can remove those and utilize the Date time connector output to do rest of the work for creating event in calendar.

     

    Let us know if this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard