Your first automation
Automation is useful when a small, repeated decision is already clear. Someone submits a request; the same six details should become a record you can inspect. Instead of copying them by hand, a workflow can do that transfer consistently.
In this book, you will make one small n8n workflow:
Form Trigger -> Edit Fields -> Convert to File (CSV)
It uses invented records only. Each submitted form creates its own one-row CSV file. You will compare two files with two different inputs, reject one incomplete form safely, cause one intentional failed execution, recover, and leave the workflow off.
This is not an AI exercise. The workflow does not guess, summarize, or fill gaps. It copies six named values only when they are present.
What this tool is
n8n is a workflow tool. A workflow is a connected sequence of steps. One step notices an event, later steps transform or send the information from that event.
For this exercise, the event is a form submission. The workflow has four plain-language parts:
| Part | In this exercise | What it means |
|---|---|---|
| Trigger | Form Trigger | The event that starts the workflow: a submitted form. |
| Input | Six fields submitted in that form | The information the workflow receives. |
| Action | Edit Fields, then Convert to File | The work the workflow performs: keep and map the six values, then make CSV data. |
| Output | A one-row CSV in binary field data | The inspectable result of that one execution. |
Think of a lab's small intake routine. A colleague submits a synthetic equipment request. Its ID, item name, owner, category, status, and event time must be recorded without someone retyping them. The workflow is not deciding whether the request is good. It is making a predictable file from exactly what the form supplied.
A workflow execution is one trip through the connected steps. Submit the form once, and that is one execution. Submit it again with different values, and that is another execution with another one-row file. The two rows do not collect into one growing CSV in this workflow.
Use an approved n8n test workspace. Do not enter personal data, production requests, passwords, access tokens, or unpublished research data. The workflow is deliberately narrow so you can inspect every input and output yourself.
Meet the interface
Open your approved n8n test workspace in its normal browser interface. The exact labels and placement can vary by n8n version, but this exercise uses the workflow canvas and three nodes:
- Form Trigger, where you define the fields and obtain a test form URL.
- Edit Fields, sometimes documented as the Set node, where you map incoming values.
- Convert to File, where you choose CSV and a filename.
The canvas is the central area where nodes are connected. Selecting a node opens its configuration panel. An execution view, when available for your workspace and its save settings, lets you inspect the data that reached each node. Do not assume that a previous run will be retained: some workspaces do not save manual executions or clear them according to their own settings. You can always inspect the current test execution while you run it.
Screenshot placeholder SC-01: n8n workflow canvas with three connected nodes Intended view: the reader can identify Form Trigger, Edit Fields, and Convert to File connected left to right. Caption: A form submission enters the workflow, six fields are mapped, and a CSV file is produced. Reference: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.formtrigger/ (opens in a new tab) Status: not captured; placeholder only.
Do not enable or publish this workflow for this lesson. A test URL and manual test execution are enough. The visible active/inactive control can differ by release, so use the state shown by your own workspace rather than relying on a screenshot or a remembered location.
Install and connect
This book does not ask you to install software or connect a real service. You need access to an approved n8n test workspace in a browser. If you do not have that access, ask your lab, course, or organisation for its intended test workspace and permissions.
AI Lab is the approved starting point for availability and local setup information: https://ai.32dots.de/ (opens in a new tab). Its portal content can change, so this book does not reproduce its catalog or click path. Once you have an approved workspace, return here and work only with synthetic form records.
Before creating anything, check these conditions in the browser:
- You are in a test workspace, not a production workspace.
- You can create a new workflow or use a blank draft workflow provided by your instructor.
- The workflow is inactive or unpublished.
- You will use only the six invented fields and records printed below.
If your workspace asks for credentials while adding one of these built-in nodes, stop and ask the workspace owner. This exercise should not require a connection to a spreadsheet, email account, cloud drive, or other external service.
Your first useful result
Your first useful result is a CSV file that you can open as text and compare with the form submission that made it. Create a new blank workflow in the n8n browser app. Give it a clear test-only name, such as T05-L01 synthetic request CSV. Do not replace an existing workflow.
Add a Form Trigger node to the new canvas. In that node's form-field area, create these six fields. Use these names exactly, including underscores and lowercase letters:
item_id
item_name
owner
category
status
event_time
Set the type of every field to Text (or your version's equivalent text input type) and mark every field as required. Text keeps event_time as the literal timestamp text you submit, rather than asking the form to reinterpret it. The field labels shown to a form user may be friendlier, but the field names must remain the six names above. A field name becomes an input key that later expressions can read.
Configure the Form Trigger to respond when the form is submitted. Use its Test URL for this lesson, not a public or production URL. Do not start an execution or open the Test URL yet: first finish configuring and save the whole three-node workflow below. Keep the n8n editor open later so you can inspect the current execution after submitting.
Screenshot placeholder SC-02: Form Trigger configuration with six required synthetic fields and a Test URL Intended view: the reader can find the required-field settings and distinguish the test form URL from a live workflow URL. Caption: The form accepts exactly six required input values for this exercise. Reference: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.formtrigger/ (opens in a new tab) Status: not captured; placeholder only.
Add an Edit Fields node to the right of Form Trigger and connect the Form Trigger output to it. In Edit Fields, select Manual Mapping. Create six output fields with the same names and set every mapped value type to String (or your version's equivalent string type). For each value, use an expression that reads the incoming form field, rather than typing an example value. This keeps event_time as literal text through the mapping.
Use the expression editor in the Edit Fields node. The following expressions show the intended mapping syntax:
| Output field | Expression |
|---|---|
item_id | {{$json.item_id}} |
item_name | {{$json.item_name}} |
owner | {{$json.owner}} |
category | {{$json.category}} |
status | {{$json.status}} |
event_time | {{$json.event_time}} |
Turn on Keep Only Set Fields. This makes the node's result easy to inspect: it should contain the six mapped fields, not unrelated trigger metadata. Do not set fixed substitutes such as received, a sample person, or a fixed date. If an incoming value is absent, the correct response is to stop and correct the form, not to invent data.
Add a Convert to File node to the right of Edit Fields and connect them. Configure it as follows:
| Setting | Value |
|---|---|
| Operation | Convert to CSV |
| Binary output field | data |
| Header Row | enabled |
| File name | synthetic-request.csv |
The output file has the same filename for each run, but each run holds a separate one-row CSV. A filename is not evidence that rows were combined. You will inspect each execution separately.
Screenshot placeholder SC-03: Edit Fields manual mappings and Convert to File CSV settings Intended view: the reader can see expressions, Keep Only Set Fields, output field
data, and the CSV filename setting. Caption: Every CSV column comes from an incoming form field; no example value is typed into the mapping. Reference: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.converttofile/ (opens in a new tab) Status: not captured; placeholder only.
Your canvas should now read from left to right:
Form Trigger -> Edit Fields -> Convert to File
Save the draft if your workspace provides a save control, but leave it inactive and unpublished. Saving a draft preserves your work; activation would allow the workflow to respond outside this supervised test.
Work step by step
Run 1: submit the first synthetic request
Now start a test execution using the Form Trigger's available Execute Workflow control. With that execution waiting, open its Test URL in a separate browser tab or window and enter this first record. These values are synthetic.
| Form field | Record 1 value |
|---|---|
item_id | SYN-201 |
item_name | inventory note |
owner | Mira Demo |
category | lab |
status | received |
event_time | 2026-09-07T09:15:00Z |
Submit the form. Expected result: the waiting test execution proceeds through all three nodes. In the execution display, select Edit Fields and check that its data contains exactly the six field names and the six values above. This is the point where you verify that the mapping copied the form input rather than a fixed example.
Then select Convert to File. Its result should expose binary output in field data. Depending on your n8n version, there may be an inspection or download affordance for that binary data. Use the affordance available in your interface to inspect the current CSV, then download and retain it locally as synthetic-request-run-1.csv. Its location is version-sensitive, so do not search for a button label that is not present. If your workspace provides no permitted binary inspection or download, the exercise is blocked: ask the workspace owner for permitted access and do not claim success by copying the expected CSV text below.
The expected file contents are:
item_id,item_name,owner,category,status,event_time
SYN-201,inventory note,Mira Demo,lab,received,2026-09-07T09:15:00Z
Compare each output column with the table you submitted:
| CSV column | Why this value is correct |
|---|---|
item_id | It is the submitted SYN-201, read by {{$json.item_id}}. |
item_name | It is the submitted inventory note, read by {{$json.item_name}}. |
owner | It is the submitted Mira Demo, read by {{$json.owner}}. |
category | It is the submitted lab, read by {{$json.category}}. |
status | It is the submitted received, read by {{$json.status}}. |
event_time | It is the submitted 2026-09-07T09:15:00Z, read by {{$json.event_time}}. |
If any value differs, do not correct the CSV by hand. Return to Edit Fields in the n8n browser app, correct that field's expression, and start a new test execution. The mapping is the source of the result.
Run 2: prove that the next input is independent
Before starting Run 2, confirm that the inspected Run 1 download is retained locally as synthetic-request-run-1.csv. Start a new test execution in Form Trigger. Do not reuse the previous form submission or edit the first CSV. Open the Test URL again and submit this second, distinct record:
| Form field | Record 2 value |
|---|---|
item_id | SYN-202 |
item_name | calibration log |
owner | Rowan Demo |
category | equipment |
status | queued |
event_time | 2026-09-07T10:30:00Z |
Inspect Edit Fields for this current execution first. It should show SYN-202, calibration log, Rowan Demo, equipment, queued, and 2026-09-07T10:30:00Z. If you see values from Run 1, stop. Check that you started a new execution and that each mapping is an expression, not a typed constant.
Inspect the data binary output for this execution, then download and retain it locally as synthetic-request-run-2.csv. Do not overwrite synthetic-request-run-1.csv. If binary inspection or download is unavailable, the exercise is blocked until the workspace owner supplies permitted access; do not create either artifact by copying the expected text. The independently expected CSV is:
item_id,item_name,owner,category,status,event_time
SYN-202,calibration log,Rowan Demo,equipment,queued,2026-09-07T10:30:00Z
Make this second comparison one field at a time:
| CSV column | Record 2 source |
|---|---|
item_id | SYN-202 from the second form submission |
item_name | calibration log from the second form submission |
owner | Rowan Demo from the second form submission |
category | equipment from the second form submission |
status | queued from the second form submission |
event_time | 2026-09-07T10:30:00Z from the second form submission |
You now have evidence for the central automation rule: the output changes because the input changes. Compare the retained synthetic-request-run-1.csv and synthetic-request-run-2.csv; each has one row corresponding to its own submitted record. The workflow did not reuse Run 1's values, and it did not add Run 2 below Run 1 in a shared file. Each form submission made a separate one-row CSV output, originally named synthetic-request.csv by the workflow.
Reject a missing field before execution
Required fields protect the beginning of the workflow. Start a new Form Trigger test execution. In the test form, leave one required field empty, for example owner, and try to submit.
Expected result: the form rejects the incomplete submission before the workflow executes. This is useful because a six-column record without an owner would be incomplete. Fill in the missing field with a synthetic value, or discard the attempt and begin another test.
This is not the failed-run test. A required-field rejection happens in the form before any n8n execution reaches Edit Fields or Convert to File. It therefore cannot demonstrate what a workflow error looks like.
Create one genuine failed run safely
After both successful runs, return to the workflow canvas. You will temporarily add a node that deliberately ends an execution with an error. This lets you recognize a real workflow failure without touching another system.
- In the n8n browser app, disconnect Convert to File from Edit Fields. You are changing the draft workflow only; leave Convert to File disconnected for this failure test.
- Add a Stop And Error node after Edit Fields.
- Connect
Edit Fields -> Stop And Erroronly. Stop And Error is terminal and has no onward connection. - In Stop And Error, choose Error Message and enter this exact text:
Intentional synthetic failure - T05-L01 test only
- Start a new Form Trigger test execution and submit any complete synthetic six-field record. You may use Record 2 again because this is a failure test, not evidence of a new mapping.
Expected result: the execution reaches Stop And Error, reports the chosen error message, and does not create a CSV at Convert to File. Inspect the current execution's failure state and message. If your workspace saves execution history, you may also find it there; do not assume history is retained when manual execution saving is not configured.
Screenshot placeholder SC-04: current execution stopped at Stop And Error Intended view: the reader can identify the deliberate error message and see that Convert to File did not run. Caption: An intentional, synthetic failure is different from a form refusing an incomplete submission. Reference: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.stopanderror/ (opens in a new tab) Status: not captured; placeholder only.
Recover and retest
Do not leave the failure node in the workflow. On the canvas, remove the temporary Stop And Error node, then reconnect Edit Fields directly to Convert to File. Check all six Edit Fields expressions again against this table:
item_id {{$json.item_id}}
item_name {{$json.item_name}}
owner {{$json.owner}}
category {{$json.category}}
status {{$json.status}}
event_time {{$json.event_time}}
Keep Keep Only Set Fields enabled. Start a fresh test execution and submit Record 1 again. Inspect the current output data and compare it with the earlier expected Record 1 CSV. Expected result: it succeeds and contains the six Record 1 values, proving that the workflow recovered after the temporary failure configuration was removed.
Find the off switch
The safe final state for this lesson is an unpublished or inactive workflow. Locate the workflow's active/inactive state in your n8n interface and confirm it is off. If you saved the workflow, saving is fine; do not activate it. If you used a shared instructor-provided draft, ask before changing its state or deleting it.
Stopping is part of automation, not an emergency-only action. You should be able to answer three questions before enabling any future workflow:
- What starts it?
- What output will it create or change?
- Where do I turn it off?
For this workflow, the answers are: a submitted form starts it; it creates one inspectable CSV output for that execution; its active state remains off in the test workspace.
Solve common problems
| Symptom | Likely cause | Safe recovery |
|---|---|---|
| The test form will not submit. | A required field is blank. | Fill every required field with synthetic data. This is a form rejection, not a workflow failure. |
| Edit Fields shows an example value for every run. | A fixed value was entered instead of an expression. | Replace the fixed value with the matching {{$json.field_name}} expression and run a new test. |
| A CSV column is blank or wrong. | Its expression does not match the form field name. | Compare the six exact names in Form Trigger and Edit Fields, correct one mapping, then submit a new complete record. |
| The second output looks like the first. | The second form was not submitted as a new execution, or constants remain in Edit Fields. | Start a new test execution, submit Record 2, and inspect each expression. |
| You cannot find a previous execution. | Your workspace may not save manual executions or may have retention settings. | Start a new test and inspect the current execution. Ask the workspace owner about history settings if you need retained evidence. |
| No CSV appears after the intentional failure. | Stop And Error worked as designed. | Remove Stop And Error, reconnect Edit Fields directly to Convert to File, check mappings, and run a fresh success test. |
| The workflow appears ready to activate. | The draft has been saved but not yet turned on. | Leave it inactive for this lesson. Do not activate a workflow you have not reviewed with its owner. |
Check your result
Your exit artifact is two independently retained local files: synthetic-request-run-1.csv from the inspected Run 1 binary data output and synthetic-request-run-2.csv from the inspected Run 2 binary data output. They demonstrate correspondence to two separate submissions; they do not require two current executions to coexist. Do not upload them to a shared production location. If your workspace does not provide permitted binary inspection and download, the exercise is blocked until its owner supplies access; expected CSV text is not a substitute artifact.
Pass this check only when all statements are true:
- Your workflow canvas connects Form Trigger to Edit Fields to Convert to File.
- Form Trigger has all six exact required field names.
- Edit Fields uses Manual Mapping, six expressions, and Keep Only Set Fields.
- Convert to File is set to CSV with header row enabled, binary output
data, and filenamesynthetic-request.csv. synthetic-request-run-1.csvis the inspected Run 1 binary download and exactly matches the one-row Record 1 CSV shown in this book.synthetic-request-run-2.csvis the inspected Run 2 binary download and exactly matches the one-row Record 2 CSV shown in this book.- You can point to the form value that supplied every output column in both runs.
- You saw that an incomplete form was rejected before workflow execution.
- You created one temporary Stop And Error failure, saw that no CSV followed it, removed the node, and completed a new successful test.
- The workflow is inactive or unpublished.
For a newcomer-comprehension check, say this aloud in your own words: “A trigger starts the workflow. The form submission is my input. Edit Fields and Convert to File are actions. The one-row CSV in data is my output. If a required value is missing, the form stops it before the workflow. If an action fails, I inspect the current execution, correct the workflow, test again, and leave it off until it is safe to use.”
If you can say that and verify both CSVs, you have built a real first automation: small enough to understand, strict enough not to invent data, and safe enough to stop.
Sources and limitations
This manuscript is based on a bounded source packet checked by Luna against four official n8n documentation pages:
- Form Trigger (opens in a new tab) for Test URLs, required fields, and submitted-form behavior.
- Edit Fields (Set) (opens in a new tab) for manual mapping and retaining only set fields.
- Convert to File (opens in a new tab) for CSV conversion, header rows, the binary output field, and filenames.
- Stop And Error (opens in a new tab) for intentionally ending a test execution with an error message.
No live n8n or browser execution was performed while writing this manuscript. The two form records, their expected CSVs, and the failure message are synthetic examples, not observed run evidence. Interface labels, binary-data inspection controls, execution-history retention, and active-state locations can vary by n8n version and workspace configuration; this book identifies the required configuration rather than inventing a universal button location.
The workflow produces a per-execution CSV output. It does not store rows in a database, append them to a shared spreadsheet, notify a person, validate whether a request is appropriate, or make decisions. Those are separate capabilities that need their own review before use. AI is intentionally not included here; it belongs after you can inspect a predictable non-AI workflow.
All screenshot references above are placeholders only. No screenshots were captured, reused, or licensed for this draft.