← Back to Home
Lesson 5
Codex & GitHub Copilot
What is Codex?
Codex is OpenAI's AI model that powers GitHub Copilot. It's designed specifically for code generation and understanding.
How It Works
- Trained on public code repositories
- Autocompletes as you type
- Explains code
- Generates new code from comments
GitHub Copilot Options
1. Copilot (Free for Individuals)
- VS Code, JetBrains, Neovim support
- $10/month or free with GitHub education
- Good for individual developers
2. Copilot Business
- Team management
- Policy controls
- $19/user/month
3. Copilot Enterprise
- Customization
- Internal knowledge
- $39/user/month
n8n Integration with Copilot
While Copilot is IDE-based, you can use the OpenAI API for workflow automation:
POST https://api.openai.com/v1/chat/completions
Headers:
Authorization: Bearer YOUR_API_KEY
Body:
{
"model": "gpt-4o",
"messages": [
{"role": "user", "content": "Write a Python function to send email"}
]
}
Claude vs Copilot: Which to Use?
| Use Case | Best Choice |
| IDE autocomplete | Copilot |
| Terminal code help | Claude Code |
| Workflow automation | Claude API |
| Complex reasoning | Claude |
| Fast autocomplete | Copilot |
The Power Combo
Here's how to use ALL of them:
- n8n — Workflow automation hub
- Claude API — Business logic, content generation
- Claude Code — Terminal tasks, debugging
- Copilot — IDE coding assistance
Example Pipeline:
[Copilot in VS Code] → Write initial code
[Claude Code] → Review and improve
[n8n + Claude API] → Test, deploy, monitor
Recommendation for You
Since you're building automation with n8n:
- Start with Claude API in n8n (Lesson 3)
- Try Claude Code for terminal work
- Add Copilot when doing development in an IDE
The API approach through n8n gives you the most control for workflow automation.
Next: Lesson 6: Useful Workflows →