Course/Chapter 6/1. Data Pinning Basics
    intermediate
    Chapter 6: Pinning & Testing Strategies

    1. Data Pinning Basics

    Lock node outputs for fast development iteration.

    12m Lesson 1 of 4

    Data pinning is one of n8n's most underused features. It lets you "freeze" a node's output so subsequent nodes use the pinned data instead of re-executing.

    Why Pin Data?

    • - Speed: No need to wait for API calls during development
    • - Consistency: Same data every time for predictable testing
    • - Cost: Avoid hitting API rate limits or incurring charges
    • - Offline: Continue developing without internet access

    How to Pin Data

    1. Execute a node normally so it produces output
    2. Click the pin icon (📌) in the node's output panel
    3. The node's output is now "frozen" — it won't re-execute
    4. Downstream nodes will use this pinned data

    Unpinning

    Click the pin icon again to unpin and allow the node to execute normally. Pinned nodes show a small pin indicator on the canvas.

    Code Examples

    Example Pinned Data (JSON)
    json
    // Pin this on a trigger node to simulate incoming data:
    [
      {
        "json": {
          "id": 1,
          "name": "Alice Johnson",
          "email": "alice@example.com",
          "plan": "pro",
          "created_at": "2025-01-15T10:30:00Z"
        }
      },
      {
        "json": {
          "id": 2,
          "name": "Bob Smith",
          "email": "bob@gmail.com",
          "plan": "free",
          "created_at": "2025-02-20T14:00:00Z"
        }
      }
    ]

    Pro Tips

    • 💡Pin data on your trigger node first — this is the most common bottleneck in testing
    • 💡Pinned data persists across page reloads, so your test setup survives browser refreshes
    • 💡You can pin data on multiple nodes simultaneously for complex workflows

    Comprehension Quiz

    Answer 2 of 2 correctly to unlock lesson completion.

    1. What does pinning data on a node do?

    2. Which node should you typically pin first?

    Pass the quiz above to unlock lesson completion