Skip to content
Visual explainer 3h to learn 5 steps

Build a deterministic appointment request flow in n8n

Process sample appointment requests with manual and schedule triggers, a filter and an HTTP call to a local fixture.

By Invicly Tech, , in n8n, AI Automation and Voice Agents. About 9 minutes to read.

Topic 3 of 43

In short

A deterministic flow gives the same result every time for the same input. You start with a manual trigger so you control each run, add a schedule trigger for later, filter out incomplete requests and call a local fixture with the HTTP Request node. Pinned data lets you repeat a test without waiting for new input.

Explained simply

A deterministic workflow gives the same result whenever you give it the same input. That is what makes it testable. In this lesson you build one that handles appointment requests: it starts, checks each request, and sends the good ones to a local test service.

A trigger is the node that starts a workflow. The Manual Trigger starts when you press the Execute workflow button. The Schedule Trigger starts on a timer, such as every weekday at 09:00. While building, use the manual one so nothing runs by surprise.

The Filter node checks each item against conditions and keeps only the ones that pass. Here it keeps requests that have a name, an email and a slot. Incomplete ones are not passed on.

Then the HTTP Request node sends each good request to a fixture. A fixture is a small fake service on your own machine, so no real system is touched. Pinning a node's output saves that data, so you can test the next steps again and again.

Press Play on a diagram to walk through it one step at a time.

FlowThe first appointment request flow
  1. 1
    Manual Trigger

    Start by hand while building

  2. 2
    Sample requests

    Edit Fields or Code node with synthetic items

  3. 3
    Filter

    Keep only requests with name, email and slot

  4. 4
    HTTP Request

    POST to a local fixture on your machine

  5. 5
    Check output

    Count items and read the response status

SequenceOne test run, message by message
You
n8n workflow
Local fixture
  1. 1Click Execute workflow
    You to n8n workflow: Click Execute workflow
  2. 2Filter keeps 3 of 5 requests
    n8n workflow to n8n workflow: Filter keeps 3 of 5 requests
  3. 3POST each kept request
    n8n workflow to Local fixture: POST each kept request
  4. 4200 accepted
    Local fixture to n8n workflow: 200 accepted
  5. 5Execution shows 3 successes
    n8n workflow to You: Execution shows 3 successes

In depth

Manual and schedule triggers

Every workflow needs a trigger. A manual trigger is for development: click the button and the workflow runs once. A schedule trigger runs by itself once the workflow is activated. You choose an interval or a cron expression, and n8n uses the workflow time zone to decide when a time such as 09:00 happens.

In a lab, set the time zone in the environment and also check the workflow settings. A schedule that runs an hour late after a clock change is nearly always a time zone issue. Activate a schedule only when you want it to run, and deactivate it when you are done.

  • Manual trigger: you control each run
  • Schedule trigger: needs an active workflow
  • Set GENERIC_TIMEZONE and check workflow settings
  • Deactivate test schedules

Filtering incomplete requests

The Filter node has one or more conditions. Each condition checks a field, for example email is not empty. With several conditions you choose whether all must match or any. For this flow all three fields must be present.

Items that do not match are dropped from the Filter output. Because dropped items vanish quietly, check the counts: 5 in, 3 out means 2 were rejected. In later lessons you will send them to a review path instead of discarding them.

CompareFilter outcome for five synthetic requests
Kept (3)
  • Ada Test, all fields present
  • Cy Demo, all fields present
  • Di Fixture, all fields present
Dropped (2)
  • Bo Sample, email empty
  • Ed Mock, slot empty
  • Dropped items are not passed on

Calling a local fixture with HTTP Request

The HTTP Request node needs a method, a URL and, for POST, a body. Pick POST, enter the fixture URL and send the fields as JSON. When n8n runs in Docker, localhost means the container itself. To reach a service on your own computer use host.docker.internal on Docker Desktop, or put both on the same Compose network and use the service name.

The node returns the response as items. Check the status code and the body. A 2xx code means the fixture accepted the request. A 4xx or 5xx makes the node fail by default, and you can see the error in the execution data.

  • POST with a JSON body
  • host.docker.internal or a Compose service name, not localhost
  • Read statusCode and body in the output
  • Errors stop the run unless you change the setting

Pin data to repeat a test

Pinning saves the output of a node. When you run the workflow, n8n uses the pinned data in place of running that node. This means your trigger can supply the same five requests every time, and you can focus on the Filter and HTTP steps.

Pins are for development only. Activated, production runs ignore them. The risk is forgetting a pin: later edits to the source seem to have no effect. A pinned node shows a pin icon, so scan for it when results look stale.

Learn it in 5 short steps

About 35m each. Track them with a timer in your plan.

  1. 1
    Start from a manual trigger~35m
  2. 2
    Add a schedule trigger with a time zone~35m
  3. 3
    Filter out incomplete requests~35m
  4. 4
    Call a local fixture with HTTP Request~35m
  5. 5
    Pin data to repeat a test run~35m

Key points

  • A manual trigger is the safest way to start: nothing runs until you click Execute workflow.
  • The Schedule Trigger needs an explicit time zone, set on the workflow or the instance, so 09:00 means the 09:00 you expect.
  • The Filter node keeps items that pass its conditions. Items that fail are dropped from that output.
  • HTTP Request calls any URL. Against a local fixture it makes a repeatable test with no real service involved.
  • Pinning a node's output freezes that data so the same input feeds the rest of the workflow on every test run.

Key terms

Tap a card to flip it. 0/5 known

Examples

json
Filter (all conditions must match)
  {{ $json.name }}  is not empty
  {{ $json.email }} is not empty
  {{ $json.slot }}  is not empty

HTTP Request
  Method: POST
  URL:    http://host.docker.internal:8080/requests
  Body:   JSON  { "name": "{{ $json.name }}", "slot": "{{ $json.slot }}" }

Filter conditions and an HTTP Request set-up, as settings you would enter in the editor.

Build the flow in five steps

Step 1: add a Manual Trigger and an Edit Fields node that outputs five synthetic requests (use a Code node if you prefer). Step 2: add a Filter with three not-empty conditions. Step 3: add an HTTP Request that POSTs to the fixture. Step 4: run and confirm 3 items reach the HTTP node. Step 5: pin the first node's output and run again.

text
Manual Trigger -> Requests (5 items) -> Filter (3 kept)
  -> HTTP Request POST http://host.docker.internal:8080/requests
Expect: HTTP node shows 3 output items, each statusCode 200

Add a weekday schedule safely

To run the flow at 09:00 on weekdays, add a Schedule Trigger with a cron expression and make sure the time zone is set. Test it by changing the cron to the next minute, activating, watching the execution list, then deactivating. This confirms both the time and the zone.

text
Schedule Trigger
  Mode: Custom (Cron)   0 9 * * 1-5
  Workflow time zone: Europe/London
Test: set 12 14 * * * (next minute), activate, check Executions, deactivate

Quick reference

  • Manual Trigger runs on click. Schedule Trigger needs an active workflow.
  • Cron 0 9 * * 1-5 means 09:00 Monday to Friday.
  • Filter drops non-matching items; count items in and out.
  • From Docker, localhost is the container. Use host.docker.internal or a Compose service name.
  • Pin icon: output is frozen for tests only.
  • Check statusCode in HTTP Request output.
  • Deactivate test schedules when finished.

Common mistakes

  • Leaving a stale pin on a node and wondering why new test data is ignored.
  • Using localhost in the URL from inside Docker: that points at the container itself, not your computer.
  • Activating a schedule in a lab and forgetting it, so it keeps running every minute.

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1Why use a Manual Trigger while building?

Question 2

2A Filter receives 5 items and outputs 3. What happened to the other 2?

Question 3

3n8n in Docker must call a fixture on your computer. Which URL host is usually right on Docker Desktop?

Question 4

4You edited the trigger data but later nodes still see the old data. What is the likely cause?

0/4 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    Create a workflow with a Manual Trigger and an Edit Fields node that outputs three synthetic requests, then run it.

  2. Exercise 2medium

    Add a Filter so only requests with a non-empty email and slot continue, and prove the counts.

  3. Exercise 3hard

    POST the kept requests to a local fixture, pin the input, break the URL on purpose, read the error in the execution, then fix it.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

What is the difference between running a workflow and activating it?
Running executes it once by hand for testing. Activating turns on its triggers, so schedules and webhooks run by themselves.
Why did my schedule fire at the wrong hour?
Usually a time zone mismatch. Set the workflow time zone and the instance GENERIC_TIMEZONE.
Can I test without calling a real service?
Yes. Point HTTP Request at a local fixture or a mock service so tests are fast and safe.
What does deterministic mean here?
The same input always gives the same output, so a failing test means something changed.

Go deeper

ShareXLinkedInWhatsApp