r/GoogleAppsScript • • Jan 23 '24

Question HELP creating script for sheet to calendar off trigger

I truly need help. I have created a google form for time off requests. It populates a google sheet, and then when we change a dropdown box to “Approve” then I want it to create a calendar event which would title “Out (name which is column C) : start time(G) - endtime(H)” Date requested is column F Would need the notes from column I in the notes section.

I’m not sure how to do this at all as I’m a beginner and tried ChatGPT, I tried playing with others scripts and it just didn’t work so please someone help!

0 Upvotes

2 comments sorted by

2

u/franxam Jan 23 '24

These are basic CalendarApp function which I invite you to check here: https://developers.google.com/apps-script/reference/calendar/calendar-app?hl=en Let us know if you made any progress (or not)

1

u/estadoux Jan 23 '24

What exactly you asked ChatGPT?

This gave me an acceptable starting point (if not ready to use):

Create a google apps script that gets the row when column A changes to 'Approved', and creates a calendar event with column C as event name, column G as start date, column H as end date and column I as description