Site icon JD Bots

n8n Tutorial — Part 5: Forms: Collect Data with n8n Forms

Card titled Collect Data with n8n Forms, labelled n8n Tutorial Part 5 Forms, showing three form icons and a table linked in a row, with the notes Three pages, one form, Dropdown, number, checkboxes, radio, and Saved, then You’re booked.

An n8n form is a web page that n8n builds for you: people fill it in, and each answer starts your workflow. You need no website and no form service. Part 2 made a one-page form; real forms often need more than one page.

In this part you build a sign-up form for a bookshop’s author evening, on three pages: who you are, your booking, and two last questions. You use new kinds of fields (a dropdown, a number, checkboxes and radio buttons), add pages with the n8n Form node, save every answer in one data table, and finish with a page that greets each visitor by name.

This is Part 5 of the n8n Tutorial. The parts in Module B, Workflow Basics:

All parts of the n8n Tutorial

Module A: Start Here

Module B: Workflow Basics

Module C: Working with Data

  • Part 9: Items and JSON: How Data Moves in n8n
  • Part 10: Expressions: Use Data from Earlier Nodes
  • Part 11: Transform Data
  • Part 12: Filter and Compare Data
  • Part 13: Dates and Times
  • Part 14: Files: CSV, Excel and PDF
  • Part 15: Data Tables: Store Data Inside n8n

Module D: Flow Logic

  • Part 16: If and Switch: Make Decisions
  • Part 17: Merge: Combine Branches
  • Part 18: Loops and Batches
  • Part 19: Wait and Human Approval
  • Part 20: Sub-workflows
  • Part 21: Error Handling

Module E: Code and APIs

  • Part 22: HTTP Request: Call Any API
  • Part 23: The Code Node in JavaScript
  • Part 24: The Code Node in Python

Module F: AI with Claude

  • Part 25: Your First AI Agent
  • Part 26: Give Your Agent Tools
  • Part 27: Memory That Lasts
  • Part 28: Answer from Your Documents
  • Part 29: AI Chains: Summarize, Classify and Extract
  • Part 30: Human in the Loop and Guardrails
  • Part 31: MCP in n8n
  • Part 32: Evaluations: Test Your AI Workflows
  • Part 33: Free Local AI with the Self-Hosted AI Starter Kit
  • Part 34: An n8n Agent in Microsoft Teams

Module G: Connect Apps and Extend n8n

  • Part 35: Connect Popular Apps with OAuth2
  • Part 36: Community Nodes
  • Part 37: Build Your Own Node
  • Part 38: Programmatic Nodes and Publishing
  • Part 39: The n8n API and CLI
  • Part 40: Build Workflows in Code with the Workflow SDK

Module H: Self-Hosting for Production

  • Part 41: Configure n8n with Environment Variables
  • Part 42: Run n8n on PostgreSQL
  • Part 43: Queue Mode and Workers
  • Part 44: Task Runners and Security
  • Part 45: Back Up, Restore and Update n8n
  • Part 46: Logs, Metrics and Tracing
  • Part 47: Put n8n Online with HTTPS

Module I: Users and Administration

  • Part 48: Users, Roles and Two-Factor Authentication

Module J: n8n Cloud

  • Part 49: Start an n8n Cloud Free Trial
  • Part 50: AI Workflow Builder, Assistant and Gateway Credits

Module K: Wrap-up

  • Part 51: Final Project, Cheat Sheet and What to Learn Next

Cost: free. Everything here runs on your own n8n Community Edition.

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

Get the Source Code

Get the complete source code of Event Sign-up Form for n8n on Dewiride Store →
It’s the finished, tested version of this part’s sign-up form, with a seat check, one booking per email and session, ending pages that fit phones, a one-click table setup and n8n in Docker.

What You’ll Build

A three-page sign-up form at the address /form/author-evening. Page one asks for a name and an email, page two for the evening and the number of seats, and page three for the topics a visitor likes and how they heard about the evening. Each sign-up becomes a row in a data table named Sign-ups, and the last page says You’re booked! with the visitor’s name, evening and seats. You start from n8n running on your computer.

Prerequisites

Step 1: Create the Sign-ups Table

Create a data table named Sign-ups with six columns: name, email, evening, topics and heard_from of type string, and seats of type number. How to Create a Data Table in n8n shows each click. You pick the type as you add each column:

Choose number for the seats column.

Step 2: Build the First Page

Create a new workflow named Author evening sign-up, click Add first step and choose On form submission, the n8n Form Trigger you met in Part 2. It builds the first page of the form.

Type Author Evening Sign-up in Form Title and one sentence in Form Description. Then click Add Form Element twice: Name of type Text Input and Email of type Email, each with Add Attributes › Required Field turned on:

Page one: the title, the description and the first field.

The Element Type list holds every kind of field a form can have, from short text and email to dropdowns, numbers, radio buttons and file uploads. The next pages use four of them:

Some of the field types a form can have.

Under Options, click Add option twice. Set Button Label to Next, because more pages follow, and Form Path to author-evening, so the form’s address ends in /form/author-evening instead of a long random code. The yellow note already points to the next step:

The button says Next, and the address ends in author-evening.

Step 3: Add a Second Page with the Form Node

Close the node and click + on the right of it. Search for n8n Form and choose Next Form Page. The other action, Form Ending, closes a form; Step 7 uses it.

The n8n Form node adds a page or ends the form.

The new node is one more page of the same form. Add a field named Which evening? of type Dropdown. Type Thursday 3 December in the first Option, click Add Field Option for Friday 4 December, and make the field required:

Page two asks which evening.

Add a second field, How many seats?, of type Number. Use Add Attributes for a Default Value of 1 and Required Field. Under Options, set Form Title to Your booking and Button Label to Next:

A number field with a default of 1.

Close the node, select it and press F2 to rename it Your booking. Clear node names matter here, because later steps read the answers by the name of their page.

Step 4: Add a Third Page

Add another n8n Form › Next Form Page after Your booking. Its first field is What would you like to hear about? of type Checkboxes, with three Checkbox Label values: How the book was written, The characters and Getting published. Visitors can tick any number of them, or none:

Checkboxes let visitors tick several answers.

The second field is How did you hear about the evening? of type Radio Buttons, with the choices In the shop, Instagram, A friend and Our newsletter, required. Radio buttons allow exactly one answer. Set Form Title to Last questions and Button Label to Book my seats:

Radio buttons allow one answer.

Rename the node Last questions. The workflow now has three pages in a row:

Three pages in a row.

Step 5: Test the Three Pages

Click Execute workflow at the bottom of the canvas. n8n opens the test version of your form in a new tab. Fill in the first page and click Next; this part used a fictional visitor, Asha Rao:

Page one in the browser.

The second page is the Your booking node:

Page two.

And the third is Last questions. Click Book my seats:

Page three.

For now n8n ends the form with its own Form Submitted page. Back in n8n, open any page’s node: each one passes on only its own answers, plus submittedAt and formMode. The ticked checkboxes arrive as a list, such as ["How the book was written", "The characters"].

Step 6: Save Every Answer in the Table

Close the node, click + after Last questions and add a Data table node with the Insert row action. Choose Sign-ups and keep Map Each Column Manually. The six columns appear under Values to insert.

The INPUT panel on the left lists all three pages; click a page’s name to see its answers. Drag each answer onto its column: Name and Email from On form submission, Which evening? and How many seats? from Your booking, and the two last answers from Last questions. n8n writes an expression for each, such as {{ $('Your booking').item.json['Which evening?'] }}: “the answer to Which evening? on the Your booking page”.

The checkbox answers need one change. They arrive as a list, and a data table column holds a single value, so n8n would stop with unexpected array input. Click into the topics expression and add .join(', ') before the closing }}, which turns the list into one line of text with a comma between the choices:

topics (Expression)

{{ $json['What would you like to hear about?'].join(', ') }}

Fixed: unexpected array input in row 0 (n8n Data Table) shows the error and why it happens. Each column now shows the answer it will save:

Every column reads an answer from one of the pages.

Rename the node Save the sign-up.

Step 7: End the Form with a Confirmation Page

Add one more n8n Form node after Save the sign-up, and choose Form Ending this time. Keep On n8n Form Submission at Show Completion Screen and type You’re booked! in Completion Title. Then hover over Completion Message, click Expression and paste:

Completion Message (Expression)

Thanks, {{ $('On form submission').item.json.Name }}. See you on {{ $('Your booking').item.json['Which evening?'] }}. Seats booked: {{ $('Your booking').item.json['How many seats?'] }}.

Each {{ }} reads an answer from an earlier page, just like the columns in Step 6. Below the box, n8n previews the message with the answers from a test run:

The last page greets the visitor by name.

Because the ending comes after Save the sign-up, a visitor sees it only once their answers are saved. Rename the node Confirmation. To send people to a page of your own instead, choose Redirect to URL and type its address; How to Redirect After an n8n Form Submission explains redirects.

On a phone, n8n’s ending page can run past the edge of the screen; Fixed: n8n Form Ending Page Cut Off on Mobile shows the CSS that makes it fit.

Step 8: Run the Whole Form

Click Execute workflow again and go through the three pages. The last page now greets the visitor:

The confirmation after the last page.

Back in n8n, all five nodes are green:

Five nodes, one run.

Step 9: Publish and Share the Form

The test version works only while the editor waits for it. Publish the workflow, then open On form submission and click Production URL. That address is the one to share:

The address to share once the workflow is published.

Open it in your browser and sign up once more. The published form has no “test version” banner, and every sign-up becomes a row in Sign-ups, test runs included:

Every sign-up is a row.

Clean Up

Unpublish the workflow so the form stops taking sign-ups, then archive and delete it from its ⋯ menu. Delete the Sign-ups table from the Data tables tab, as the data table guide shows. Deleting either can’t be undone.

Common Mistakes

MistakeWhat happensDo this instead
Adding a second On form submission trigger for page twoYou get two separate forms, each with its own addressAdd pages with n8n Form › Next Form Page
Saving the checkbox answer as it isThe Data table node stops with unexpected array inputAdd .join(', ') to the expression
Leaving Form Path emptyThe address ends in a long random codeSet Form Path to a short name before you share the form

Troubleshooting

ProblemCauseFix
unexpected array input '["The characters","Getting published"]' in row 0A column receives the checkbox listAdd .join(', ') to that column’s expression
The form ends on Form Submitted instead of your pageThe workflow has no Form EndingAdd n8n Form › Form Ending as the last node
The INPUT panel shows no answers to dragThe form hasn’t run yetRun it once with Execute workflow (Step 5)

FAQ

Can a form show different pages depending on an answer?

Yes. Put an If or Switch node between two pages, and give each branch its own pages. n8n’s Form node docs explain forms with branches, and a later part of this tutorial covers If and Switch.

Can I fill in some answers for my visitors?

Yes, with query parameters in the form’s address, such as ?Email=…. How to Pre-fill an n8n Form with Query Parameters shows how.

Can I hide “Form automated with n8n” at the bottom?

Yes. Add the option Append n8n Attribution to the trigger and turn it off, as n8n’s Form Trigger docs describe.

Can people outside my computer use this form?

Not at a localhost address, which always means the visitor’s own computer. A form for the public needs n8n at a public address, which a later part of this tutorial covers.

Conclusion

A Form Trigger starts the form, each Next Form Page adds a page, and a Form Ending closes it. Each page passes on its own answers, and any later node can read them by the page’s name. That is all a sign-up, booking or survey form needs: pages of questions, a save step, and a clear last page.

← Part 4: Webhooks: Start a Workflow from Any App

Coming next: Part 6: Credentials: Connect n8n to Your Apps.

Additional Resources

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

Exit mobile version