Using AI to Build AI: Leverage Claude Code, GPT Codex, and Gemini
How to use AI coding tools to build chatbots, write integration code, and solve technical problems without being a developer.
Using AI to Build AI: Leverage Claude Code, GPT Codex, and Gemini
You need a custom chatbot for client intake. Your billing system needs to talk to your practice management software. Your team keeps asking you to automate the same repetitive data tasks. The traditional answer: hire a developer, wait three months, pay $15,000+.
The new answer: use AI coding assistants to build it yourself in an afternoon.
This guide shows you exactly how to use three AI coding tools to solve real technical problems without a computer science degree. You'll learn which tool to use for what, how to write prompts that generate working code, and how to troubleshoot when things break.
What These Tools Actually Do
Claude (via claude.ai or API
GitHub Copilot
Google AI Studio (Gemini): Generates code with strong reasoning about system design, handles large codebases, excels at data transformation tasks. Best for: complex logic, data pipeline work, multi-step processes.
Note: "GPT Codex" is deprecated. OpenAI's current coding solution is GPT-4 via ChatGPT Plus or API, often accessed through GitHub Copilot
Building a Client Intake Chatbot with Claude
You want a chatbot that asks potential clients five qualifying questions, saves responses to a Google Sheet, and emails you when someone completes it.
Step 1: Write the System Prompt
Open claude.ai. Start a new conversation. Paste this exact prompt:
I need to build a web-based chatbot for law firm client intake. Requirements:
- Ask 5 questions in sequence: name, email, case type (dropdown: family/criminal/civil), brief description, preferred contact method
- Save responses to Google Sheets via API
- Send email notification to intake@firmname.com when complete
- Simple, mobile-friendly interface
- Host on free tier of Vercel or Netlify
Build this as a single HTML file with embedded JavaScript. Use Tailwind CDN for styling. Include detailed comments explaining each section. Provide the complete code and step-by-step deployment instructions.
Step 2: Review and Customize the Output
Claude will generate a complete HTML file (typically 200-300 lines). Look for these sections:
- HTML structure with form elements
- JavaScript for question flow logic
- APIintegration code for Google SheetsAPIClick to read the full definition in our AI & Automation Glossary.
- Email notification function
Critical customization points:
Replace YOUR_GOOGLE_SHEETS_API_KEY with your actual API
Replace YOUR_SHEET_ID with your Google Sheet ID (the long string in your sheet's URL).
Update the email address in the notification function.
Modify the questions array to match your actual intake questions.
Step 3: Test Locally
Save the code as intake-chatbot.html. Open it in Chrome. Fill out the form. Check your browser console (F12) for errors.
Common issues:
"CORS error" - You need to enable CORS in your Google Sheets API
"API
Form submits but nothing happens - Check the Network tab in browser dev tools to see the actual API
Step 4: Deploy to Vercel
Create a free Vercel account. Install Vercel CLI: npm i -g vercel. In your terminal, navigate to the folder containing your HTML file. Run vercel. Follow the prompts. Your chatbot is now live at your-project.vercel.app.
Real-world result: A managing partner at a 12-attorney firm built this exact chatbot in 4 hours. It now handles 60% of initial intake calls, saving 15 hours of admin time per week.
Writing Integration Code with GitHub Copilot CopilotClick to read the full definition in our AI & Automation Glossary.
Your firm uses Clio for practice management and QuickBooks for accounting. You need to sync time entries from Clio to QuickBooks every night.
Step 1: Set Up Your Environment
Install VS Code. Install the GitHub Copilotclio-quickbooks-sync.js.
Step 2: Write Comment-Driven Code
Type this comment at the top of your file:
// Fetch time entries from Clio API for yesterday
// Transform to QuickBooks format
// POST to QuickBooks API
// Log results to sync-log.txt
Press Enter. Copilot
Step 3: Fill in API APIClick to read the full definition in our AI & Automation Glossary. Credentials
CopilotCLIO_API_KEY. Create a .env file:
CLIO_API_KEY=your_actual_key_here
CLIO_CLIENT_ID=your_client_id
QUICKBOOKS_CLIENT_ID=your_qb_client_id
QUICKBOOKS_CLIENT_SECRET=your_qb_secret
Install dotenv: npm install dotenv. Add to top of your script: require('dotenv').config();
Step 4: Handle Authentication
Both Clio and QuickBooks use OAuth2. This is complex. Ask Copilot
Type: // Complete OAuth2 flow for Clio
Copilot
Step 5: Test with Sample Data
Before running against production:
Create a test time entry in Clio. Run your script: node clio-quickbooks-sync.js. Check QuickBooks for the synced entry. Review sync-log.txt for any errors.
Step 6: Schedule with Cron
On Mac/Linux, run crontab -e. Add: 0 2 * * * /usr/local/bin/node /path/to/clio-quickbooks-sync.js
This runs daily at 2 AM.
Real-world result: A 6-person accounting firm eliminated 3 hours of manual data entry per week. The script has run error-free for 8 months.
Solving Data Problems with Google AI Studio
You have 5,000 client records in a CSV. Each has an address field, but formatting is inconsistent. You need to split addresses into street, city, state, zip for import into your CRM
Step 1: Access Google AI Studio
Go to aistudio.google.com. Sign in with your Google account. Click "Create new prompt."
Step 2: Upload Sample Data
Click "Add file" and upload your CSV (or paste 10-20 sample rows). Write this prompt:
Analyze this CSV of client addresses. The "address" column contains full addresses in inconsistent formats.
Write a Python script that:
1. Reads the CSV
2. Uses regex and string parsing to extract street, city, state, zip from each address
3. Handles common variations (with/without apartment numbers, PO boxes, etc.)
4. Writes a new CSV with separate columns for each component
5. Logs any addresses it couldn't parse to errors.txt
Include error handling for malformed addresses. Add comments explaining the parsing logic.
Step 3: Refine the Output
Gemini will generate a complete Python script. Test it on your sample data:
Save as address-parser.py. Run: python address-parser.py input.csv output.csv. Check output.csv and errors.txt.
If parsing accuracy is low:
Go back to AI Studio. Add: "The script is missing apartment numbers. Update the regex to capture 'Apt', 'Unit', 'Suite', '#' followed by a number."
Gemini will revise the code.
Step 4: Handle Edge Cases
Review errors.txt. You'll find patterns the script missed. Common ones:
- International addresses (if you have them)
- Rural route addresses
- Military addresses (APO/FPO)
For each pattern, ask Gemini: "Add handling for rural route addresses in format 'RR 2 Box 123'."
Step 5: Run on Full Dataset
Once accuracy is above 95% on your sample:
Run on the full 5,000 records. Review the error log. Manually fix the 200-300 addresses that failed parsing (much better than fixing 5,000).
Real-world result: A consulting firm cleaned 12,000 contact records in 6 hours instead of the estimated 40 hours of manual work.
Troubleshooting When AI-Generated Code Fails
Error: "Module not found"
The AI assumed you have a library installed. Run npm install [library-name] or pip install [library-name].
Error: "Unexpected token"
Copy the error message and the surrounding 10 lines of code. Paste back into the AI: "I'm getting this error: [paste error]. Here's the code: [paste code]. Fix it."
Code runs but produces wrong output
Show the AI your input data and actual output: "This code should convert dates to MM/DD/YYYY format. Input: '2024-01-15'. Expected: '01/15/2024'. Actual: '15/01/2024'. Fix the date parsing logic."
API
Your API
Code works locally but fails in production
Environment variables aren't set. Check your hosting platform's environment variable settings (Vercel: Settings > Environment Variables, Heroku: Settings > Config Vars).
Which Tool for Which Job
Use Claude when:
- You need a complete application (chatbot, dashboard, automation script)
- You're starting from scratch with no existing code
- You need architectural advice ("Should this be a single script or microservices?")
Use GitHub Copilot
- You're actively writing code in an IDE
- You need to add features to existing code
- You want to learn coding patterns by seeing suggestions
Use Google AI Studio (Gemini) when:
- You're working with large datasets or complex data transformations
- You need multi-step reasoning ("First validate, then transform, then load")
- You're building data pipelines or ETL processes
The Prompt Formula That Works
Every effective coding prompt has four parts:
Context: "I'm building a client portal for a law firm."
Requirements: "Users need to upload documents, view case status, and message their attorney."
Constraints: "Must work on mobile, use free hosting, no user accounts (magic link login only)."
Format: "Provide complete code with comments, deployment steps, and a list of required API
Vague prompt: "Build me a client portal."
Effective prompt: "Build a client portal for a law firm where clients can upload documents (PDF/DOCX only, max 10MB), view their case status (pulled from Clio API
Bottom Line
You don't need to become a developer. You need to become good at describing problems precisely and testing solutions methodically.
Start with the chatbot project. It's the simplest and delivers immediate value. Once you've deployed one working application, you'll understand the pattern: describe what you want, customize the output, test thoroughly, deploy.
The firms winning with AI aren't hiring more developers. They're teaching their operations people to use AI coding tools. That's the actual competitive advantage.

Reviewed by Revenue Institute
This guide is actively maintained and reviewed by the implementation experts at Revenue Institute. As the creators of The AI Workforce Playbook, we test and deploy these exact frameworks for professional services firms scaling without new headcount.
Revenue Institute
Need help turning this guide into reality? Revenue Institute builds and implements the AI workforce for professional services firms.