Transform plain English into powerful automations with AI + MCP + Google Integration
β οΈ Copyright Notice This project is developed and maintained by @jayyycodes. All rights reserved. See LICENSE for usage terms. Unauthorized redistribution or commercial use without permission is prohibited.
Smart Workflow Automation lets you create complex automations using plain English. Powered by a multi-LLM AI engine with dynamic code generation, a full Model Context Protocol (MCP) server, and Google OAuth integrations, it understands your intent, builds workflows automatically, and can even generate custom code on-the-fly for capabilities it doesn't have built-in.
- "Fetch Bitcoin price and email me via Gmail" β β Done
- "Check AAPL stock every 5 minutes and save to Google Sheets" β β Done
- "Email me top HackerNews stories every morning" β β Done
- "Fetch top stories from Times of India and email me a summary" β β Dynamic!
- "Scrape trending GitHub repos and email me" β β Dynamic!
- "Create a calendar event for team standup tomorrow at 10am" β β Done
- "Fetch latest NDTV headlines and email me" β β Dynamic!
No coding required. Just natural language. If a built-in tool doesn't exist, the AI writes one automatically.
Try it yourself: Live App
- 4-provider cascade: Groq β HuggingFace β OpenRouter β Google Gemini
- Natural language β JSON workflows with auto-retry
- Smart entity extraction + context-aware clarification
- Self-healing AI: auto-validates & fixes malformed workflows
- Intent analysis: detects when no built-in tool can handle a request
- AI writes Python code: LLM generates sandboxed functions for custom capabilities
- Learned tools: successfully generated code is saved to Firestore and reused for identical future requests β no LLM call needed
- Secure sandbox: restricted imports, execution timeout, cross-platform (SIGALRM on Linux, threading on Windows)
- Known sources: optimized RSS/scraping patterns for 10+ popular news sites and web targets
- Supports: RSS feeds, web scraping, public APIs, data processing, and any task expressible in Python
- Sign in with Google β single sign-on with full API access
- Gmail β Send emails via user's own Gmail account
- Google Sheets β Read, write, append data (auto-creates spreadsheets)
- Google Calendar β Create events, list upcoming events
- Google Drive β Upload files to user's Drive
- Per-user OAuth tokens stored securely in Firestore
- Streamable HTTP transport at
POST /mcp - 17+ tools dynamically discoverable by any MCP client
- Compatible with Claude Desktop, Cursor, Windsurf, and all MCP clients
- ContextMemory + execution logging for every tool call
- Stateless mode β optimized for cloud deployment (Render)
- Centralized registry with JSON Schema definitions
- 8 categories:
data_fetch,web_scraping,data_transform,notification,action,control_flow,google_oauth - Dynamic handler linking at startup
- MCP-ready with
inputSchemafor each tool - Dynamic tools: unlimited additional capabilities via AI code generation
- Stock Prices: Yahoo Finance (real-time)
- Crypto: Bitcoin, Ethereum, and more
- Weather: OpenWeatherMap
- Web Scraping: HackerNews, GitHub, Reddit, Discord
- Notifications: Email (SendGrid), Gmail, SMS (Twilio), WhatsApp, Slack, Discord
- Workflow Validator: validates steps before execution
- Context Memory: passes data between workflow steps
- Execution Logger: full state tracking with Firebase
- Auto port-conflict resolution: handles EADDRINUSE gracefully
- Cron Scheduling for recurring automations
- PostgreSQL for data persistence
- Graceful shutdown handling
- Hacker/terminal dark theme
- Responsive design
- Real-time execution status
- Framer Motion animations
Frontend:
- Next.js 14 (App Router) + React + TailwindCSS + Framer Motion
Backend (Node.js):
- Express.js + PostgreSQL + Firebase/Firestore + Node-cron + MCP SDK
Backend (Python AI):
- FastAPI + Multi-LLM (Groq, HuggingFace, OpenRouter, Gemini)
- Dynamic code generation + sandboxed execution + Firebase learned tool storage
Google APIs:
- OAuth2 (Sign-in + API access) Β· Gmail API Β· Sheets API Β· Calendar API Β· Drive API
MCP Server:
@modelcontextprotocol/sdk(Streamable HTTP, stateless)- 17+ MCP-exposable tools with JSON Schema
- ContextMemory + ExecutionLogger integration
Integrations:
- SendGrid (email) Β· Twilio (SMS/WhatsApp) Β· Yahoo Finance (stocks) Β· OpenWeatherMap (weather) Β· GitHub API Β· HackerNews API Β· Reddit Β· Discord Β· Slack Β· Google APIs
graph TD
User[User Input] --> NextUI[Next.js UI]
MCPClient[MCP Clients] --> MCPEndpoint[POST /mcp]
NextUI --> NodeAPI[Node.js API :3000]
MCPEndpoint --> NodeAPI
subgraph Backend
NodeAPI --> ToolReg[Tool Registry - 30+ Tools]
NodeAPI --> DB[(PostgreSQL)]
NodeAPI --> Firebase[(Firebase/Firestore)]
NodeAPI --> Scheduler[Node-Cron Scheduler]
NodeAPI --> PyService[Python AI Service]
NodeAPI --> MCP[MCP Server - Streamable HTTP]
NodeAPI --> GoogleOAuth[Google OAuth2]
MCP --> ToolReg
end
subgraph AI_Service[AI Service - Multi-LLM]
PyService --> Groq[Groq - Primary]
PyService --> HuggingFace[HuggingFace]
PyService --> OpenRouter[OpenRouter]
PyService --> Gemini[Google Gemini]
PyService --> DynGen[Dynamic Code Generator]
DynGen --> Sandbox[Secure Python Sandbox]
DynGen --> LearnedTools[(Firestore - Learned Tools)]
end
subgraph Google[Google APIs]
GoogleOAuth --> Gmail[Gmail API]
GoogleOAuth --> Sheets[Sheets API]
GoogleOAuth --> Calendar[Calendar API]
GoogleOAuth --> Drive[Drive API]
end
subgraph Integrations
ToolReg --> Stocks[Yahoo Finance]
ToolReg --> Weather[OpenWeatherMap]
ToolReg --> Email[SendGrid]
ToolReg --> SMS[Twilio SMS]
ToolReg --> Scraper[Web Scraper]
end
- Node.js 18+
- Python 3.9+
- PostgreSQL
- Firebase project (Firestore + service account key)
- Google Cloud project (OAuth2 credentials)
- API keys: At least one of Groq/HuggingFace/OpenRouter/Gemini
# 1. Clone repository
git clone https://github.com/jayyycodes/workflow-automation.git
cd workflow-automation
# 2. Install backend dependencies
npm install
# 3. Install Python AI service dependencies
cd engine-py && pip install -r requirements.txt && cd ..
# 4. Install frontend dependencies
cd Frontend/my-app && npm install && cd ../..
# 5. Set up environment variables
cp .env.example .env
# Edit .env with your API keys (see below)
# 6. Add Firebase service account
# Place your serviceAccountKey.json in the root directory
# 7. Start all services (3 terminals)
npm run dev # Backend (port 3000)
cd engine-py && uvicorn app:app --reload --port 8000 # AI service (port 8000)
cd Frontend/my-app && npm run dev # Frontend (port 3001)# Required
JWT_SECRET=your-secret-key
# Database
DB_HOST=your-db-host
DB_PORT=5432
DB_USER=your-db-user
DB_PASSWORD=your-db-password
DB_NAME=workflow_automation
# AI Providers (at least one required)
GROQ_API_KEY=your-groq-key # Primary (fast & free)
HUGGINGFACE_API_KEY=your-hf-key # Fallback #1
OPENROUTER_API_KEY=your-router-key # Fallback #2
GEMINI_API_KEY=your-gemini-key # Fallback #3
# Google OAuth (required for Google integrations)
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URI=http://localhost:3000/auth/google/callback
FRONTEND_URL=http://localhost:3001
# Notifications
SENDGRID_API_KEY=your-sendgrid-key
EMAIL_FROM=your-email@example.com
TWILIO_ACCOUNT_SID=your-twilio-sid
TWILIO_AUTH_TOKEN=your-twilio-token
TWILIO_PHONE_NUMBER=+1234567890
# Optional
WEATHER_API_KEY=your-openweather-key
DISCORD_WEBHOOK_URL=your-discord-webhook
# Dynamic Code Generation
DYNAMIC_FEATURES_ENABLED=true
SANDBOX_MODE=local # 'local' or 'lambda'- Go to Google Cloud Console
- Create a new project or select existing
- Enable APIs: Gmail, Sheets, Calendar, Drive
- Go to Credentials β Create OAuth 2.0 Client ID
- Add authorized redirect URIs:
- Local:
http://localhost:3000/auth/google/callback - Production:
https://your-backend.onrender.com/auth/google/callback
- Local:
- Copy Client ID and Secret to
.env
- Go to Firebase Console
- Create a new project
- Enable Firestore Database
- Go to Project Settings β Service Accounts β Generate new private key
- Save as
serviceAccountKey.jsonin the root directory
The backend exposes a fully MCP-compatible endpoint at POST /mcp. Any MCP client can dynamically discover and execute tools.
# Discover all available tools
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
# Execute a tool
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"fetch_weather","arguments":{"city":"Mumbai"}}}'| Tool | Description |
|---|---|
send_gmail |
Send email via user's Gmail account |
read_google_sheet |
Read data from Google Sheets |
write_google_sheet |
Write data to Sheets (auto-creates if no ID) |
append_google_sheet |
Append rows to Sheets (auto-creates if no ID) |
create_calendar_event |
Create Google Calendar event |
list_calendar_events |
List upcoming calendar events |
upload_to_drive |
Upload file to Google Drive |
list_drive_files |
List files in Google Drive |
"Fetch Bitcoin price and send me the result via Gmail to me@example.com"
"Fetch AAPL stock price every 5 minutes and save to Google Sheets"
"Create a calendar event called Team Standup for tomorrow at 10am"
"Email me top HackerNews stories about AI every evening"
"Send me Mumbai weather every morning at 8 AM via WhatsApp"
"Fetch top stories from Times of India and email me a summary"
"Fetch latest NDTV headlines and email me"
"Scrape the top trending repositories on GitHub and email me"
workflow-automation/
βββ src/
β βββ index.js # Express server + MCP init + auto port recovery
β βββ mcp/
β β βββ mcpServer.js # MCP server factory
β β βββ mcpRoutes.js # POST /mcp endpoint
β βββ registry/
β β βββ toolRegistry.js # Centralized tool registry (30+ tools)
β β βββ toolDefinitions.json # JSON Schema definitions
β β βββ mcpToolAdapter.js # MCP β Registry bridge
β βββ automations/
β β βββ workflowExecutor.js # Sequential step executor
β β βββ stepRegistry.js # Step handler implementations
β βββ integrations/
β β βββ gmail/ # Gmail OAuth handler
β β βββ sheets/ # Google Sheets handler (auto-create)
β β βββ calendar/ # Google Calendar handler (smart dates)
β β βββ drive/ # Google Drive handler
β βββ services/
β β βββ googleOAuth.js # OAuth2 flow + token management
β βββ config/
β β βββ firebase.js # Firebase/Firestore config
β βββ utils/
β β βββ executionLogger.js # State tracking + ContextMemory
β β βββ logger.js # Winston logger
β βββ routes/ # REST API routes
βββ engine-py/ # Python AI service (FastAPI)
β βββ app.py # Multi-LLM provider cascade + /execute_dynamic
β βββ config.py # LLM configuration
β βββ prompts.py # System prompts + dynamic code generation prompts
β βββ dynamic_resolver.py # Capability gap resolver + Firestore learned tools
β βββ sandbox.py # Secure sandbox for AI-generated code execution
β βββ validator.py # Workflow validation
βββ Frontend/my-app/ # Next.js 14 frontend
βββ serviceAccountKey.json # Firebase service account (gitignored)
βββ render.yaml # Render deployment config
βββ .env # Environment variables (gitignored)
-
Push to GitHub:
git add . git commit -m "production deployment" git push origin main
-
Set Environment Variables in Render dashboard for both services:
- Backend (Node.js): All
.envvariables + production Google OAuth credentials - Python AI:
GROQ_API_KEY,HUGGINGFACE_API_KEY,OPENROUTER_API_KEY,GEMINI_API_KEY
- Backend (Node.js): All
-
Google Cloud Console: Add your Render backend URL as authorized redirect URI:
https://your-backend.onrender.com/auth/google/callback -
Deploy β Render auto-deploys on git push!
- Import your GitHub repo in Vercel
- Set root directory to
Frontend/my-app - Add environment variable:
NEXT_PUBLIC_API_URL=https://your-backend.onrender.com - Deploy!
This project is proprietary and not open for public contributions at this time.
For business inquiries, partnerships, or collaboration:
- GitHub: @jayyycodes
Copyright (c) 2026 Jaydatta Kshirsagar. All rights reserved.
This source code is publicly visible for evaluation and portfolio purposes only. Commercial use, redistribution, or derivative works require explicit written permission from the author.
- Groq β Primary AI engine (fast inference)
- Google Gemini β Fallback AI engine
- Anthropic MCP β Model Context Protocol standard
- OpenRouter β Multi-model routing
- Firebase β User token storage, execution logging & learned tool storage
- Render β Backend deployment
- Vercel β Frontend hosting
β‘ Transform plain English into powerful automations β‘
π MCP-compatible Β· 30+ tools Β· Dynamic Code Gen Β· Multi-LLM Β· Google Integrated Β· Production-ready
Built with β€οΈ by @jayyycodes