Using the Nylas APIs to sync personal calendar with work calendar
- Download this repo
- Run
npm install
to get packages - Run
npm run dev
to start server with nodemon - Go to http://localhost:8000 to load home page
Logs will be sent to /logs/app.log locally. See logger.js for options.
Create an .env file in the root of your app with the following information:
- ACCESS_TOKEN=<your access token>
- CLIENT_ID=<your client id>
- CLIENT_SECRET=<your client secret>
- SESSION_SECRET=<your session secret>
- SRC_CALENDAR_ID=<id of calendar where the events will be pulled from>
- SRC_ACCESS_TOKEN=<access token of the account where the events will be pulled from>
- DEST_CALENDAR_ID=<id of calendar where the events will be pushed to>
- DEST_ACCESS_TOKEN=<access token of the account where the events will be pushed to>
In order to get notified when your source calendar has changed, you will need to set up Nylas Webhooks to receive those events.