connectors
Hubspot
🎯 How to Build a HubSpot App with Cocoding.ai
For Non-Technical People - No Coding Required!
🌟 What is Cocoding.ai?
Cocoding.ai is an AI that builds complete, production-ready applications for you. Just tell it what you want in plain English, and it creates everything automatically.
Think of it like:
- Ordering food: You describe what you want, the chef makes it
- Cocoding.ai: You describe your app, AI builds it
🚀 Building Your HubSpot Pipeline App
Step 1: Access Cocoding.ai
- Go to:
- Sign up or log in
- Start a new project
Step 2: Tell Cocoding.ai What You Want
Describe your app in plain English. Here are some examples:
Example 1 - Pipeline Monitor:
Build me a HubSpot deal monitoring app where I can:- View all my deals in a dashboard- See which deals are "stuck" or at-risk- Update deal stages and next steps- Create tasks and notes for deals- Use HubSpot OAuth for secure connection
Example 2 - Deal Health Tracker:
Create a deal health scoring app that:- Pulls deals from HubSpot pipelines- Shows RED/YELLOW/GREEN health status- Highlights inactive deals- Tracks overdue tasks and missing next steps- Connects to HubSpot via OAuth
Example 3 - Sales Pipeline Manager:
Build a pipeline manager that:- Syncs with HubSpot deals- Shows deal health scores (0-100)- Allows bulk stage updates- Creates tasks for multiple deals- Uses secure HubSpot integration
Cocoding.ai will:
- Create a React frontend with beautiful UI
- Build a Node.js backend
- Set up PostgreSQL database
- Configure HubSpot OAuth integration
- Add security and encryption
- Generate documentation
Step 3: Wait for Cocoding.ai to Build
What happens next:
- ⚡ Cocoding.ai reads your requirements (5 seconds)
- 🏗️ Creates complete application structure (30 seconds)
- 📝 Writes all code files (1-2 minutes)
- 🎨 Designs beautiful UI (included)
- 🔐 Sets up security (automatic)
- 📚 Generates documentation (automatic)
Total time: 2-3 minutes!
You'll see Cocoding.ai:
- Creating files
- Installing dependencies
- Setting up database
- Starting servers
Step 4: Your App is Ready!
Cocoding.ai automatically:
- ✅ Creates frontend (React app)
- ✅ Creates backend (API server)
- ✅ Sets up database (PostgreSQL)
- ✅ Configures HubSpot integration
- ✅ Adds security (encryption, JWT)
- ✅ Starts both servers
You get:
- Working application at
http://localhost:8000 - Complete documentation
- Setup guides
- Ready to use!
🔑 Now Connect to HubSpot
Step 1: Get HubSpot Developer Account (FREE)
Don't have HubSpot?
- Go to:
- Sign up for a FREE developer account
- You now have access to HubSpot's tools!
Step 2: Create HubSpot Public App
Follow these simple steps:
- Login to HubSpot Developers
- Go to
- Log in with your HubSpot account
- Go to Your Apps
- Click the "your apps" icon in the top navigation
- Click "Create app"
- Fill in the form:
App name: Pipeline Pulse (or your preferred name)
- Choose Auth Method
- Select "OAuth 2.0"
- Configure OAuth Settings
Redirect URL:
```
http://localhost:8001/api/integrations/hubspot/callback
```
- Add Scopes (Required permissions)
Copy and paste these scopes:
```
crm.objects.deals.read
crm.objects.deals.write
crm.objects.owners.read
crm.schemas.deals.read
crm.objects.contacts.read
crm.objects.companies.read
crm.objects.notes.write
crm.objects.tasks.write
crm.objects.tasks.read
```
Click "Add" after each one
- Save
- Click "Save" button at the bottom
- You'll see your Client ID and Client Secret
- Copy Your Credentials
- Copy the Client ID (looks like: a1b2c3d4-e5f6-7890-abcd-ef1234567890)
- Click "Show" to reveal Client Secret
- Copy the Client Secret (looks like: 12345678-90ab-cdef-ghij-klmnopqrstuv)
Save these somewhere safe!
Step 3: Configure Your App
Cocoding.ai created a `.env` file for you. Edit it:
- Find the `.env` file in your backend project folder
- Open with Notepad (Windows) or TextEdit (Mac)
- Paste your HubSpot keys:
HUBSPOT_CLIENT_ID=paste-your-client-id-hereHUBSPOT_CLIENT_SECRET=paste-your-client-secret-hereHUBSPOT_REDIRECT_URI=http://localhost:8001/api/integrations/hubspot/callback
- Generate security keys:
On Mac/Linux:
openssl rand -base64 32
On Windows:
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
Run this command three times, copy each result, and paste:
JWT_SECRET=paste-first-key-hereCOOKIE_SECRET=paste-second-key-hereENCRYPTION_KEY=paste-third-key-here
- Save the file (Ctrl+S or Cmd+S)
Step 4: Restart Your App
If servers are still running:
- Stop them: Press
Ctrl+Cin both terminal windows - Start again:
Terminal 1 (Backend):
cd backendpnpm dev
Terminal 2 (Frontend):
pnpm dev
Step 5: Connect HubSpot
- Open your browser:
http://localhost:8000 - Sign up for an account in the app
- Log in
📸 Screenshot placeholder: App homepage at localhost:8000
- Click "HubSpot Integration" in sidebar
📸 Screenshot placeholder: Sidebar showing HubSpot Integration menu item
- Click "Connect HubSpot Account" button
📸 Screenshot placeholder: HubSpot Integration page with "Connect HubSpot Account" button
- You'll be redirected to HubSpot
📸 Screenshot placeholder: HubSpot OAuth authorization screen
- Click "Grant Access" to authorize
- Done! You're redirected back to your app
🎉 Start Using Your App!
View Your Dashboard
- Click "Dashboard" in sidebar
- See deal health KPIs
- View RED/YELLOW/GREEN distribution
📸 Screenshot placeholder: Dashboard showing KPI cards and health distribution
View Your Deals
- Click "Deals" in sidebar
- See all your HubSpot deals
- Filter by health status
- Sort by stuck score
📸 Screenshot placeholder: Deals list view with health status badges and stuck scores
Update Deal Details
- Click any deal to view details
- See deal properties, activities, tasks
- Update stage, next step, amount
📸 Screenshot placeholder: Deal detail page with properties and activity timeline
Create Tasks and Notes
- Open a deal detail page
- Scroll to "Create Task"
- Fill in task details
- Click "Create Task"
📸 Screenshot placeholder: Create Task form with subject, due date, and type fields
Bulk Operations
- Check boxes next to multiple deals
- Click "Bulk Actions"
- Choose: Change Stage, Create Tasks
📸 Screenshot placeholder: Bulk Actions menu with stage change and task creation options
🎯 What Cocoding.ai Built For You
Complete Application
- ✅ Beautiful React frontend
- ✅ Secure Node.js backend
- ✅ PostgreSQL database
- ✅ HubSpot OAuth integration
- ✅ Automatic token refresh
- ✅ Deal health scoring
- ✅ User authentication
- ✅ Responsive design
Security Features
- ✅ Encrypted HubSpot tokens (AES-256)
- ✅ JWT authentication
- ✅ Secure password hashing
- ✅ Rate limiting
- ✅ CSRF protection
Documentation
- ✅ Setup guides
- ✅ User manual
- ✅ FAQ
- ✅ Troubleshooting
- ✅ API documentation
All this in 2-3 minutes!
🧠 Understanding Deal Health Scoring
Health Status Colors
🔴 RED - Needs urgent attention if:
- Close date has passed
- No activity for >14 days
- Has overdue tasks
- Missing next step
🟡 YELLOW - At risk if:
- No activity for 7-14 days
- Close date within 7 days AND no next step
🟢 GREEN - Healthy if:
- Recent activity
- Has clear next step
- On track for close date
Stuck Score (0-100)
Higher score = More stuck:
Points added for:
- Inactivity: 2 points per day (max 40)
- Close date passed: +30 points
- Missing next step: +20 points
- High amount: +5-10 points (prioritizes valuable deals)
🔧 Troubleshooting
"HubSpot not connected"
- Check your Client ID and Secret are correct
- Make sure callback URL is exact
- Verify all scopes are granted
"Invalid or expired token"
- Token may have expired
- Re-authorize in HubSpot Integration page
- Clear cookies and log in again
"Failed to fetch deals"
- Verify HubSpot scopes are granted
- Check token hasn't been revoked in HubSpot
- Ensure you have deals in your pipeline
Database connection errors
- Verify PostgreSQL is running on localhost:5432
- Check DATABASE_URL in backend/.env
- Run migrations:
pnpm prisma:migrate
🌐 Making it Available to Your Team
Option 1: Local Network (Free)
If everyone is in your office:
- Find your computer's IP address
- Share:
http://YOUR-IP:8000 - Team members access from their browsers
Option 2: Cloud Deployment (Recommended)
Cocoding.ai can help deploy to:
- Vercel (Frontend) - FREE
- Railway (Backend) - $5/month
- Supabase (Database) - FREE tier available
Just ask Cocoding.ai:
Deploy my HubSpot app to production with:- Frontend on Vercel- Backend on Railway- Database on Supabase- HTTPS enabled
Cocoding.ai will handle everything!
💡 Pro Tips
Customize Your App
Want to change something? Just ask Cocoding.ai:
Examples:
- "Add a filter for deal amount range"
- "Change health score thresholds"
- "Add export to CSV feature"
- "Show last activity date for each deal"
- "Add email notifications for RED deals"
Cocoding.ai will modify the code for you!
Add More Features
"Add a reports page showing pipeline velocity""Integrate with Slack to notify of stuck deals""Add a calendar view for task due dates""Create a mobile-friendly version"
Integrate Other Services
"Add Salesforce to sync deals across platforms""Integrate with Gmail to email deal updates""Connect to Stripe to track payments""Add Zoom to schedule meetings from deals"
Cocoding.ai builds it all!
🎓 Understanding What You Have
Your Application Has 3 Parts:
- Frontend (Port 8000)
- The website you see in your browser
- React application with beautiful UI
- Talks to backend for data
- Backend (Port 8001)
- Handles HubSpot communication
- Manages security and encryption
- Calculates deal health scores
- Stores audit logs
- Database (PostgreSQL)
- Stores your app users
- Stores encrypted HubSpot tokens
- Stores action logs
- Caches owner data
All three work together seamlessly!
📊 What Data is Stored Where
In Your Database (PostgreSQL)
- ✅ Your app login credentials
- ✅ Encrypted HubSpot tokens
- ✅ Audit logs (who did what, when)
- ✅ Cached HubSpot owner data
In HubSpot (stays there)
- ✅ All your deals
- ✅ All your contacts and companies
- ✅ All your tasks and notes
- ✅ All your pipeline data
Your app just reads and updates HubSpot - data stays in HubSpot!
🔐 Security You Get Automatically
Cocoding.ai built enterprise-grade security:
- ✅ Encrypted tokens - HubSpot credentials protected
- ✅ Hashed passwords - Your login is secure
- ✅ JWT authentication - Industry standard
- ✅ httpOnly cookies - Tokens never exposed to JavaScript
- ✅ HTTPS ready - For production deployment
- ✅ Rate limiting - Prevents attacks
- ✅ Audit logging - Track all actions
- ✅ CORS protection - Controls who can access your API
You didn't write a single line of security code!
🚀 Next Steps
1. Use Your App Daily
- Check dashboard for stuck deals
- Update deal stages regularly
- Create tasks for at-risk deals
- Monitor health score changes
2. Customize with Cocoding.ai
- Adjust health score thresholds
- Add custom deal properties
- Create custom views
- Build reports and analytics
3. Deploy for Your Team
- Get a domain name
- Deploy to cloud
- Enable HTTPS
- Invite team members
4. Build More Apps
Cocoding.ai can build anything:
- Customer portals
- Inventory systems
- Project management tools
- Analytics dashboards
- E-commerce sites
- And much more!
🎁 What You Get with Cocoding.ai
Instant Development
- ⚡ 2-3 minutes to complete app
- 🎨 Beautiful UI automatically
- 🔐 Security built-in
- 📚 Documentation included
Production-Ready Code
- ✅ Best practices followed
- ✅ Clean architecture
- ✅ Fully tested
- ✅ Scalable design
Complete Package
- ✅ Frontend + Backend
- ✅ Database setup
- ✅ API integration
- ✅ User authentication
- ✅ Deployment ready
No Technical Knowledge Needed
- ✅ Plain English instructions
- ✅ Automatic setup
- ✅ Guided configuration
- ✅ Troubleshooting help
📞 Getting Help
Cocoding.ai Support
- Visit:
- Ask questions in plain English
- Get instant code modifications
- Deploy to production
HubSpot Help
- Developer docs:
- CRM Overview:
- Community forums:
✅ Quick Checklist
Before you start using your app:
- [ ] Cocoding.ai built the application (2-3 minutes)
- [ ] Created HubSpot developer account (FREE)
- [ ] Created public app in HubSpot
- [ ] Configured OAuth 2.0 with correct redirect URL
- [ ] Added all required scopes
- [ ] Copied Client ID and Client Secret to
.env - [ ] Generated JWTSECRET, COOKIESECRET, ENCRYPTION_KEY
- [ ] Both servers are running (8000 and 8001)
- [ ] Created account in the app
- [ ] Connected HubSpot successfully
- [ ] Can see your deals!
🎉 Success!
You now have a professional HubSpot application:
- Built in minutes by AI
- No coding required
- Production-ready
- Fully customizable
- Secure and scalable
All thanks to Cocoding.ai!
🌟 Real-World Example
Alex's Story:
Before Cocoding.ai:
- Logged into HubSpot multiple times daily
- Manually checked each deal for activity
- Forgot which deals needed attention
- No way to prioritize stuck deals
- Took 2 hours daily to review pipeline
After Cocoding.ai (3 minutes to build):
- Dashboard shows all at-risk deals instantly
- Health scores highlight top priorities
- Bulk updates for multiple deals
- One-click task creation
- Takes 20 minutes daily to manage pipeline
Time saved: 1 hour 40 minutes per day!
🎯 Your Turn!
Ready to Build?
- Go to:
- Describe your app in plain English
- Wait 2-3 minutes
- Follow HubSpot setup (this guide)
- Start using your app!
Want Something Different?
Just describe it to Cocoding.ai:
- "Build me a contact management system"
- "Create a lead scoring application"
- "Make a sales analytics dashboard"
- "Build a customer onboarding tracker"
Cocoding.ai builds it all!
🚀 Final Words
You just learned how to:
- ✅ Build a complete application with AI
- ✅ Integrate with HubSpot
- ✅ Deploy production-ready software
- ✅ Customize and extend features
No coding required. Just plain English.
Welcome to the future of software development!
Visit to build your next app!
Last Updated: January 2025
Version: 1.0.0
Built with: Cocoding.ai - The AI that builds production-ready applications