What You'll Need n8n Cloud or self-hosted n8n for workflow orchestration Hetzner VPS or Contabo VPS for hosting your Node.js bot Namecheap if you need a domain for webhooks Node.js 18+ installed locally A Google/YouTube developer account with API credentials FFmpeg installed (for video processing) Basic understanding of OAuth2 flow Table of Contents Understanding the YouTube Upload Workflow Setting Up Google OAuth2 Credentials Building the Core Node.js Bot Handling OAuth2 Token Refresh Implementing Video Upload Logic Deploying and Monitoring Getting Started Understanding the YouTube Upload Workflow I've built dozens of YouTube automation workflows over the past three years, and the pattern is always the same: authenticate once, grab an access token, upload videos, refresh tokens before they expire. The tricky part isn't the code—it's understanding when and why OAuth2 needs refreshing, and handling edge cases like failed uploads or network timeouts.…