Hi,
I'm looking for a way to loop through a body and grab the contents between BEGIN:VEVENT and END:VEVENT, assuming the SUMMARY contains "Appointment". Is there any way of doing this without using external connectors?
Example calendar body (indented for ease of reading, raw input is not indented):
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//dummy text//
METHOD:PUBLISH
X-WR-CALNAME:Dummy Text
X-WR-CALDESC:Dummy Text
X-WR-TIMEZONE:Europe/Oslo
BEGIN:VTIMEZONE
TZID:Europe/Oslo
BEGIN:STANDARD
DTSTART:20211031T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20220327T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:20210906T113821CEST-4687GIElaZ@Dummy-Text
DTSTAMP:20210906T093821Z
DTSTART;TZID=Europe/Oslo:20210914T150000
DTEND;TZID=Europe/Oslo:20210914T163000
SUMMARY:Away from office.
END:VEVENT
BEGIN:VEVENT
UID:20210906T113821CEST-4689B5691b@Dummy-Text
DTSTAMP:20210906T093821Z
DESCRIPTION:99999999\nemail@email.com\n----------\nAppointment Notes
DTSTART;TZID=Europe/Oslo:20210908T200000
DTEND;TZID=Europe/Oslo:20210908T220000
SUMMARY:Appointment\, Person One Name
END:VEVENT
BEGIN:VEVENT
UID:20210906T123821CEST-665b897s6@Dummy-Text
DTSTAMP:20210906T121146Z
DESCRIPTION:12345678\nexample@domain.tld\n----------\nDifferent Appointment Notes
DTSTART;TZID=Europe/Oslo:20210909T200000
DTEND;TZID=Europe/Oslo:20210909T220000
SUMMARY:Appointment\, Person Two Name
END:VEVENT
END:VCALENDAR
I would then like to create an array with that information looking something like this so I can search through it and compare with an email that is automatically sent by the booking system (contains name, email (optional) and phone number (optional)):
[
{
"Name": "Person One Name",
"Email": "email@email.com",
"Phone": "99999999",
"Notes": "Appointment Notes",
"Date": "2021.09.08",
"Start time": "20:00",
"End time": "22:00"
},
{
"Name": "Person Two Name",
"Email": "example@domain.tld",
"Phone": "12345678",
"Notes": "Different Appointment Notes",
"Date": "2021.09.09",
"Start time": "20:00",
"End time": "22:00"
}
]
The initial email does not contain the notes added either by me or my colleagues that manually add the appointment into the booking system, and I would like to store that information in a spreadsheet.
See this picture for an example of how I crudely imagine the structure my flow:
Please advise and thank you for any assisting comments/ideas.


Report
All responses (
Answers (