googleapis / googleapis/google-api-nodejs-client
Calendar - node - Can I send an event update email to new attendees only?
- Lingua principale
- TypeScript
- Stelle
- 12.2k
- Fork
- 2k
- Merge medio
- 1g 9h
- PR unite (30g)
- 24
Descrizione
## What you're trying to do
I'm trying to create an app on which users can subscribe to an event.
My plan is to create an event, then update it every time a user wants to attend by updating or patching the event attendees.
I would like the users to receive the google email with the event details when they register.
## What code you've already tried
Using this code, all the attendees will receive an email every time a new attendee is added. In this scenario, I would like only new attendees to receive the email.
```typescript
// [...] abridged auth and calendar setup
authWithImpersonation.getClient().then((auth: any) => {
getEvent().then((ev: any) => {
const newAttendees = ev.data.attendees
? [
...ev.data.attendees,
{
email: 'user@domain.com',
},
]
: [
{
email: 'user@domain.com',
},
];
let eventPatch = {
attendees: newAttendees,
};
calendarWithImpersonation.events.patch({
auth,
eventId: ev.data.id,
calendarId: GCP_CALENDAR_CALENDAR_ID,
resource: eventPatch,
sendUpdates: 'all', // Hello there
});
});
});
```
Is there a way to dynamically choose who gets notified?
If you have any other suggestion on how to achieve my goal I'm open to it, this is a greenfield project.
Thank you
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la configurazione di authWithImpersonation dell’issue e la chiamata a calendarWithImpersonation.events.patch, concentrandoti sull’aggiornamento di attendees e sull’opzione sendUpdates: 'all'. Verifica il comportamento pertinente di Google Calendar API e determina se le notifiche possono essere indirizzate solo agli attendees aggiunti di recente; documenta l’approccio supportato o la limitazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- nodejs, typescript
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100