Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Updating edits or addition of events from Google Sheets to Calendar without duplicates

There is something else I just noticed I may need some help with. I would also like for it to be able to update any edits I made to the spreadsheet but also not duplicate the events that were already made from the first run. I know it's got something to do with the GetID string but I'm not too sure how to go about it since this is my first time coding, would really appreciate if anyone can aid with that too? :'D

The following is my code:

function addEvents(){
  var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var lr = ss.getLastRow();
  var cal = CalendarApp.getCalendarById("CalendarID");

  var data = ss.getRange("A3:C" + lr).getValues();

  for(var i = 0; i<data.length; i++){
    cal.createAllDayEvent(data[i][1], data[i][0], {description: data[i][2]});

  }

}

In my Google Spreadsheet, the order of the data is as follows (data only appears in A3:C3 and downwards to the bottom rows): column A: Date, B: Event Title, C: Description

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!