Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

139
Visualizações
Google Calendar API - sendUPdate not working to

Using Google App Script to create a Calendar event and having problems with the "sendUpdates" parameter to send email notifications on the creation of the calendar event.

According to the documentation here: events.insert.

enter image description here

The "sendUpdates" parameter has to be included, so my code looks something like this:

function createEvent() {
  var calendarId = 'primary';
  var start = getRelativeDate(1, 23);
  var end = getRelativeDate(1, 24);

  var event = {
    summary: 'Lunch Meeting',
    // location: 'The Deli',
    description: 'Testing.',
    start: {
      dateTime: start.toISOString()
      // dateTime: start
    },
    end: {
      dateTime: end.toISOString()
      // dateTime: end
    },
    attendees: [
      {email: 'SOMEONE@GMAIL.COM'},
    ],

    sendUpdates: 'all',
    sendNotifications: 'true',
  };

  event = Calendar.Events.insert(event, calendarId);

}

However, upon running the above function, I don't see any email notification about the Calendar Event being created.

Has anyone faced similar issues and have found a resolution?

Thanks.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You need to add the sendUpdates parameter as an optional argument (sendNotifications is not necessary) of the Calendar.Events.insert, not inside the body request:

function createEvent() {
 const calendarId = 'primary';
 const start = getRelativeDate(1, 23);
 const end = getRelativeDate(1, 24);

 const event = {
   summary: 'Lunch Meeting',
   description: 'Testing.',
   start: {
     dateTime: start.toISOString()
   },
   end: {
     dateTime: end.toISOString()
   },
   attendees: [
     { email: 'attendee1@gmail.com' },
   ],
 };

 event = Calendar.Events.insert(event, calendarId, {
   sendUpdates: 'all'
 })
}
Documentation
  • Events.insert
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda