Skip to content
Framework · 11 stations · 2h linear

From spreadsheet to ERP.

Follow the class station by station. Each block has the ready-made prompt, the step-by-step, and what you walk away with. Do it with your real spreadsheet.

Claude (Pro) Lovable Cloud Skills Connectors
QR for the framework
Open it now · scan or type
openacademyai.jvictordev.expert/en/f

Point your camera at the QR or open the link in your browser to follow along with the class.

📊
No spreadsheet ready? · Grab the templates
Public folder with 2 template spreadsheets (sales + finance)

Aurora Distribution · ~6 months of data · planted anomalies for the demo · fits inside Claude Pro

Open folder →
Before you start · Security & data protection

The 3 fears every founder has, answered.

Straight answers before you upload any real spreadsheet.

Fear 1
"Will the AI train on my data?"

No. On Claude Pro / Team, Anthropic does not train on commercial conversations by default. Same rule for attached files. Confirm under Settings → Privacy.

Fear 2
"Are my files exposed forever?"

No. Attached files disappear when the conversation is deleted. Connectors read on demand — they don't copy. You can revoke access in Settings → Connectors.

Fear 3
"What about sensitive data (SSN, tax IDs, names)?"

Anonymize anything you don't actually need for the analysis (replace with an ID). Modern data-protection laws (LGPD in Brazil, GDPR in the EU) require data minimization — it's a general rule, not specific to AI.

Bonus · Lovable

Your app lives in a private workspace under YOUR account. Google auth → only you (or whoever you invite) gets in. The internal Lovable Cloud database is isolated per project, not shared.

Golden rule

Treat the prompt like a corporate email. If you wouldn't send it to an outside consultant, don't paste it into the chat.

01
Station 01 · 4 min

Organizing the Data

Good AI doesn't save a bad spreadsheet. A quick cleanup prevents 80% of analysis errors.

Fast visual checklist
  • Header on row 1, no titles above it
  • No merged cells
  • No formulas that depend on external files
  • Dates stored as dates, numbers as numbers (not text)
  • Sensitive data removed when not needed
No spreadsheet ready? Use the template

Public folder with 2 template spreadsheets — already cleaned, lightweight, and seeded with anomalies (Aurora Distribution, ~6 months of data — fits inside Claude Pro).

Open folder in Drive →

Files: vendas-aurora-modelo.xlsx · financeiro-aurora-modelo.xlsx

Station deliverable

You have 2 spreadsheets (yours or the templates) in Google Drive, inside a dedicated folder (e.g. imersao-ia/).

02
Station 02 · 8 min

Connecting Drive to Claude

Connectors kill the "endless copy-paste" loop. Hook it up once, use it forever.

  1. 1. In claude.aiSettings → Connectors → Google Drive → Connect
  2. 2. Run the Google OAuth flow → grant read access
  3. 3. Back in Claude → confirm the green status
  4. 4. In a new chat, validate it: "list my 3 most recent files from Drive"
Deliverable

Drive connected. Claude reads your files without manual upload.

On Excel / Microsoft 365? Skip this station

You don't need the Google Drive connector for the analysis phase. Microsoft path:

  1. 1. Jump straight to Station 03 (build the skill — exact same step).
  2. 2. In Station 04, attach the 2 xlsx files in chat (paperclip button / drag-and-drop). Claude reads xlsx natively.
  3. 3. In Station 07, use Prompt A · Microsoft (the variant inside that station). It activates Lovable's native Microsoft Excel connector instead of Google Drive.
  4. 4. Every other station (06, 08, 09, 10, 11) is identical — KPIs, architecture, and robustness don't change.
03
Station 03 · 8 min

Building a Skill via Skill Creator

Building a skill by hand gets stuck on the SKILL.md. Asking Claude to build it is faster and comes back formatted right. The whole class will use this skill, so invest the 8 minutes here.

Prompt · Paste into Claude.ai
I want you to build a new skill for me called "strategic-business-analysis".

Purpose: when I attach one or more business spreadsheets (sales, finance,
ops), the skill should:

1. Primary focus: lay out the STRATEGIC KPI panel this company should be
   tracking — not just listing numbers, but saying which ones matter for
   the decision.
2. Secondary focus: flag critical gaps that show up when the spreadsheets
   are cross-referenced.
3. Output: master KPI table + recommended dashboard architecture
   with 2 sections (Sales and Finance).

Style: executive, founder-friendly language, no unnecessary technical jargon.
Always execute code to validate calculations. Always cross-check 2 random
rows before concluding.

Build the complete skill: SKILL.md with frontmatter (name + description) +
structured instructions + output format + rules.
Then hand me the file ready to upload under Settings → Features → Skills.
Upload the skill
  1. 1. Save the SKILL.md content into a file named SKILL.md
  2. 2. Put the file inside a folder named after the skill, then zip the folder
  3. 3. Settings → Features → Skills → Upload
  4. 4. Toggle it on
Deliverable

Live skill. It will activate on its own in the next station when you drop the spreadsheet in.

04
Station 04 · 5 min

Strategic KPI Prompt

Paste the prompt below into the same conversation where you built the skill (keeps the context to use later on). Replace the bracketed fields with YOUR company's data.

Prompt · Strategic analysis
You are a VP of operations with 20 years in the [YOUR COMPANY'S INDUSTRY] sector.
Your mission: lay out the STRATEGIC panel for the two attached spreadsheets.

<context>
Company: [COMPANY NAME] — [ONE-LINE DESCRIPTION]
Average monthly revenue: $ [VALUE]
Team: [N] people · [N] active sales reps
Important decision in the next 30 days: [SPECIFIC DECISION]
</context>

<files>
I attached (or these are in my connected Drive):
- Sales spreadsheet
- Finance spreadsheet

Identify the files by name and content. Use the connectors
to access them if they're on Drive.
</files>

<task>
PRIMARY FOCUS — Strategic KPI panel:
Define the 8-12 KPIs this company should be monitoring WEEKLY,
based on the business model + available data + industry benchmarks.

For each KPI:
- Name
- Formula (with exact column names from the spreadsheets)
- Current calculated value
- Industry benchmark (use your knowledge)
- Ideal review frequency
- Owner (role/area)
- Which dashboard section it belongs to (Sales or Finance)

SECONDARY FOCUS — Cross-spreadsheet gaps (3 items):
Cross the two spreadsheets and surface 3 gaps that only appear at that intersection
(e.g., the top sales customer vs. their aging in finance).

FINAL DELIVERABLE:
Recommended executive dashboard architecture with 2 sections:
"Sales" and "Finance". Specify which KPIs go in each section, which filters
should be global, and the right visualization for each KPI (card, line chart,
table, funnel, etc.).
</task>

<format>
1. Executive overview (1 paragraph, 5 lines)
2. Master KPI table (8-12 rows)
3. 3 cross-cutting gaps (sales × finance)
4. Dashboard architecture: Sales section + Finance section
</format>

Execute code to validate calculations. Cross-check 2 random rows from each spreadsheet
before concluding.
Deliverable

Prompt sent. The skill from station 03 will activate automatically. Output lands in 30-90 seconds.

05
Station 05 · 15 min

Reading the Output

Time for critical reading. The first output is almost never the final one — refine it in conversation until it matches the reality of the company.

How to read the output
  • Does each KPI have a clear formula? Can you find the column in the spreadsheet?
  • Do the benchmarks make sense for your sector? If not, adjust them.
  • Did the 3 cross-cutting gaps surprise you? Those are the gold.
  • Does the proposed architecture (Sales + Finance) cover what you actually decide on each week?
Refine in conversation (examples)
  • "Go deeper on KPI [X] — show me the calculation row by row"
  • "The benchmark for [Y] doesn't match my industry. It's actually [Z]. Recalculate."
  • "Add a KPI for [specific to my business] that you missed."
  • "Which filter should be global vs. specific to each section?"
Deliverable

Master KPI table approved by you + 2-section architecture defined. Don't close the chat — it's the brain of the entire class.

06
Station 06 · 5 min

Lovable Architecture Prompt

Your analysis just became the spec. Now ask Claude (in the same conversation) to generate a single prompt ready to paste into Lovable.

Prompt · Generate the Lovable prompt
Generate PROMPT B — ready to paste into Lovable AFTER Prompt A.

GOAL OF PROMPT B: get Lovable to deliver a working MVP in a SINGLE
generation — no phases, no confirmations, no cron, no webhook,
no admin role, no manual "sync now". When the founder opens the
app for the first time, the dashboards must already be populated.

CONTEXT (mention briefly inside Prompt B):
- Lovable's NATIVE connectors are already ACTIVE (via Prompt A):
  Google Drive + Sheets OR Microsoft Excel (if MS 365 environment)
- Files already connected:
  · [TYPE 1]: [EXACT NAME OF FILE 1 ANALYZED IN THIS CONVERSATION]
  · [TYPE 2]: [EXACT NAME OF FILE 2 ANALYZED IN THIS CONVERSATION]
- Spreadsheet content already analyzed by me (Claude) in this conversation.
  KPIs, formulas, dimensions and architecture are ALREADY DECIDED below.
  DO NOT re-analyze. DO NOT rediscover the schema. DO NOT infer KPIs.

ENGINEERING RULES — INCLUDE EXPLICITLY IN PROMPT B:
- Deliver the complete MVP in one generation. No splitting into phases.
  No asking for confirmation. No "next turns".
- Stack: React + TypeScript + Tailwind + shadcn/ui + Recharts + Lovable
  Cloud (internal database and auth). No external Supabase, no Firebase.
- Auth: Lovable Cloud's native Google login. Single-user. NOT
  multi-tenant. No custom OAuth. No Service Account. No
  Google Cloud Console. No extended OAuth scopes.
- Render DIRECTLY from the Sheets connector. DO NOT cache to a database
  with upsert + PK. DO NOT use Watch Channel, webhooks, pg_cron, or sync
  edge functions. DO NOT build a "sync now" screen.
- KPIs are ALREADY DEFINED below. Use the exact formulas. Do not infer.
- If any data is missing in the spreadsheet, show an elegant Empty State
  (never crash, never blank screen, never "under construction").

ROBUSTNESS RULES — MANDATORY in Prompt B (they prevent the common bugs
you see in dashboards reading real spreadsheets with arbitrary structure):

R1. PARSE DATES IN LOCAL TIME ZONE
   - Create a helper `parseLocalDate(s: string): Date` that splits
     YYYY-MM-DD and builds Date with `new Date(y, m-1, d)` (local zone).
   - FORBIDDEN to call `new Date("YYYY-MM-DD")` directly — it parses as UTC
     and in negative zones (e.g. BRT/UTC-3) shifts back by 1 day.
   - Apply to EVERY date column identified in the spreadsheet,
     whatever it's called (date, issued, due, created_at).

R2. TEMPORAL ANCHOR = dataClock
   - Compute `dataClock = min(max(dataset dates), today)` at load time.
   - Windows for "current month / MTD / YTD" anchor on `dataClock`,
     not on `new Date()`. Guarantees the dashboard opens with data even
     if the spreadsheet has no rows for today.
   - Windows for "today / 7d / 14d / 30d / custom" anchor on real today.
     Don't substitute.

R3. DIFFERENTIATED PERIOD FALLBACK
   - If "month / MTD / YTD" comes back empty → fall back to the last
     period with data + show banner "Showing data from [period]".
   - If "today / 7d / 14d / 30d / custom" comes back empty →
     respect the user's choice. NEVER fall back silently.

R4. SAFETY NETS ON ANNUAL AGGREGATIONS / RANKINGS
   - Every YTD aggregation, annual Top-N ranking, annualized metric (DSO,
     turnover, etc.): if the anchor year is empty, fall back to
     "all historical data filtered by the same qualitative criteria"
     + a stale banner.
   - Portfolio metrics (delinquency, occupancy, utilization):
     if the range is empty, fall back to total portfolio. Never return 0
     because of a date-range mismatch.

R5. TWO-LAYER CACHE WITH REALTIME MODE
   - Server: 30s TTL by default. Realtime mode: dedupe in-flight by fileId
     + cheap `modifiedTime` check before downloading the XLSX +
     mini-TTL of 3s on metadata + resilient fallback if metadata fails.
   - Client: React Query staleTime 60s by default. Realtime: staleTime 0
     + refetchInterval 5s + bust flag on the call.
   - Manual "Refresh" button in each section header triggers refetch.

R6. DEFENSIVE ROUTING
   - `useSearch({ strict: false })` in EVERY global component
     (filters, header, sidebar).
   - `useNavigate` only when the destination route is mounted:
     guard `currentPath.startsWith(targetUrl)` OR use a URL_FOR map.
   - Filter updates use `replace: true` (don't push to history).

R7. SECRETS SERVER-ONLY
   - API keys (LOVABLE_API_KEY, GOOGLE_DRIVE_API_KEY or
     equivalents) live in server functions, never in the client bundle.
   - Components consume them via typed RPC.

R8. XLSX PARSING
   - `cellDates: true` on read.
   - Dates serialized as `YYYY-MM-DD` before returning to the client
     (consume with `parseLocalDate`).
   - Numbers: force numeric type, strip locale separators (e.g. "," → ".")
     where applicable; ignore cells with dirty text.

PROMPT B STRUCTURE (generate it in this order):

1. STACK + CONNECTED FILES
   - 2-3 lines: React+TS+Tailwind+shadcn+Recharts+Lovable Cloud
   - Exact file names + which section each one feeds
   - List the relevant tabs for each one

2. APP ARCHITECTURE
   - Fixed sidebar with the identified section items (min. 2)
   - "Settings" tucked away just to view connection status
   - Each section: KPI cards on top (4-5 grid) + 2-3 charts +
     1 analytical table at the bottom
   - Global filters in the header (date range + 1-2 spreadsheet dimensions)
   - Visual: dark mode, OKLCH blue + violet + mint, Inter Tight + Inter
   - Mobile: sidebar becomes a drawer, grids collapse to single column

3. KPIS BY SECTION
   - List the EXACT KPIs from the master table produced in this conversation
   - For each KPI: name · formula with specific column · format
     ($X.XXM · XX% · etc) · which component it appears in
   - MoM/YoY variation with green/red arrow
   - Semantic borders on KPIs deteriorating ≤ -5% MoM

4. DATA — DIRECT READ
   - Single server function `getSheetData(sheetName, range)` that uses
     Lovable's native Sheets connector
   - Apply ALL rules R1-R8 above in the domain layer (lib/calc.ts)
   - Frontend calls via React Query with staleTime 60s + auto-refetch
   - "Refresh" button in each section triggers manual refetch
   - Last update visible in the header ("X seconds ago")
   - NO intermediate database, NO upsert, NO watch channel

5. VISUAL STATES
   - Loading: Skeleton on every card and chart
   - Empty: Inbox icon + "No data for this filter/period"
   - Read error: yellow banner at the top + automatic retry
   - Stale: light blue banner "Showing data from [period]"
     when the period fallback (R3) kicks in

6. FINAL DELIVERABLE
   - Working login · sections POPULATED with real data ·
     filters operating · auto-refresh working ·
     mobile responsive · zero manual action required ·
     R1-R8 all implemented

RETURN: only the text of Prompt B, in English. No commentary
before or after. No questions. No approval checklist. No
"confirm the OAuth strategy". No timeline. Ready to paste.
Deliverable

A block of text ready to paste into Lovable. Copy the whole thing — it goes into the next step.

07
Station 07 · 10 min

Connecting Lovable to the Spreadsheets

This is where the app moves from mock to real data. Two prompts in sequence — first confirm the connected files, then send the architecture. That avoids Lovable building unnecessary multi-tenant OAuth.

  1. 1. lovable.devNew Project
  2. 2. Paste Prompt A below (connection check) → Send
  3. 3. Lovable connects Drive + Sheets, confirms both files with their date and tabs
  4. 4. When it confirms "Ready to receive the architecture prompt", paste Prompt B (the one generated in station 06, with the file names already embedded)
  5. 5. The skeleton ships in 3-5 min, reusing the connection it already established
Pick the Prompt A that matches your environment
Prompt A · Google Drive + Sheets
Before building anything, do ONLY this:

1. Activate Lovable's NATIVE connectors: Google Drive + Google Sheets.
   DO NOT build your own OAuth flow. DO NOT use a Service Account JSON.
   DO NOT use external Supabase — use Lovable Cloud (internal database).

2. Once connected, list my Drive files and identify the TWO
   I'll be using:
   - Sales spreadsheet — exact name: [EXACT NAME OF YOUR SALES FILE].xlsx
   - Finance spreadsheet — exact name: [EXACT NAME OF YOUR FINANCE FILE].xlsx

3. Confirm access to each file. For each one, show:
   - Exact name found on Drive
   - Last modified date
   - Number of tabs and the name of each tab

4. DO NOT build the interface, database schema, or sync logic
   yet. Just respond confirming both files are connected.

Expected response (format):
"Connected.
- [sales-name].xlsx · modified on [date] · N tabs: [list]
- [finance-name].xlsx · modified on [date] · N tabs: [list]
Ready to receive the architecture prompt."

When I send the next prompt, it will contain the complete architecture.
Build on top of these ALREADY CONNECTED files, no manual onboarding
of Spreadsheet IDs and no Service Account field.
Prompt A · Microsoft Excel (OneDrive)
Before building anything, do ONLY this:

1. Activate Lovable's NATIVE connector: Microsoft Excel.
   DO NOT build your own OAuth flow. DO NOT use Google Drive.
   DO NOT use a Service Account JSON.
   DO NOT use external Supabase — use Lovable Cloud (internal database).

2. Once connected, list the Excel spreadsheets available in my
   OneDrive and identify the TWO I'll be using:
   - Sales spreadsheet — exact name: [EXACT NAME OF YOUR SALES FILE].xlsx
   - Finance spreadsheet — exact name: [EXACT NAME OF YOUR FINANCE FILE].xlsx

3. Confirm access to each file. For each one, show:
   - Exact name found in OneDrive
   - Last modified date
   - Number of worksheets and the name of each one

4. DO NOT build the interface, database schema, or sync logic
   yet. Just respond confirming both files are connected.

Expected response (format):
"Connected.
- [sales-name].xlsx · modified on [date] · N worksheets: [list]
- [finance-name].xlsx · modified on [date] · N worksheets: [list]
Ready to receive the architecture prompt."

When I send the next prompt, it will contain the complete architecture.
Build on top of these ALREADY CONNECTED files, with no manual file ID
onboarding and no credentials field.
Prompt B · Architecture

After Lovable confirms "Connected · Ready to receive the architecture prompt", paste in the large prompt generated in station 06. It already includes the exact file names embedded, and Lovable will build on top of the existing connection.

Prompt C · Emergency fix (only if something went wrong)

If Lovable already built its own OAuth, external Supabase, or asked you for a manual Spreadsheet ID, paste this prompt to fix it:

corrective prompt
Stop the refactor you had planned.

Refactor the app, removing all manual onboarding for Spreadsheet IDs,
Service Account, custom OAuth with extended scopes, and external Supabase.

CONNECTION — correct mode:
- Use Lovable's NATIVE connectors: Google Drive + Google Sheets
- No custom multi-tenant OAuth flow
- ZERO manual ID fields or Service Account JSON

FILES (locate by exact name in the already-connected Drive):
- [Section 1]: [EXACT FILE NAME].xlsx
- [Section 2]: [EXACT FILE NAME].xlsx

ROBUSTNESS — implement if missing:
- parseLocalDate(YYYY-MM-DD) in local time zone; NEVER new Date(ISO string)
- dataClock = min(max(dataset date), today) for month/MTD/YTD anchors
- Period fallback: only for month/MTD/YTD (relative ranges respect the user)
- Safety net for YTD/rankings/portfolio: fall back to total history when
  the range is empty, with a stale banner
- Cache: server TTL 30s + realtime mode with dedupe + modifiedTime check;
  client React Query staleTime 60s (0 in realtime) + refetch 5s
- useSearch({strict: false}) + replace:true + currentPath guard
- Secrets only in server functions

Keep KPIs, charts, filters, design system, and alerts as they are.
Refactor only the connection, robustness, and sync layers.
Deliverable

App with real data in both sections. The KPIs at the top show real numbers.

08
Station 08 · 15 min

Building the Dashboard MVP

A skeleton isn't a deliverable. Here you refine in conversation until the app feels like a real product, not a prototype.

Typical iterations (paste into the Lovable chat, one at a time)
  1. 1. "Make the KPI cards bigger. Big number on top, label below, MoM variation on the side in green/red."
  2. 2. "Finance section: the 'Gross Margin' card turns red when it drops below [YOUR THRESHOLD]%."
  3. 3. "Sales section: add a horizontal progress bar next to the top 5 customers, showing % of revenue."
  4. 4. "Multi-select filters. State persisted in the URL (shareable)."
  5. 5. "Nice empty state — 'No data for this filter. Try widening the period.'"
  6. 6. "Skeleton loader on every table during refresh."
  7. 7. "Toggle in the header switching between 'Executive view' (KPIs only) and 'Detailed view' (everything)."
Deliverable

A usable, professional dashboard showing the numbers that actually matter for your decisions.

09
Station 09 · 5 min

Validating the MVP

Without validation, an MVP turns into an abandoned prototype.

Checklist
  • Strategic KPIs visible without scrolling in each section
  • Global filters work — both sections update
  • Clicking a top customer opens detail
  • Mobile responsive (sidebar becomes a drawer)
  • Loading state appears on refresh
  • A founder outside the room would understand it in 30 seconds
Publish

Lovable → Publish → choose a temporary subdomain (something like company-mvp.lovable.app). Share with the team straight from the link.

Deliverable

Public URL, validated, the whole team can access it.

10
Station 10 · 15 min

Evolving into a Mini ERP

Go back into the same Lovable conversation (with the entire MVP context already loaded). The app stops being just visualization and becomes an operational layer.

Prompt · Evolve into ERP (paste into Lovable)
The dashboard MVP is approved. Now let's evolve this SAME application into a
lean ERP. Reuse ALL the architecture, connections, and Lovable Cloud tables
already created — don't recreate anything.

Add 3 new modules to the sidebar (below Sales and Finance):

1. SALES OPERATIONS
   - "New Order" screen: form with customer (autocomplete from the existing
     Customers table) + product line items + automatic subtotal/discount/total/margin
     calculation
   - Orders list with filter by status (Draft / Invoiced / Cancelled)
   - "Invoice" button changes status and writes to Lovable Cloud
   - Each rep only sees their own orders

2. INVENTORY
   - Table SKU · description · current balance · reorder point · status (green/orange/red)
   - SKUs below the reorder point in red with a "Suggest purchase" button
   - The suggestion groups by supplier and creates a draft PO

3. OPERATIONAL FINANCE
   - Accounts Receivable screen: list with color-coded aging (current / 30 / 60 / 90 / 90+)
   - "Reminder" button opens a modal with ready-to-send copy
   - Semi-automatic reconciliation (upload OFX/CSV → tries to match against open items)

REUSE:
- Lovable Cloud tables already created for the dashboards
- Same Google authentication
- Same palette + typography
- Add new tables ONLY for what doesn't exist yet

Hand back the app running with the 3 new modules visible in the sidebar.
Don't touch the original Sales and Finance sections — they stay as
read-only dashboards. The new modules are the operational layer.
The final sidebar
┌─────────────────────────┐
│  DASHBOARD              │
│   · Sales (read-only)   │
│   · Finance (read-only) │
├─────────────────────────┤
│  OPERATIONS             │
│   · Orders              │
│   · Inventory           │
│   · Collections         │
└─────────────────────────┘
Deliverable

The dashboard just became a lean ERP. You've shown that you can build the company's operating system in 90 minutes of conversation.

11
Station 11 · 5 min

Wrap-up

Without a clear call to action, founders walk out excited and do nothing on Monday.

3 things to take home
  1. 1. The openacademy QR — open material so you can review this class on your own time
  2. 2. Personal list filled out right now: which real spreadsheet of mine am I uploading this week? · which pending decision am I going to ask the AI to help with? · which dashboard would make a difference for my team next week?
  3. 3. Next step: 7 days → run this framework with your spreadsheet · 14 days → share a screenshot of the MVP
Closing question

Which of those 3 things is leaving here with you tomorrow?

If nobody answers, the class failed.

Time distribution
Block Time Cumul.
01 Organizing the Data 4min 4min
02 Connecting Drive 8min 12min
03 Building a Skill via Skill Creator 8min 20min
04 Strategic KPI Prompt 5min 25min
05 Reading the Output 15min 40min
06 Lovable Architecture Prompt 5min 45min
07 Connecting Lovable to the Spreadsheets 10min 55min
08 Building the MVP 15min 70min
09 Validating the MVP 5min 75min
10 Evolving into a Mini ERP 15min 90min
11 Wrap-up 5min 95min
Buffer + questions 25min 120min
Total 2h 120min