I need help completing a flow that can create or update a calendar event from the content of a .ics email attachment.
This is what I have so far: When a new email arrives, for each attachment, if the attachment ends with .ics, get the attachment and convert the contentBytes of the attachment to a string.
This is how far I’ve gotten with the help of PowerAutomate AI and this previous question.
compose code action to convert attachment to string:
@base64ToString(outputs_Get_Attachment?['body']?['contentBytes']))
For next steps, I’d like to create a calendar event using the title of the .ics in the string output. I imagine I could use a compose action and a string function to create an output that can be used as a parameter for the title of a create event action. Would appreciate guidance on what the code in compose action should be as this is my first time using Power Automate and I’m not very code savvy.
There could also be scenarios where I need to update a calendar event. One thing I’m thinking is to use an identifier from .ics to check if a previous calendar event exists. I’m unsure of how this would work (i.e always save the UID property of a .ics in the body of a created event so that it can be compared against later? Or easier but potentially buggy: compare the title of current .ics with the title of another event in the same week?). Any guidance here to would be apperciate
Thanks! Also attaching an example .ics file for visual reference
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional