instruction: What is the SaaS configurator in GoHighLevel and how do I use it?

output:
**GoHighLevel SaaS Configurator**

The SaaS Configurator allows agencies to create white-labeled SaaS offerings:

**Key Features:**
1. **Branding Control**: Custom domain, logo, colors, favicon
2. **Feature Gating**: Enable/disable features per plan tier
3. **Pricing Configuration**: Set monthly/annual pricing for clients
4. **Rebilling Markup**: Configure markup on SMS, calls, emails

**Setup Steps:**
1. Agency Settings → SaaS Configurator
2. Create pricing tiers (Starter, Pro, Enterprise)
3. Define feature access per tier
4. Set rebilling markups
5. Configure Stripe for automated billing
6. Generate client signup links

**Common Use Cases:**
- Marketing agencies selling CRM access
- Consultants offering automation platforms
- Franchises with branded portals

platform: gohighlevel


instruction: How do I set up automation workflows in GoHighLevel?

output:
**GoHighLevel Workflow Automation**

Navigate to: Automation → Workflows

**Workflow Components:**

**1. Triggers (Starting Points)**
- Form Submitted
- Appointment Booked/Cancelled
- Tag Added/Removed
- Pipeline Stage Changed
- Invoice Paid
- Birthday/Custom Date
- Inbound Call
- Email Opened/Clicked
- Webhook Received

**2. Actions (What Happens)**
- Send Email/SMS
- Add/Remove Tag
- Update Contact Field
- Move to Pipeline Stage
- Create Opportunity
- Assign to User
- Wait/Delay
- IF/ELSE Conditions
- Webhook Call

**Best Practices:**
1. Name workflows descriptively
2. Use folders for organization
3. Test with dummy data first
4. Enable 'Execute Once' for triggered actions
5. Set up error notifications

**Example: Lead Nurture Sequence**
```
Trigger: Form Submitted (Contact Form)
→ Wait 5 minutes
→ Send Email: Welcome
→ Wait 1 day
→ Send SMS: Did you receive our email?
→ Wait 3 days
→ IF no reply → Assign to Sales Rep
```

feature: workflows


instruction: How do I manage opportunities and sales pipelines in GoHighLevel?

output:
**GoHighLevel Pipeline Management**

Navigate to: Opportunities

**Pipeline Views:**
- **Kanban**: Drag-and-drop cards between stages
- **List**: Table view with filtering/sorting
- **Calendar**: View by expected close date

**Creating Pipelines:**
1. Go to Opportunities → Pipelines tab
2. Click 'Add Pipeline'
3. Define stages (e.g., Lead, Qualified, Proposal, Negotiation, Won, Lost)
4. Set stage colors and icons
5. Configure automation triggers per stage

**Opportunity Card Fields:**
- Monetary Value
- Expected Close Date
- Assigned User
- Contact Information
- Custom Fields
- Activity History
- Notes and Files

**Pipeline Automation Ideas:**
| Stage Change | Automation |
|--------------|------------|
| → Qualified | Assign to sales rep, send intro email |
| → Proposal | Create task for follow-up |
| → Won | Send thank you email, create invoice |
| → Lost | Add to re-engagement nurture |

**Reporting:**
- Pipeline value by stage
- Conversion rates stage-to-stage
- Revenue forecasting
- Rep performance metrics

feature: pipelines


instruction: What integrations are available in GoHighLevel?

output:
**GoHighLevel Integrations Hub**

Navigate to: Settings → Integrations

**Built-in Integrations:**

| Category | Integrations |
|----------|-------------|
| **Payment** | Stripe, PayPal, Authorize.net |
| **Calendar** | Google Calendar, Outlook, iCloud |
| **Email** | Gmail, Outlook, Mailgun, SMTP |
| **Social** | Facebook, Instagram, LinkedIn, TikTok |
| **Ads** | Facebook Ads, Google Ads |
| **Accounting** | QuickBooks, Xero |
| **CRM Import** | HubSpot, Salesforce, Pipedrive |
| **Communication** | Twilio, LeadConnector |
| **Analytics** | Google Analytics, Facebook Pixel |
| **Zoom** | Video conferencing for appointments |

**API Access:**
- Full REST API for custom integrations
- Zapier/Make connections available
- Webhook support for real-time events

**OAuth Apps (Premium):**
- Build custom marketplace apps
- Sell integrations to other agencies
- Revenue sharing with GHL

**Tip:** Always test integrations in a sub-account before rolling out agency-wide.

feature: integrations


instruction: How do I set up warehouse operations in Odoo Inventory?

output:
**Odoo Warehouse Operations Setup**

Navigate to: Inventory → Configuration → Warehouses

**Warehouse Structure:**
```
Warehouse (WH)
├── Input Zone (WH/Input)
│   └── Quality Control (WH/Input/QC)
├── Stock (WH/Stock)
│   ├── Zone A (Fast movers)
│   ├── Zone B (Medium movers)
│   └── Zone C (Slow movers)
└── Output Zone (WH/Output)
    └── Packing (WH/Output/Pack)
```

**Setting Up Routes:**
1. Go to Inventory → Configuration → Routes
2. Create routes for:
   - Buy → Receive → Stock
   - Pick → Pack → Ship
   - Cross-dock (direct to output)

**Operation Types:**
| Type | Purpose |
|------|---------|
| Receipts | Incoming goods |
| Deliveries | Outgoing shipments |
| Internal Transfers | Warehouse moves |
| Manufacturing | Production orders |

**Automation Options:**
- Auto-reserve stock on order confirmation
- Automatic reordering at min quantity
- Wave picking for batch processing
- Barcode scanning integration

platform: odoo

module: inventory


instruction: How do I configure products with variants in Odoo?

output:
**Odoo Product Variants Configuration**

Navigate to: Inventory → Products → Products

**Enabling Variants:**
1. Go to Settings → Inventory
2. Enable 'Variants'
3. Create attribute types

**Creating Attributes:**
```
Attribute: Color
Values: Red, Blue, Green, Black

Attribute: Size
Values: S, M, L, XL

Attribute: Material
Values: Cotton, Polyester, Blend
```

**Variant Creation Modes:**
- **Instantly**: Creates all combinations immediately
- **Dynamically**: Creates on-demand when ordered

**Example Product:**
```
Product: T-Shirt
Attributes: Color (3) × Size (4) = 12 variants

SKU Pattern: TSHIRT-{COLOR}-{SIZE}
→ TSHIRT-RED-S, TSHIRT-RED-M, etc.
```

**Variant-Specific Settings:**
- Individual pricing per variant
- Separate inventory tracking
- Unique barcodes
- Different suppliers
- Variant-level images

**Best Practices:**
1. Use variant-level tracking for sizing
2. Group by product for reporting
3. Set default variant for quick entry

module: products


instruction: How do I set up multi-company accounting in Odoo?

output:
**Odoo Multi-Company Accounting**

Navigate to: Settings → Users → Companies

**Setup Process:**

**1. Create Companies**
```
Parent Company: ABC Holdings
├── Subsidiary 1: ABC Manufacturing
├── Subsidiary 2: ABC Retail
└── Subsidiary 3: ABC Services
```

**2. Configure Chart of Accounts**
Each company needs its own:
- Chart of Accounts
- Fiscal Year settings
- Tax configuration
- Bank accounts

**3. Inter-Company Transactions**
Enable: Settings → General Settings → Inter-Company Transactions

Auto-creates:
- Purchase Order ↔ Sales Order
- Invoices ↔ Bills
- Journal entries for reconciliation

**4. User Access**
- Users can belong to multiple companies
- Permission per company possible
- Switch companies in top-right dropdown

**Consolidated Reporting:**
```
Consolidation Company (ABC Holdings)
  ↓
Aggregates financials from all subsidiaries
  ↓
Elimination entries for inter-company
  ↓
Consolidated P&L, Balance Sheet
```

**Tips:**
- Use same currency for consolidation
- Match fiscal periods across companies
- Standardize COA numbering

module: accounting


instruction: Show me a complete eCommerce automation project using n8n

output:
**Case Study: eCommerce Order Fulfillment Automation**

**Client:** Mid-sized DTC fashion brand
**Challenge:** Manual order processing causing 48-hour fulfillment delays
**Solution:** End-to-end n8n automation

---

**Before Automation:**
- Staff manually copying Shopify orders to spreadsheet
- Warehouse team printing pick lists by hand
- No inventory sync between platforms
- Customer service responding to "where's my order" manually

**Automation Architecture:**
```
Shopify Order Created
    ↓
n8n Webhook captures order
    ↓
Validate inventory (check Shopify + WMS)
    ↓
IF in stock:
  → Create shipping label (ShipStation)
  → Update order status
  → Send confirmation email
ELSE:
  → Backorder notification
  → Add to restock queue
    ↓
Track shipment status
    ↓
Send delivery notification
```

**Workflows Built:**
1. Order Processing (main flow)
2. Inventory Sync (Shopify ↔ Warehouse)
3. Customer Communication (5-email sequence)
4. Return Processing
5. Analytics Dashboard Update

**Results (After 90 Days):**
| Metric | Before | After | Improvement |
|--------|--------|-------|-------------|
| Fulfillment time | 48 hrs | 4 hrs | 92% faster |
| Manual data entry | 6 hrs/day | 0 hrs | 100% eliminated |
| Shipping errors | 5%/week | 0.2%/week | 96% reduction |
| WISMO tickets | 120/week | 15/week | 87% reduction |

**ROI:** $180,000/year saved in labor + error costs

industry: ecommerce

complexity: advanced


instruction: How do I calculate ROI for automation projects?

output:
**Automation ROI Calculator Framework**

**Formula:**
```
ROI = (Annual Savings - Implementation Cost) / Implementation Cost × 100%
```

**Step 1: Measure Current State**

| Manual Task | Time/Week | Hourly Rate | Weekly Cost |
|-------------|-----------|-------------|-------------|
| Data entry | 10 hrs | $25 | $250 |
| Report generation | 5 hrs | $35 | $175 |
| Email follow-ups | 8 hrs | $25 | $200 |
| Error corrections | 3 hrs | $40 | $120 |
| **Total** | **26 hrs** | | **$745/week** |

**Annual manual cost: $745 × 52 = $38,740**

**Step 2: Calculate Implementation Cost**

| Item | Cost |
|------|------|
| n8n setup (self-hosted) | $0 - $500 |
| Development time (40 hrs @ $100) | $4,000 |
| n8n Cloud (if applicable) | $50/month = $600/year |
| Maintenance (5 hrs/month @ $100) | $6,000/year |
| **Total Year 1** | **$11,100** |

**Step 3: Estimate Post-Automation**

| Remaining Manual Work | Time/Week | Cost |
|-----------------------|-----------|------|
| Exception handling | 2 hrs | $50 |
| Oversight/monitoring | 1 hr | $35 |
| **Total** | **3 hrs** | **$85/week** |

**Annual post-automation cost: $85 × 52 = $4,420**

**Step 4: Calculate ROI**
```
Annual Savings = $38,740 - $4,420 = $34,320
Year 1 ROI = ($34,320 - $11,100) / $11,100 × 100% = 209%
Payback Period = 4 months
```

**Intangible Benefits:**
- Faster processing (customer satisfaction)
- Fewer errors (brand reputation)
- Scalability (handle 10x volume)
- Employee focus on high-value work

complexity: intermediate


instruction: Show me a before/after comparison of a marketing automation implementation

output:
**Before/After: Marketing Agency Automation**

**Agency Profile:**
- 15-person digital marketing agency
- 40+ active clients
- Services: Social media, email, paid ads

---

## BEFORE (Manual Processes)

**Daily Routine:**
```
8:00 AM - Check all client Facebook pages manually
9:00 AM - Download analytics from each platform
10:00 AM - Build reports in spreadsheets
11:00 AM - Send reports via email
1:00 PM - Schedule social posts (Hootsuite)
3:00 PM - Check lead forms, enter into CRMs
4:00 PM - Send follow-up emails to leads
5:00 PM - Update project management boards
```

**Pain Points:**
- 4 hours/day on repetitive tasks per person
- Inconsistent reporting formats
- Leads going cold (24-48hr response time)
- Human errors in data entry
- No time for strategy work

---

## AFTER (n8n Automation)

**Automated Workflows:**

**1. Social Media Management**
```
Schedule: Every day 8 AM
→ Check content calendar (Google Sheets)
→ Pull approved posts
→ Post to FB, IG, LinkedIn, Twitter
→ Log performance to dashboard
```

**2. Lead Capture & Distribution**
```
Trigger: Form submission (any client)
→ Identify client from form source
→ Add to client's CRM (HubSpot/GHL/Salesforce)
→ Send instant SMS: "We'll call in 5 minutes"
→ Assign to available sales rep
→ Create follow-up task
```

**3. Client Reporting**
```
Schedule: Every Friday 9 AM
→ Pull metrics from all sources
→ Generate client-specific PDF report
→ Email to client with commentary
→ Update master dashboard
```

**Results Comparison:**

| Metric | Before | After |
|--------|--------|-------|
| Time on manual tasks | 4 hrs/day/person | 30 min/day |
| Lead response time | 24-48 hrs | < 5 minutes |
| Report generation | 2 hrs/client/month | 0 (automated) |
| Client capacity | 40 clients | 100+ clients |
| Billable hours | 60% | 85% |

**Revenue Impact:**
- Same team now handles 2.5x clients
- $400K additional annual revenue
- Client retention improved 35%


instruction: How do I build automated dashboards with n8n?

output:
**Automated Dashboard Building with n8n**

**Architecture:**
```
Data Sources → n8n (ETL) → Data Store → Visualization Tool
```

**Step 1: Data Collection Workflow**
```javascript
// Scheduled data refresh
const [
  salesData,
  marketingData,
  supportData
] = await Promise.all([
  stripe.charges.list({ created: { gte: startOfMonth } }),
  googleAnalytics.getData({ metrics: ['sessions', 'conversions'] }),
  zendesk.tickets.list({ status: 'closed', created: '>30d' })
]);

// Transform and aggregate
const dashboard = {
  revenue: salesData.reduce((s, c) => s + c.amount, 0) / 100,
  newCustomers: salesData.filter(c => c.metadata.isNew).length,
  webSessions: marketingData.sessions,
  conversionRate: (marketingData.conversions / marketingData.sessions * 100).toFixed(2),
  ticketsResolved: supportData.length,
  avgResolutionTime: calculateAvgTime(supportData)
};
```

**Step 2: Store in Google Sheets**
```javascript
await googleSheets.appendRow({
  spreadsheetId: 'dashboard-data',
  range: 'DailyMetrics',
  values: [[
    new Date().toISOString(),
    dashboard.revenue,
    dashboard.newCustomers,
    dashboard.webSessions,
    dashboard.conversionRate
  ]]
});
```

**Step 3: Visualization Options**

| Tool | Integration | Best For |
|------|-------------|----------|
| Google Data Studio | Direct Sheets connection | Free, easy |
| Tableau | API push or database | Enterprise |
| Grafana | Database, Prometheus | Real-time |
| Metabase | Database | Open-source |

**Alerting Layer:**
```javascript
// Alert on anomalies
if (dashboard.revenue < lastWeekAvg * 0.7) {
  await slack.send({
    channel: '#alerts',
    text: `⚠ Revenue 30% below last week average`
  });
}
```

category: analytics

use_case: dashboards


instruction: How do I track KPIs automatically with n8n?

output:
**Automated KPI Tracking System**

**1. Define Your KPIs**
```javascript
const kpiConfig = {
  financial: [
    { name: 'MRR', source: 'stripe', formula: 'sum(subscriptions.amount)' },
    { name: 'Churn Rate', source: 'stripe', formula: 'cancelled/total * 100' },
    { name: 'LTV', source: 'stripe', formula: 'avgRevenue * avgLifespan' }
  ],
  marketing: [
    { name: 'CAC', source: 'multi', formula: 'adSpend / newCustomers' },
    { name: 'Lead Velocity', source: 'crm', formula: 'thisMonth.leads - lastMonth.leads' },
    { name: 'MQL→SQL Conversion', source: 'crm', formula: 'sql / mql * 100' }
  ],
  product: [
    { name: 'DAU', source: 'analytics', formula: 'activeUsers' },
    { name: 'Feature Adoption', source: 'analytics', formula: 'featureUsers / totalUsers' },
    { name: 'NPS', source: 'surveys', formula: 'promoters - detractors' }
  ]
};
```

**2. Collection Workflow**
```
Schedule: Daily at 6 AM
    ↓
FOR each KPI category:
  → Fetch data from source
  → Calculate metric
  → Compare to target
  → Store history
    ↓
Generate summary report
    ↓
Distribute to stakeholders
```

**3. Trend Analysis**
```javascript
// Calculate week-over-week change
const currentValue = kpi.value;
const previousValue = await db.query(
  'SELECT value FROM kpi_history WHERE name = $1 AND date = $2',
  [kpi.name, oneWeekAgo]
);

const trend = {
  direction: currentValue > previousValue ? 'up' : 'down',
  change: ((currentValue - previousValue) / previousValue * 100).toFixed(1),
  status: currentValue >= kpi.target ? 'on_track' : 'behind'
};
```

**4. Executive Summary Email**
```
Subject: Daily KPIs - January 1, 2026

📊 Key Metrics Summary:
━━━━━━━━━━━━━━━━━━━━━━
✅ MRR: $125,000 (+5% WoW)
✅ DAU: 15,234 (+12% WoW)
⚠ CAC: $125 (+8% WoW - above target)
❌ Churn: 3.2% (target: 2.5%)

[View Full Dashboard]
```


instruction: How do I build appointment booking automation with n8n?

output:
**Appointment Booking Automation**

**Complete Booking Flow:**
```
1. Customer books via calendar link
2. n8n receives booking webhook
3. Validate no conflicts
4. Send confirmation (email + SMS)
5. Add to Google Calendar
6. Create CRM record
7. Schedule reminders
8. Post-appointment follow-up
```

**1. Webhook Handler**
```javascript
// Calendly/Cal.com webhook
const booking = $input.first().json;

const appointmentData = {
  clientName: booking.invitee.name,
  clientEmail: booking.invitee.email,
  clientPhone: booking.questions_and_answers.find(q => q.question === 'Phone')?.answer,
  dateTime: booking.event.start_time,
  duration: booking.event.duration,
  service: booking.event_type.name,
  staffMember: booking.event.host.email
};
```

**2. Multi-Channel Confirmation**
```javascript
// Email confirmation
await sendEmail({
  to: appointmentData.clientEmail,
  subject: `Appointment Confirmed: ${formatDate(appointmentData.dateTime)}`,
  template: 'appointment_confirmation',
  data: appointmentData
});

// SMS confirmation
await twilio.sendSms({
  to: appointmentData.clientPhone,
  body: `Your appointment is confirmed for ${formatDateTime(appointmentData.dateTime)}. Reply CONFIRM to acknowledge.`
});
```

**3. Reminder Schedule**
```
24 hours before:
  → Email reminder with prep instructions
  → Calendar notification

2 hours before:
  → SMS reminder

30 minutes before (for virtual):
  → Send meeting link
```

**4. No-Show Handling**
```javascript
// Check for check-in 15 min after start
const checkedIn = await checkAppointmentStatus(appointmentId);

if (!checkedIn) {
  await markAsNoShow(appointmentId);
  await sendNoShowFollowup(appointmentData);
  await rescheduleLink(appointmentData.clientEmail);
}
```

**5. Post-Appointment Automation**
- Send thank you email
- Request review/feedback
- Schedule follow-up appointment
- Update CRM with notes

category: scheduling


instruction: How do I set up resource scheduling automation?

output:
**Resource Scheduling Automation with n8n**

**Use Cases:**
- Equipment booking (conference rooms, vehicles, machinery)
- Staff shift scheduling
- Facility reservations

**1. Resource Availability Check**
```javascript
// Check if resource is available
async function checkAvailability(resourceId, startTime, endTime) {
  const conflicts = await db.query(`
    SELECT * FROM bookings
    WHERE resource_id = $1
    AND start_time < $3
    AND end_time > $2
  `, [resourceId, startTime, endTime]);

  return conflicts.length === 0;
}

const isAvailable = await checkAvailability(
  resource.id,
  requestedStart,
  requestedEnd
);

if (!isAvailable) {
  // Find next available slot
  const nextSlot = await findNextAvailable(resource.id, requestedStart);
  return { available: false, suggestion: nextSlot };
}
```

**2. Booking Creation Flow**
```
Request Received
    ↓
Check Resource Availability
    ↓
IF available:
  → Create Booking Record
  → Block Calendar Time
  → Send Confirmation
  → Schedule Prep/Cleanup Time
ELSE:
  → Suggest Alternatives
  → Add to Waitlist (optional)
```

**3. Conflict Prevention**
```javascript
// Database-level lock to prevent double booking
await db.transaction(async (trx) => {
  // Lock the resource row
  await trx.raw('SELECT * FROM resources WHERE id = $1 FOR UPDATE', [resourceId]);

  // Recheck availability inside transaction
  const conflicts = await trx.select().from('bookings')
    .where('resource_id', resourceId)
    .whereBetween('start_time', [start, end]);

  if (conflicts.length > 0) {
    throw new Error('Resource became unavailable');
  }

  // Create booking
  await trx.insert({
    resource_id: resourceId,
    user_id: userId,
    start_time: start,
    end_time: end
  }).into('bookings');
});
```

**4. Utilization Reporting**
```javascript
// Weekly resource utilization report
const utilization = await db.query(`
  SELECT
    r.name as resource,
    COUNT(b.id) as bookings,
    SUM(EXTRACT(EPOCH FROM (b.end_time - b.start_time))) / 3600 as hours_used,
    (SUM(EXTRACT(EPOCH FROM (b.end_time - b.start_time))) /
     (7 * 24 * 3600) * 100) as utilization_pct
  FROM resources r
  LEFT JOIN bookings b ON r.id = b.resource_id
  WHERE b.start_time >= $1
  GROUP BY r.id
`, [weekStart]);
```