r/GoogleAppsScript • • Jan 31 '20

Create an ongoing script to automatically copy certain events from one Google calendar to another Google calendar

Hi,

I am trying to sync my work Google calendar to my personal Google calendar. I'd like to be able to automatically copy all work events EXCEPT for certain work events that start with a certain title (i.e., 'XYZ-') on an ongoing basis. For example, I have work events that all start with 'XYZ-'. The script would NOT copy these events to my personal Google calendar. Any help is appreciated. Thanks so much, will award coins! :)

6 Upvotes

16 comments sorted by

7

u/smackjack3 Jan 31 '20

I actually wrote a little script to do this for a couple different work accounts I had. You can find the snippet here: https://gitlab.com/snippets/28854

Should help get ya started.

1

u/justkeepswimming555 Mar 28 '20

thanks so much! i will try it out (sorry for the late reply)

1

u/DAM9779 Sep 25 '23

Did you ever get to play around with this? I have a very similar problem and will start playing around with this to see if it can help with my issue.

1

u/justkeepswimming555 May 25 '24

hey! Sorry for the super late reply. I played around with it for a bit but never got it to completely work (I think due to the company's security settings). I don't work at that company any more so I never got back to it. hope you got your problem resolved! ❤

1

u/DAM9779 May 26 '24

I did thanks for replying.

1

u/justkeepswimming555 May 27 '24

oh yay!!!!! so happy for you 💕

3

u/neuroticoctopus Feb 01 '20

Not what you're looking for, but I set up an easy zap that adds my personal calendar events to my work calendar. It would be easy to add a filter step.

2

u/justkeepswimming555 Mar 28 '20

can you show me what this looks like? thank you so much! love your screen name btw :)

1

u/neuroticoctopus Mar 29 '20

Have you used Zapier before? You basically set up Google calendar as the trigger, and the outcome is a new event on your other Google Calendar account.

Also, you could just share the calendar with the other account so you can have both show up.

1

u/SailorSoane Jan 29 '25

Zapier made this super simple. Great shout.

1

u/avitzavi528 Jul 01 '25

is Zapier free? I'm not sure my ORG would allow me to integrate with it

2

u/[deleted] Jan 31 '20 edited Jan 31 '20

Do you have any experience in coding? I do something similar, where I archive off events from my personal calendar to my archive calendar based on titles of events. If you have an understanding of coding it is relatively easy to do.

1

u/justkeepswimming555 Mar 28 '20

not really super in depth, just the very basics in python. could you show me what your code looks like when you have time? thanks so much and sorry for the super late response!

1

u/system__addict Apr 20 '23

What are you coding in?

1

u/[deleted] Apr 20 '23

Professionally, mainframe languages. But I’ve also done Java, JavaScript, Bash, Python, and Perl when needed on the job.

1

u/hellasteph Mar 31 '20

Hi there, we have a Google Calendar to GCal integration here for you to try out: https://zapier.com/apps/google-calendar/integrations/google-calendar - If you put a Filter by Zapier step in between to filter out your work events to only continue on if they have "XYZ-" instead of everything being copied all the way through. I do this for my work calendar at Zapier too and it works great! Let us know if you need help by reaching out to us at our community if you need any further assistance. Cheers!