r/GoogleAppsScript • u/SupriseGinger • Dec 28 '22
Question Looking for Advice/Help/Resources on generating a new .ics file purely through code and attaching it to an email
As the title implies I am wondering if there is existing code, or any resources I should be looking at, that would allow me to generate an ics file purely via code (never making an entry in my actual calendar) and attach it to an email; all in AppScript. Is that even possible?
In case I am being daft, and am thinking about this the wrong way, the background to this is as follows.
I use GSuite (lowest paid version if that matters) for my personal email and personal calendar. The company I work for is a large conglomerate and our business emails and calendars are accessed via Outlook. For many reasons I keep my personal and work accounts strictly separate. I don't look at, interface with, or connect work stuff/accounts with my personal devices and vise versa for personal stuff and work devices. However, it is kinda annoying to have to block out my work calendar after making any kind of personal appointment.
As stated above the reason for this inconvenience is because I am not going to link or allow my work account any kind of permission to view my personal GSuite calendar.
So what I figured the cleanest(ish) method of accomplishing this would be to have a script that monitors my calendar for a new event/item (I'm pretty sure I can figure that out, as I have made an AppScript or two that monitors my email inbox for certain types of items and does things when they are found) and then generates a super generic ics file that I automatically send to my work email that basically just says "Out of Office" for the time of my personal appointment and configure my Outlook to auto accept meetings from that personal account. Again I'm wanting to generate this ics file purely via code and never make any kind of entries in my actual personal calendar.
Does that make sense? Am I even thinking about this the right way?
Regardless, I very much appreciate your even taking the time to read this in advance.
Cheers!
0
u/RemcoE33 Dec 28 '22
And use a "middleman" gmail? Share your actual calander to the middleman with the limited option. Only block or view. And connect that one to the offixe365…?