A simple Node.js web application demonstrating how to use Attendee's managed calendar integration feature. Watch this demo to see the application in action. Read this guide to learn how to add the integration to your codebase.
-
Install dependencies:
npm install
-
Configure environment variables:
cp .env.example .env
Edit
.envand add your OAuth credentials:GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETfrom your Google Calendar OAuth AppMICROSOFT_CLIENT_IDandMICROSOFT_CLIENT_SECRETfrom your Microsoft Calendar Azure App RegistrationATTENDEE_API_KEYfrom your Attendee accountATTENDEE_API_URLfor the Attendee instance you are using (defaults to https://app.attendee.com for the hosted instance)
-
Set up OAuth redirect URIs:
Google Calendar OAuth App:
- Add
http://localhost:3000/auth/google/callbackto authorized redirect URIs
Microsoft Calendar Azure App Registration:
- Add
http://localhost:3000/auth/microsoft/callbackto redirect URIs
- Add
-
Set up ngrok for webhook development:
Ngrok creates a secure tunnel to your localhost so Attendee can send webhooks to your local application.
Install ngrok:
For macOS with Homebrew:
brew install ngrok
For Ubuntu/Debian:
snap install ngrok
Or download directly from ngrok.com
Start the ngrok tunnel:
ngrok http 3000
Copy the generated HTTPS URL (e.g.,
https://abc123.ngrok-free.app) - you'll need this for webhook configuration. -
Configure Attendee webhooks:
In your Attendee dashboard:
- Go to Settings → Webhooks
- Click "Create Webhook"
- Enter your ngrok URL +
/webhook/attendee(e.g.,https://abc123.ngrok-free.app/webhook/attendee) - Select these triggers:
calendar.events_updatecalendar.state_change
- Click "Create" to save the webhook
- Copy the webhook secret from the dashboard
- Add the webhook secret to your
.envfile:WEBHOOK_SECRET=your_webhook_secret_from_attendee_dashboard
-
Run the application:
npm start
For development with auto-restart:
npm run dev
-
Access the application: Open http://localhost:3000 in your browser
- Authentication: Users sign in with Google or Microsoft Calendar OAuth
- Calendar Integration: App automatically creates a calendar connection in Attendee with user's credentials
- Calendar Synchronization: Attendee syncs calendar events and sends webhooks when events are updated
- Bot Management: Users can add/remove meeting bots for upcoming calendar events
- Data Storage: Data is stored in a simple JSON file (
database.json)
- ngrok required for local development: Attendee needs to send webhooks to your local server
- Only events with meeting URLs: The app only displays calendar events that have meeting links