← 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

GitHub Copilot Options

1. Copilot (Free for Individuals)

2. Copilot Business

3. Copilot Enterprise

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 CaseBest Choice
IDE autocompleteCopilot
Terminal code helpClaude Code
Workflow automationClaude API
Complex reasoningClaude
Fast autocompleteCopilot

The Power Combo

Here's how to use ALL of them:

  1. n8n — Workflow automation hub
  2. Claude API — Business logic, content generation
  3. Claude Code — Terminal tasks, debugging
  4. 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:

  1. Start with Claude API in n8n (Lesson 3)
  2. Try Claude Code for terminal work
  3. 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 →