This afternoon · Team B · Kgoda: the manager decides on every trip outside the policy

On this page

Today, you play the traveller's manager. Your system does the routine work. You decide on the trips outside the travel policy.

your page shows · n8n runs the steps · Langflow thinks · you decide

What happens to a trip request

  1. A traveller asks for a trip. On your page, they fill in the form Ask for a trip, in their own words.
  2. n8n takes the request. Your page sends it to a Webhook in n8n.
  3. Langflow reads it. The flow Read Trip Request (Kgoda) finds origin, destination, dates, cabin class and budget.
  4. n8n checks the trip against each rule of the travel policy, for example: booked at least 7 days ahead. The rules are fixed: n8n does not guess.
  5. n8n saves the trip as a new row in the Data table WS2.12 - Kgoda - Trips:
    • within the policy: ready to book.
    • outside the policy: it waits for you.
  6. Your page shows the trips, each with the rules it breaks. It gets them from n8n. A trip within the policy shows in green, without buttons: nobody needs to decide on it.
  7. You decide on a waiting trip: Approve or Reject, with a short note. Your page sends your click to n8n.
  8. The result: n8n writes your decision into the row: approved or rejected, by whom, when, and why. The templates stop here: nothing is booked, and no mail goes out. What could come next? See Ideas in section 3.

New to n8n? Four words

You built most of your work in Langflow. These n8n words you need today:

1 · Set up the templates

The templates are a ready-made version of this system: a Langflow flow, two n8n workflows, a Data table and your page.

Before you start, check that you have this from the homework:

All files you need are in your folder ws2_s2 from this morning (ws2_s2.zip).

  1. Langflow: open your project WS2 - Mail Assistant (Enron). Drag the file ws2_read_trip_request_kgoda.json from the folder ws2_s2/langflow onto its list of flows, as in the homework. In Langflow, it is called Read Trip Request (Kgoda).

  2. n8n, Data table: make one table, as in Session 1:

    1. In n8n, click Overview at the top left, then the tab Data tables. Click Create data table.

    2. Data table name: paste this name. Use it exactly: the workflows look for it by name.

      WS2.12 - Kgoda - Trips
      
    3. Pick Import CSV. Drop the file ws2_12_kgoda_trips.csv from the folder ws2_s2/data into the box.

    4. Turn on My CSV file contains a header row. Click Create.

  3. n8n, workflows: import these two from the folder ws2_s2/n8n:

    • ws2_12_kgoda_trip_request.json
    • ws2_12_kgoda_trip_queue.json

    Does a node show a warning sign? Double-click it and pick the credential Langflow (Run API).

  4. n8n, switch on: publish both workflows: in each, click Publish at the top. In the window that opens, click Publish again. Without this, your page gets no answer from n8n.

  5. Your page: copy the file kgoda_trips.html into the folder claude/site of kingo-pod.

    1. Open a new terminal window: on Windows, the app Ubuntu from the Start menu; on a Mac, Cmd+N in the Terminal. In it, run this line. It opens the folder claude/site in a window. On Windows:

      cd ~/kingo-pod && mkdir -p claude/site && cd claude/site && explorer.exe .
      

      On a Mac:

      cd ~/kingo-pod && mkdir -p claude/site && open claude/site
      
    2. Drag the file kgoda_trips.html from your folder ws2_s2/pages into that window.

  6. Open your page: http://localhost:8080/kgoda_trips.html. Does the browser say that it cannot connect? Then the web server from this morning has stopped. Start it again in your second terminal window (on Windows: the app Ubuntu from the Start menu, not PowerShell), then reload the page:

    cd ~/kingo-pod && python3 -m http.server 8080 --bind 127.0.0.1 --directory claude/site
    
  7. At the top of your page, type your name into the box Your name. The page saves it with every decision.

Your system is set up: your page says "No trip waits", and shows no red error message. Your page already talks to n8n. The test in section 2 checks the rest: Langflow and the workflows.

2 · Understand the templates

  1. Start Claude Code in the terminal. Is it still running from this morning? Then skip this line.

    cd ~/kingo-pod && ./kingo claude
    
  2. Send this to Claude Code:

    Look at our n8n workflows "WS2.12 - Kgoda - Trip Request" and "WS2.12 - Kgoda - Trip Queue".
    In five short lines: what happens to a trip request, and where does a person decide?
    Change nothing.
    
  3. Try it with a request. In the form Ask for a trip on your page, type a traveller's name and any e-mail address: nothing is sent to it. Paste this request, then click Send request:

    Please book me business class from Seoul to Paris, leaving the day after tomorrow, for ten days. Trade fair. Budget 9,000 USD.
    

    The trip waits on your page. It lists every policy rule that the trip breaks.

  4. Decide, as the manager. Type a short note (why), then click Approve or Reject. The trip moves to the tab Decided, with your name and your note.

You decided on your first trip, with all the facts on one page. Your system did the routine work: it read the request and checked every rule. The manager did one thing: decide.

Who does what? For each step: Langflow, n8n, or a person on your page?

Step Who
Takes the request from the form on your page n8n
Finds origin, destination and dates in the request Langflow
Checks the trip against the travel policy n8n
Saves the trip in the Data table n8n
Approves or rejects a trip outside the policy A person, on your page
Why

n8n takes the request from your page (a Webhook) and follows fixed rules: it checks the policy the same way every time. Langflow reads the traveller's own words. Where the policy says no, the manager decides.

3 · Change the templates for your team

Why these tools?

You can split the work differently. Some rules need judgement, for example "Is the purpose of the trip a business reason?" A fixed rule cannot check that well. For such a rule, let Langflow judge and write a note on your page. The manager still decides.

Now make the templates fit your team's process. Claude Code changes copies of your workflows and flows, and the originals keep running. You test a copy. Then you switch to it, as in block 3 this morning: Claude Code tells you how.

Copy this request into Claude Code, but do not press Enter yet. Claude Code shows a long paste as one short line: that is fine. Type after it what is different in your team: a rule, a field, a step, or who decides. For example: A trip above 5,000 USD also needs the finance director. Then press Enter.

Our project is Kgoda Travel. Change copies of our workflows and flows, one step at a time.
Before each change, show me what you will change. Then tell me how to test a copy, and how to
switch from the original to the copy. We publish ourselves.
Our process differs from the templates like this:

Ideas, if you need one. The first two go on where the templates stop:

Agentic AI in Business · Workshop II · Frank Huettner · SKK GSB.