Claude Code is the most powerful AI coding agent available, and it's especially useful for GTM engineering - building enrichment pipelines, automating outbound, cleaning CRM data, and creating custom sales tools. But getting started can feel intimidating if you're not a developer.
This guide walks you through setup from zero to your first working automation. No engineering background required.
What You Need Before Starting
- A computer with a terminal - Mac (Terminal), Windows (PowerShell or WSL), or Linux
- Node.js installed - Claude Code runs on Node.js. If you don't have it, install it from nodejs.org (download the LTS version)
- An Anthropic account - Sign up at anthropic.com if you haven't already
- A text editor - VS Code is recommended but any editor works
That's it. You don't need to know how to code. Claude Code writes the code for you.
Step 1: Install Claude Code
Open your terminal and run:
`` npm install -g @anthropic-ai/claude-code ``
This installs Claude Code globally on your machine. You only need to do this once.
Verify the installation:
`` claude --version ``
You should see a version number. If you get an error, make sure Node.js is installed correctly by running node --version (you need version 18 or higher).
Step 2: Authenticate
Run:
`` claude login ``
This opens a browser window where you'll sign in with your Anthropic account. Once authenticated, Claude Code is connected to the Claude API and ready to use.
Step 3: Create a Project Directory
Claude Code works best within a project directory. Create one for your GTM work:
`` mkdir ~/gtm-automations cd ~/gtm-automations ``
Initialize it as a project:
`` npm init -y ``
This creates a package.json file that tracks any dependencies your automations need.
Step 4: Create Your CLAUDE.md File
The CLAUDE.md file is your project's instruction manual for Claude Code. It reads this file automatically and uses it as context for everything it does.
Create the file and add your GTM context:
```markdown
GTM Automations
About
This project contains sales and marketing automation scripts.
Stack
- CRM: HubSpot
- Enrichment: Apollo, Clay
- Email: Instantly
- Language: JavaScript/Node.js
Conventions
- Store API keys in .env file (never commit to git)
- Log results to console for verification
- Add error handling for API rate limits
```
Customize this based on your actual tools. The more context you provide, the better Claude Code performs.
Step 5: Set Up Your Environment Variables
Create a .env file to store API keys securely:
`` HUBSPOT_API_KEY=your-hubspot-key APOLLO_API_KEY=your-apollo-key ``
Then create a .gitignore file to make sure your keys never get committed:
`` .env node_modules/ ``
Step 6: Start Claude Code
From your project directory, simply run:
`` claude ``
Claude Code starts in interactive mode. You'll see a prompt where you can type natural language instructions. It will read your CLAUDE.md and understand your project context.
Your First Automation: Enrich a Lead List
Let's build something useful. Say you have a CSV file of companies you want to prospect. Here's how to turn that into an enriched lead list.
Create a sample CSV
First, create a sample data file. You can ask Claude Code to do this:
`` Create a sample CSV file at data/companies.csv with 10 B2B SaaS companies - include company name and domain columns ``
Claude Code will create the file with realistic sample data.
Build the enrichment script
Now tell Claude Code what you want:
`` Build a script that reads data/companies.csv, looks up each company in Apollo to find the VP of Sales or CRO, and outputs an enriched CSV at data/enriched-leads.csv with company, domain, contact name, title, email, and LinkedIn URL. Use the Apollo API key from .env. ``
Claude Code will:
- Plan the implementation
- Install necessary npm packages (like
csv-parserandaxios) - Write the script with proper error handling
- Handle API authentication and rate limiting
Run and verify
Claude Code can run the script for you, or you can run it manually:
`` node scripts/enrich-companies.js ``
Check the output file to verify the results. If something needs adjustment, tell Claude Code:
`` The output is missing phone numbers. Add phone number lookup to the enrichment script. ``
It will update the code accordingly.
Common GTM Automations to Build Next
Once you're comfortable with the basics, here are high-impact automations to build:
CRM Cleanup Script
`` Build a script that connects to HubSpot, finds all contacts with missing company names, looks up the company from their email domain, and updates the HubSpot record. ``
Lead Scoring Calculator
`` Build a lead scoring script. Read contacts from a CSV. Score each on: company size (1-10 scale), relevant industry (+20 points), VP+ title (+15 points), US-based (+10 points). Output a scored CSV sorted by score descending. ``
Email Sequence Generator
`` Take the enriched leads CSV and generate personalized 3-email sequences for each lead. Email 1: reference their company's recent growth. Email 2: share a relevant case study. Email 3: direct ask for a meeting. Output as a CSV ready to import into Instantly. ``
Weekly Pipeline Report
`` Connect to HubSpot and generate a weekly pipeline report. Show: total pipeline value, deals created this week, deals that moved stages, stale deals (no activity in 14+ days), and close rate by source. Format as an HTML email. ``
Tips for Non-Technical Users
Think in Inputs and Outputs
When describing tasks to Claude Code, be clear about:
- What goes in: "A CSV file with company names and domains"
- What comes out: "An enriched CSV with contact names, emails, and titles"
- What tools to use: "Use the Apollo API for enrichment"
Start Simple, Then Add Complexity
Build the basic version first. Get it working. Then add features:
- "Build a basic enrichment script"
- "Now add email validation"
- "Now add a fallback to Clearbit when Apollo doesn't have data"
- "Now schedule it to run every Monday"
Save Your Prompts
When you find a prompt that produces great results, save it. Create a prompts/ folder in your project and store your best instructions as text files. This becomes your GTM automation playbook.
Use Claude Code for Debugging
When something doesn't work, paste the error message into Claude Code:
`` I'm getting this error when running the enrichment script: [paste error]. Fix it. ``
It will read the error, understand the context, and fix the issue.
Working With Claude Code in VS Code
If you prefer a visual editor, Claude Code integrates with VS Code:
- Install the Claude Code VS Code extension
- Open your project folder in VS Code
- Use the Claude Code panel to interact with the agent
- See code changes in real-time in the editor
This gives you the best of both worlds - Claude Code's autonomous capabilities with VS Code's visual editing experience.
Security Best Practices
Protect Your API Keys
- Always use
.envfiles for API keys - Never hardcode keys in scripts
- Add
.envto.gitignore - Use separate API keys for development and production
Review Before Executing
Claude Code will ask for permission before running commands or making changes. Always review what it's about to do, especially when:
- Connecting to production systems (CRM, email platforms)
- Sending emails or messages
- Modifying or deleting data
- Installing new packages
Use Test Data First
Before running any automation against your real CRM or prospect list, test with sample data. Build and verify the workflow with 5-10 test records before scaling to your full list.
Key Takeaways
- Claude Code installs in one command and requires no coding experience to use
- Set up a project directory with a CLAUDE.md file that describes your GTM stack and conventions
- Store API keys in .env files, never in code
- Describe automations in plain English - be specific about inputs, outputs, and tools
- Start with simple automations (enrichment, CRM cleanup) and build complexity over time
- Always test with sample data before running against production systems
Claude Code turns any GTM professional into a GTM engineer. The barrier to building custom automations has dropped from "hire a developer" to "describe what you want." If you can articulate the workflow, Claude Code can build it.