IOLEBA

 IOLEBA N8N Textbook – Table of Contents

N8N Workbook 2

n8n Practice Workbook - Week 2 - Part 1

🛠️ Practice Workbook - Part 1

n8n Core Skills - Week 2 (Chapters 6-10)
Originally Published: November 2025

Welcome to Week 2 Practice!

You've completed the foundational concepts and now it's time to master core skills. This workbook provides hands-on exercises for Chapters 6-10, focusing on advanced nodes, databases, authentication, webhooks, and error handling.

Week 2 Focus Areas:
  • Advanced node types and custom logic
  • Database integrations (SQL & NoSQL)
  • API authentication methods
  • Real-time webhook workflows
  • Production-ready error handling

Skills Assessment

Before Starting Exercises:
Skill Ready?
Write JavaScript in Function/Code nodes
Connect to MySQL or PostgreSQL database
Perform CRUD operations on databases
Configure API key authentication
Set up OAuth 2.0 credentials
Create webhook endpoints
Implement error handling with Continue On Fail

Exercise 1: Custom Data Processor (Function Node)

Goal: Advanced Data Transformation

Skills Practiced: Function nodes, JavaScript, data manipulation

Scenario: You receive customer orders and need to calculate complex pricing with regional taxes, discounts, and shipping.

Requirements:

  1. Manual Trigger with sample order data
  2. Function Node to calculate:
    • Base price × quantity
    • Apply discount (10% if qty greater than 5, 20% if qty greater than 20)
    • Add regional tax (8% CA, 5% TX, 0% other)
    • Add shipping ($5.99 if subtotal less than $50, else free)
    • Calculate savings vs regular price
  3. Output formatted price breakdown
💡 Solution Approach:

Use Function Node JavaScript to calculate discount based on quantity, apply regional tax rates, add shipping fees, and return detailed price breakdown with subtotal, discount, tax, shipping, total, and savings.

Exercise 2: Database-Driven Order System

Goal: Full CRUD Operations

Skills Practiced: MySQL/PostgreSQL, database operations, data validation

Setup Database Table:

Create orders table with columns: id (primary key auto increment), customer_email, product_name, quantity, total_price, status, and created_at timestamp.

Build Workflow:

  1. Webhook Trigger: Receive new order
  2. MySQL Node: Check if customer exists (SELECT)
  3. IF Node: First-time customer?
    • True: Apply 15% welcome discount
    • False: Standard pricing
  4. MySQL Node: Insert order (INSERT)
  5. MySQL Node: Update order count for customer
  6. Respond to Webhook: Return order confirmation
💡 Key SQL Operations:

Check customer: SELECT COUNT from orders WHERE customer_email equals input email

Insert order: INSERT INTO orders with customer email, product, quantity, total, and pending status

Recent orders: SELECT from orders WHERE created_at within last 7 days ORDER BY created_at DESC

Exercise 3: Multi-Auth API Integration

Goal: Master Different Authentication Types

Skills Practiced: API authentication, OAuth, API keys, Bearer tokens

Challenge: Build a workflow that integrates 3 different services, each using different auth methods.

Services to Integrate:

  1. Weather API (API Key):
    • Sign up at OpenWeatherMap
    • Get free API key
    • Fetch weather for customer's location
  2. Google Sheets (OAuth 2.0):
    • Set up Google Cloud credentials
    • Configure OAuth in n8n
    • Read/write customer data
  3. Custom API (Bearer Token):
    • Use any API with token auth (or create test endpoint)
    • Include Authorization: Bearer TOKEN header

Workflow Structure:

  1. Schedule Trigger (daily)
  2. HTTP Request (API Key): Get weather data
  3. Google Sheets (OAuth): Read customer list
  4. HTTP Request (Bearer): Post to analytics API
  5. Google Sheets (OAuth): Update with results

Continue to Part 2

Part 2 covers: Webhook Systems, Error Handling, Bonus Challenge, Completion Checklist, and Resources

n8n Textbook - Practice Workbook | Week 2 Part 1: Exercises 1-3

© 2025 IOLEBA | Dr. Marcus Lee

n8n Practice Workbook - Week 2 - Part 2

🛠️ Practice Workbook - Part 2

n8n Core Skills - Week 2 (Chapters 6-10)
Originally Published: November 2025

Exercise 4: Production Webhook System

Goal: Real-Time Event Processing

Skills Practiced: Webhooks, signature verification, async processing

Scenario: Build a form submission handler that processes data in real-time.

Requirements:

  1. Webhook Trigger: POST endpoint
  2. Signature Verification:
    • Verify webhook came from trusted source
    • Use Crypto node to validate signature
  3. Data Validation:
    • Check all required fields present
    • Validate email format
    • Sanitize input data
  4. Parallel Processing:
    • Path A: Store in database
    • Path B: Send confirmation email
    • Path C: Notify team on Slack
  5. Response: Quick acknowledgment (less than 3 seconds)
  6. Error Handling: Log failures, retry if needed
Webhook Testing with cURL:

Use cURL to POST to your webhook URL with Content-Type application/json header, X-Signature header, and JSON data containing name, email, and message fields.

Exercise 5: Comprehensive Error Handling System

Goal: Production-Ready Reliability

Skills Practiced: Error workflows, retry logic, monitoring, logging

Build Two Workflows:

Workflow 1: Main Processing (with errors)

  1. Webhook receives customer data
  2. HTTP Request to external API (Continue On Fail: true, Retry: 3)
  3. IF Node: Check for errors
  4. MySQL: Store result (might fail due to connection issues)
  5. Email: Send confirmation (might fail due to rate limits)

Workflow 2: Error Handler

  1. Error Trigger (monitors Workflow 1)
  2. Parse error details
  3. Categorize severity:
    • Critical: Payment, customer-facing operations
    • High: Data loss risk
    • Medium: Retry-able issues
    • Low: Warning conditions
  4. Route by severity:
    • Critical: SMS alert + Slack + Create ticket
    • High: Slack notification
    • Medium: Log to sheet
    • Low: Log only
  5. Store in error log database
💡 Error Categorization Logic:

In Error Workflow Function Node, check node name and error message to assign severity levels. Payment and Charge nodes are critical. Database nodes are high severity. Timeout and rate limit errors are medium severity. Default is low severity.

Bonus Challenge: End-to-End System

Goal: Combine All Week 2 Skills

Build a Complete E-Commerce Order Processing System:

  1. Webhook: Receive order from Shopify/WooCommerce
  2. Authentication: Verify webhook signature
  3. Database: Check inventory availability
  4. Function Node: Calculate pricing with discounts/tax
  5. IF Node: Stock available?
    • Yes: Continue
    • No: Send out-of-stock notification, stop
  6. Database: Create order record
  7. Database: Update inventory
  8. OAuth API: Send confirmation via Gmail
  9. Webhook: Notify warehouse system
  10. Slack: Alert fulfillment team
  11. Error Handling: Log and alert on any failures
  12. Response: Return order confirmation
Success Criteria:
  • Complete order processing in less than 5 seconds
  • Handle 100+ orders per hour
  • 99.9% success rate
  • All errors logged and alerted
  • Database remains consistent

Completion Checklist

🎓 Week 2 Mastery Checklist:
Skill Completed
Write custom JavaScript in Function nodes
Perform all CRUD operations on databases
Connect to both SQL and NoSQL databases
Implement 3+ different authentication types
Build production webhooks with signature verification
Create error workflows with categorization
Implement retry logic with exponential backoff
Build monitoring and alerting systems

All checked? You're ready for Week 3: Advanced Techniques!

Additional Resources

  • n8n Documentation: docs.n8n.io
  • n8n Community: community.n8n.io
  • SQL Tutorial: w3schools.com/sql
  • JavaScript Guide: developer.mozilla.org/JavaScript
  • IOLEBA Forum: Launches January 15, 2026

What's Next?

Week 3 Preview (Chapters 11-15):

  • Complex data transformations
  • Advanced API integration patterns
  • Authentication and security deep dive
  • Scheduling strategies
  • Performance optimization
Before Week 3:
  • Complete all Week 2 exercises
  • Take Self-Evaluation Quiz (coming soon)
  • Build at least one production workflow
  • Join IOLEBA community discussions
  • Consider upgrading to IOLEBA membership ($44.95/year) for premium tools and templates

📥 Download This Workbook

Save for offline practice. Your browser's print dialog will open - select "Save as PDF" as the destination

n8n Textbook - Practice Workbook | Week 2 Part 2: Exercises 4-5 + Bonus

© 2025 IOLEBA | Dr. Marcus Lee

Originally Published: November 2025 | Join IOLEBA: $44.95/year