InWhiteLine Scheduler Documentation
Complete setup guide for building a consultation request system with Google Meet scheduling, Google Calendar integration, OAuth2, automatic email notifications, and production-ready backend setup.
Node.js
Google Meet
OAuth2
Calendar API
Nodemailer
Project Features
- Contact Form Submission
- Thank You Email
- Admin Notification Email
- Schedule Meeting Option
- Real Google Meet Generation
- Google Calendar Invite
- OAuth2 Authentication
- User + Admin Attendee Support
- Production Ready Backend
Project Structure
inwhiteline-contact-project/
│
├── server.js
├── oauth.js
├── index.html
├── style.css
├── script.js
├── package.json
├── .env
├── tokens.json
└── node_modules/
Step 1 — Install Node.js
Download and install the latest LTS version of Node.js.
node -v
npm -v
Step 2 — Create Project
mkdir inwhiteline-contact-project
cd inwhiteline-contact-project
npm init -y
Step 3 — Install Packages
npm install express nodemailer cors dotenv googleapis
Step 4 — Google Cloud Setup
Open Google Cloud Console and create a new project.
Console URL
https://console.cloud.google.com/
Step 5 — Enable Google Calendar API
- Open APIs & Services
- Go to Library
- Search Google Calendar API
- Click Enable
Step 6 — OAuth Consent Screen
- Choose External
- Add App Name
- Add Support Email
- Add Developer Email
Step 7 — Create OAuth Credentials
- Create OAuth Client ID
- Select Web Application
- Name your OAuth App
Step 8 — Add Redirect URI
Authorized JavaScript Origin
http://localhost:8000
Authorized Redirect URI
http://localhost:8000/oauth2callback
Step 9 — Gmail App Password
- Enable 2-Step Verification
- Create App Password
- Use App Password in .env
EMAIL_USER=hello@inwhiteline.com
EMAIL_PASS=YOUR_APP_PASSWORD
Step 10 — Create OAuth File
Create OAuth server for token generation.
node oauth.js
Step 11 — Generate OAuth Tokens
Open browser and login using Google account.
http://localhost:8000/auth
After successful login:
tokens.json
will be generated automatically.
Step 12 — Create Server
Setup Express server with:
- Nodemailer
- Google Calendar API
- Google Meet generation
- Contact form APIs
Step 13 — Run Project
node server.js
http://localhost:8000
Final Working Flow
- User fills contact form
- User selects schedule meeting
- User selects date & time
- Google Meet auto generates
- Calendar invite sent
- User receives thank you email
- Admin receives consultation request
Common Errors & Fixes
EADDRINUSE
pkill node
Invalid Origin
Do not add callback URL in JavaScript origins.
open is not a function
Remove open() package and use:
res.redirect(url)
Security Notes
- Never upload .env
- Never upload tokens.json
- Never upload credentials.json
node_modules
.env
tokens.json
credentials.json
Production Deployment
- Deploy on VPS
- Use HTTPS
- Add MongoDB
- Add Admin Dashboard
- Add WhatsApp Notifications
- Add Slot Management