ModulesLabQuizAll courses

Automation Basics with n8n

Build and switch on a working automation that takes a form submission, records it in a sheet, branches on a condition and sends a confirmation email.

Module 5 of 14 · Day 3 · Session 5 · AI Administrator: Agentic Workflows & Automation

Module 05 ~50 min read + lab No code

What you will learn

Prerequisites: Module 4: Workflow Mapping II. Before the session, create an n8n cloud trial account (or ask your instructor for the self-hosted address) and have a Google account with Sheets and Gmail.

1. What an automation platform is

An automation platform is a visual editor where you connect boxes. Each box, called a node, talks to one application or does one operation on data. You draw the process from Module 4 as a chain of nodes, and the platform runs it every time the trigger fires. No code, but real logic: branches, loops, retries and error handling.

PlatformStrengthsWatch out forCost model
n8nVisual, powerful branching, built-in AI Agent node, can be self-hosted so data stays with youSlightly more technical vocabularyCloud plans per execution; self-hosted community edition is free
MakeVery visual, large connector library, good for marketing and opsOperations-based pricing adds up on busy flowsPer operation
ZapierSimplest to start, the widest app coverageLinear flows; branching costs morePer task
Power AutomateNative to Microsoft 365, approvals built in, IT-friendly governanceWeaker outside Microsoft appsIncluded in many Microsoft 365 plans

This course uses n8n because it covers plain automation, AI steps and full agents in one tool, and because it can run inside your organisation. Everything you learn transfers: a trigger is a trigger in Zapier, a node is a "module" in Make and an "action" in Power Automate.

2. Triggers, actions and the flow of data

Every workflow starts with exactly one trigger: the event the platform listens for. Everything after it is an action.

Event triggers

Something happened: a form was submitted, an email arrived, a row was added, a message was posted. The workflow runs once per event.

Schedule triggers

Every Monday at 08:00, every 15 minutes, first of the month. The workflow runs whether or not anything changed, so it usually starts by fetching data.

Manual triggers

Someone clicks Run. Useful for testing, and for tasks a person deliberately starts, such as "generate this month's report".

Webhook triggers

Another system sends the data directly. This is how apps without a native connector still start a workflow.

Items and fields

Data moves between nodes as items. One form submission is one item; a sheet with 40 rows fetched by a schedule is 40 items. Each item has fields: name, email, amount. Every node after the trigger runs once per item, and you refer to a field by picking it from the previous node's output. n8n calls this an expression; you never type it by hand, you drag it in.

The one habit that prevents most bugs

After adding any node, run it once and read its output panel. If the field you need is not there, or has a different name, fix that before adding the next node. Ninety per cent of broken workflows are a field name that changed two nodes back.

3. Conditions, branches and error paths

The IF node splits the flow into a true and a false branch based on a condition you build from a field, an operator and a value: amount is greater than 500; department equals Finance; email is empty. The Switch node does the same with several outputs, one per value.

The Edit Fields node (called Set in older versions) renames fields, fixes formats, or adds a fixed value such as a status. Use it whenever the next application wants slightly different names from the one before.

Error paths

Every application call can fail: the sheet is not shared, the email address is malformed, the service is down. By default n8n stops the run and records an error. Two settings turn that into a designed behaviour:

  • Retry on fail on a node: try again after a delay, up to a set number of times. Right for temporary outages.
  • Error workflow on the whole workflow: a separate small workflow that runs when any node fails and, for example, posts to a Slack channel or emails you the run link. This is the beginning of the monitoring you will formalise in Module 12.

Silent success is the real enemy

A failed run you hear about is fine. A run that "succeeds" with an empty field and emails a customer "Dear ," is not. Put an IF node that checks required fields are present before any step that leaves the building.

4. Credentials and testing

To act on your behalf in Gmail or Sheets, a node needs a credential: a stored, encrypted permission you grant once by signing in. Three rules:

Test, then activate

A new workflow is inactive: it only runs when you press Test workflow, and in that mode a form trigger gives you a test URL. Submit the form yourself, watch each node light up, and open the output of each one. When every node shows the data you expect, switch the workflow to Active. The trigger now gets its production URL and listens permanently. Every run, successful or not, is kept in Executions, which is your first audit log.

5. Reading a workflow like a map

Compare the workflow you are about to build with the future-state map from Module 4. The form is the trigger you wrote above your SIPOC. The Google Sheets node is the REKEY step you deleted from the human lane. The IF node is a rule-based decision; it was green on your map. The Gmail node is the DRAFT step, for now with fixed text; in Module 6 an AI step will write it. The whole thing lives in the Automation lane.

That correspondence is not a coincidence. A good map is the workflow design. When a map and a workflow disagree, one of them is wrong, and it is usually the map that is out of date. Keep both, and update the map when you change the workflow.

Practical lab

You will build the classic first automation: a request form whose submissions are logged to a Google Sheet and acknowledged by email, with a branch that flags large requests. It uses four node types you will reuse in every later module. Node names below are as they appear in n8n's node search.

1

Prepare the sheet

In Google Sheets create Requests with the header row: Timestamp, Name, Email, Department, Amount, Description, Status. Share it with the Google account you will connect to n8n.

2

Create the workflow and the trigger

In n8n click Add workflow, name it M5 Request intake. Add the first node: search for n8n Form Trigger. Give the form a title and add fields: Name (text), Email (email), Department (dropdown: Finance, HR, IT, Operations), Amount (number), Description (textarea). Click Test step, open the test form URL, submit a sample request, and read the output panel: you should see one item with your five fields.

3

Log the row

Add a Google Sheets node, operation Append row. Create a Google credential when prompted (sign in, allow access). Select your spreadsheet and sheet, then map each column by dragging fields from the form output into the matching column. For Status type the fixed value New. Test the step and confirm a row appears in the sheet.

4

Branch on amount

Add an IF node after Sheets. Condition: drag in Amount, choose Number > is greater than, value 500. Test it with two submissions, one above and one below 500, and check which output each item leaves by.

5

Two confirmation emails

On the true branch add a Gmail node, operation Send. To: drag the Email field. Subject: Request received - needs approval. Body: write plain text and drag in Name and Amount, for example:

Hello {Name}, We have received your request for {Amount}. Because it is above 500 it will be reviewed by a manager before processing. We will confirm within two working days. Regards, Operations

On the false branch add a second Gmail node with a "Request received - being processed" message. Create the Gmail credential when prompted.

6

Guard against empty fields

Insert an IF node directly after the Form Trigger that checks Email is not empty and Amount is not empty. Connect its true output to the Sheets node. On the false output add an Edit Fields node that sets Status to Incomplete, then a Sheets append so the incomplete request is still logged. Nothing leaves the building from that branch.

7

Add retry and an error notification

Open each Gmail node's Settings tab and switch on Retry On Fail (3 tries, 5 seconds). Then create a second workflow called Error notifier with an Error Trigger node followed by a Gmail node that sends you the failed workflow's name and execution link. Back in the main workflow's settings, select it as the Error workflow.

8

Test end to end, then activate

Submit three test requests: complete and small, complete and large, and one with a missing amount. Check the sheet has three rows with the right statuses and that you received two emails. Toggle the workflow to Active, copy the production form URL, and open Executions to see your three runs.

Deliverable

A screenshot of the active workflow canvas, the production form URL, the Requests sheet showing the three test rows, and one screenshot of the Executions list.

Knowledge check

Pick one answer per question, then check your score. These mirror the style of the final exam.

1. How many triggers does a workflow have?

Why: Every workflow starts with one trigger; everything after it is an action. A second event needs a second workflow or a different trigger type.

2. A schedule trigger fetches 40 rows from a sheet. How many times does the next node run?

Why: Data flows as items and each following node runs once per item, so 40 rows means 40 executions of the next node.

3. What is the single most effective habit for avoiding broken workflows?

Why: Most failures are a field that is missing or renamed a few nodes back. Checking each node's output catches it immediately.

4. Which credential practice is correct?

Why: Credentials should be least-privilege, owned by a shared or service account, and never live in node fields or notes.

5. What is the purpose of an Error workflow?

Why: The error workflow turns a silent failure into a notification, which is the first step of monitoring.

Self-check

Answer in your own words first, then open the model answer.

1. Map each node in the lab to a step or tag on your Module 4 future-state map.

Form Trigger = the trigger; Sheets append = the removed REKEY step; IF on amount = a green rule-based decision; Gmail = the DRAFT step with fixed text for now; the empty-field IF = a guard that did not exist before and should be added to the map.

2. Why put an IF that checks required fields before the email node rather than after it?

Because sending is irreversible. A guard before the step that leaves the organisation prevents 'Dear ,' emails; a check afterwards can only report the damage.

3. What would you change to move this workflow from Gmail and Sheets to Microsoft 365?

Swap the Gmail node for Microsoft Outlook and the Google Sheets node for Microsoft Excel 365 or SharePoint; the trigger, IF logic, data mapping and error handling stay identical.

Summary

Key takeaways

  • A workflow is one trigger followed by actions; data flows as items with fields, one node run per item.
  • n8n, Make, Zapier and Power Automate share the same concepts; n8n covers automation, AI steps and agents in one tool.
  • IF and Switch nodes are your rule-based decisions; Edit Fields reshapes data between apps.
  • Guard required fields before any irreversible step, set retries, and connect an Error workflow.
  • Credentials are least-privilege and live only in the credential store; test every node's output, then activate.

Further reading: n8n for intelligent workflows · CI/CD pipelines (DevOps Lab, Module 9) · n8n documentation