Issue with Google Date Strings

I am trying to write a flow that takes all of the events from several Google Calendars (across multiple accounts) and adds them all to a single Google Calendar ("Calendar for EVERYTHING - Imported from Flow"). My university, which uses Google Suites, has a system where people will try to schedule appointments with me, but they can only see my busy events that are posted to my school account's personal calendar (the one I've named "Calendar for EVERYTHING - Imported from Flow"); they cannot see events on my calendars such as "Classes", "Koty Jackson - Personal Calendar" (My personal calendar from my own Google account), etc.

The flow I have so far does the following: (or at least, should in theory)

search my "Calendar for EVERYTHING" for events with "Created Via Flow" in the description and delete them

This is so I do not have 1000+ copies of the same event at the same time.

Go through each of my calendars, both on my school email and my personal email, and add all events between now and 120 days from now to my "Calendar for EVERYTHING".

Adding the original description + "Created Via Flow" to the description so that I can keep track of what events have been added to the calendar by Flow vs. by email invitations and only delete and recreate the ones created from Flow.

This works without fail in my "Classes" calendar because every event has a precise start and end time. However, some of the events in my personal calendar will be all day events. When bullet point 2 reaches these events, I get the following error:

This is because Google returns the full day events in format YYYY-MM-DD, instead of the standard YYYY-MM-DDThh:mm:ss+........... format. This shorter format is not enough information for the "Create an Event" process to run, so it fails my flow and does not proceed to check further calendars.

What I would like to do is be able to put a condition where it skips the all-day events with the format YYYY-MM-DD and only adds events to my "Calendar for EVERYTHING" that have a definitive start and end time. If this is not possible, I would like to be able to format the YYYY-MM-DD into the standard YYYY-MM-DDThh:mm:ss+..... so that I can create an event that runs from 12:00 to 12:01 am (I don't need to worry about people actually scheduling me at those times, obviously). Is there any way to do a "String is of format ()" within a condition? How should I proceed?

Sorry if this explanation doesn't make much sense, so I've attached my flow. Thanks for any help you can provide!

Re: Issue with Google Date Strings

If you want to put a condition where it skips the all-day events with the format YYYY-MM-DD and only adds events to your calendar that have a definitive start and end time, you could add the Condition as below:

The expression in the Condition as below:

@equals(length(items('Apply_to_each')?['start']), 10)

If you would like to be able to format the YYYY-MM-DD into the standard YYYY-MM-DDThh:mm:ss+..... , you could refer to screenshot below to create the flow:

The expression in the Start time field in the "Create an event" action as below:

Re: Issue with Google Date Strings

If you want to put a condition where it skips the all-day events with the format YYYY-MM-DD and only adds events to your calendar that have a definitive start and end time, you could add the Condition as below:

The expression in the Condition as below:

@equals(length(items('Apply_to_each')?['start']), 10)

If you would like to be able to format the YYYY-MM-DD into the standard YYYY-MM-DDThh:mm:ss+..... , you could refer to screenshot below to create the flow:

The expression in the Start time field in the "Create an event" action as below:

Re: Issue with Google Date Strings

Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-yuazh-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as 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!

-GabrielFlow Community Manager

-GabrielMicrosoft Power Automate Community ManagerAre YOU a member of your local Power Automate User Group?Fill out This Form to claim your Community User Group Member Badge!