Skip to main content
0 reactions

How to Pin Data in n8n

Card titled How to Pin Data in n8n, labelled n8n How-to Pinned Data, with a checklist: one real answer, pin data, Guests from 2 to 12, unpin when done.

Pinning tells an n8n node to keep its output and hand it on in every test run, instead of running again. It saves you from filling in a form, calling a webhook or asking an app for the same data over and over while you build a workflow.

This guide pins the answer from a small booking form, edits the pinned data to test a bigger booking without filling in the form again, and unpins it when the testing is done.

Every screen and output on this page is real, run with n8n 2 in Docker on macOS.

What You’ll Have

A workflow named Table booking with two nodes: a form with a Name and a Guests field, and an Edit Fields node that reads both. The form’s answer is pinned, so every test runs without the form opening.

Prerequisites

  • n8n running, signed in.

Step 1: Build a Small Form

Create a workflow named Table booking. Click Add first step, then On form submission. Set Form Title to Book a table, then add two form elements with Add Form Element: Name as a Text Input and Guests as a Number.

The Form Trigger settings with the Form Title Book a table and two form elements: Name as a Text Input and Guests as a Number.
A form with a Name and a Guests field.

Step 2: Send One Test Answer

Click Execute step. n8n opens the test form in a new tab. Fill it in, here with the name Asha Rao and 2 guests, and click Submit.

The test version of the Book a table form with empty Name and Guests fields and a Submit button.
The test form opens in a new tab.

Close the tab. Back in n8n, the form node’s OUTPUT panel shows the answer.

The form node OUTPUT in JSON view: Name Asha Rao, Guests 2, the submittedAt time and formMode test.
The answer from the test form.

Step 3: Pin the Output

Point at the pin icon at the top of the OUTPUT panel to read what it does, then click it.

The pin icon in the n8n OUTPUT panel with its tooltip: Pin data. Node will always output current data instead of executing. Doesn’t apply to production executions.
Pin data keeps this output for later tests.

A purple banner says the data is pinned for test executions.

A purple banner reading This data is pinned for test executions, with an Unpin link, above the form answer.
The answer is pinned.

Step 4: Run the Workflow on the Pinned Data

Close the panel and add an Edit Fields node after the form. Drag Name and Guests from the INPUT panel onto Drag input fields here, and click Execute step.

The Edit Fields node with Name as a String and Guests as a Number, mapped from the form, and an OUTPUT of Asha Rao and 2.
Edit Fields runs on the pinned answer.

Close the panel and click Execute workflow. This time no form opens: the form node hands on its pinned answer straight away, and its pin icon shows where the data came from.

The canvas after Execute workflow: the form node with a purple border and a pin icon, and Edit Fields with a green tick, each passing 1 item.
No form opened: the pinned answer was used.

Step 5: Edit the Pinned Data

To test a big booking without filling in the form again, open the form node and click the pencil icon at the top of the OUTPUT panel. Change "Guests": 2 to "Guests": 12 and click Save.

The Edit Output editor with the pinned JSON, where Guests now reads 12, and the Cancel and Save buttons.
Change Guests to 12 and save.

The data stays pinned, now with 12 guests.

The pinned output after saving: the purple banner and the answer with 12 guests.
Still pinned, now with 12 guests.

Close the panel. Edit Fields now shows a yellow triangle: its output is out of date, because the data before it changed.

The canvas after the edit: Edit Fields has a yellow border and a yellow triangle, showing its output is out of date.
Edit Fields is out of date until it runs again.

Click Execute workflow again and open Edit Fields. It now has 12 guests.

The Edit Fields OUTPUT after running again: Name Asha Rao and Guests 12.
The edited data reached Edit Fields.

Step 6: Unpin the Data

When you’re done testing, open the form node and click Unpin in the purple banner. The next test waits for a real form answer again. Until it runs, the form node shows the yellow triangle.

The canvas after unpinning: the form node has a yellow triangle and no pin, and Edit Fields has a green tick.
Unpinned: the next test waits for a real answer.

Clean Up

Table booking was only an example. Open its ⋯ menu and choose Archive, then open the ⋯ menu of the archived workflow and choose Delete. Deleting can’t be undone.

Common Mistakes

MistakeWhat happensDo this instead
Forgetting a node is pinnedThe node hands on the same old data in every test, even after the real data has changedLook for the pin icon on the canvas, and unpin when you’re done
Pinning to change what the published workflow doesNothing changes: production runs ignore pinned dataChange the node’s settings instead

FAQ

Does pinned data change my published workflow?

No. Pinned data is used only for test runs in the editor. When the published workflow runs, every node runs for real.

Can I pin any node?

Only nodes with a single main output, and not when the output includes a file (binary data), according to n8n’s docs.

Why does a node show a yellow triangle?

Its output is out of date. n8n marks a node this way when something before it changes, such as pinned data you edited or unpinned. Running it again clears the triangle.

Conclusion

Pin a node’s output once, and every test after that reuses it: no form to fill in and no call to wait for. Edit the pinned data to try another case, and unpin it when you’re done so your tests use real data again.

Additional Resources

n8n and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by n8n GmbH.

0 comments