This afternoon · Team A · KSMC: a sales engineer approves every quote
On this page
Today, you play the sales engineer. Your system does the routine work. You approve every quote before it leaves.
your page shows · n8n runs the steps · Langflow thinks · you decide
What happens to a mail that asks for a price
-
A customer asks for a price, by mail to your test Gmail account.
-
n8n picks up the mail and passes it to Langflow.
-
Langflow sorts and reads it. The flow Triage with Projects (Enron) gives the mail the action
quote_request. The flow Read Quote Request (KSMC) finds the part number, the quantity and what the customer needs. -
n8n calculates the price from your price tiers: a table with the price per unit for each range of quantities. It also checks fixed rules, for example: never below cost. n8n never guesses a price.
-
n8n saves the quote as a new row in the Data table
WS2.12 - KSMC - Quotes. The quote waits for you. -
Your page shows the quote. It gets the waiting quotes from n8n.
-
You decide: Approve and send, or Reject, with a short note. Your page sends your click to n8n.
-
The result:
- Approve and send: n8n sends the quote to the customer, as a reply to their mail.
- Reject: nothing is sent.
Either way, n8n writes your decision into the row: by whom, when, and why. The templates stop here. 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:
- Workflow: a chain of steps in n8n. Each step is a node. Like a flow in Langflow.
- Publish: switches a workflow on. A Langflow flow answers whenever someone calls it. An n8n workflow is different: it runs by itself only once you publish it. Then it waits for new mails, or for your page, all day. Unpublish switches it off. Changed a published workflow? Publish it again: n8n runs only the published version.
- Data table: a simple table inside n8n, like a spreadsheet. Workflows read and write its rows.
- Webhook: a node with a web address. It waits until your page sends something, as WS2.11 - Ask did for your page this morning.
1 · Set up the templates
The templates are a ready-made version of this system: two Langflow flows, three n8n workflows, two Data tables and your page.
Before you start, check that you have this from the homework:
- kingo-pod runs in mode
abp. - Your test Gmail account is connected.
- n8n has the credentials
Langflow (Run API),Mail (n8n_workshop_mail_n8n)andOpenRouter (chat).
All files you need are in your folder ws2_s2 from this morning (ws2_s2.zip).
-
Langflow: open your project
WS2 - Mail Assistant (Enron). Drag these two files from the folderws2_s2/langflowonto its list of flows, as in the homework:ws2_triage_with_projects_enron.json. In Langflow, it is called Triage with Projects (Enron): a copy of your flow Triage (Enron) that also knows the actionquote_request. Your own Triage (Enron) does not change.ws2_read_quote_request_ksmc.json. In Langflow, it is called Read Quote Request (KSMC).
-
n8n, Data tables: make two tables, as in Session 1. For each of them:
- In n8n, click Overview at the top left, then the tab Data tables. Click Create data table.
- Data table name: paste its name from below. Use it exactly: the workflows look for their tables by name.
- Pick Import CSV. Drop its file from the folder
ws2_s2/datainto the box. - Turn on My CSV file contains a header row. Click Create.
The first table, with the file
ws2_12_ksmc_quotes.csv:WS2.12 - KSMC - QuotesThe second, with the file
ws2_12_ksmc_price_tiers.csv:WS2.12 - KSMC - Price TiersThe price tiers hold three made-up rows, so that you can try the workflows.
-
n8n, workflows: import these three from the folder
ws2_s2/n8n:ws2_12_ksmc_quote_intake.jsonws2_12_ksmc_quote_queue.jsonws2_12_triage_new_mail_with_projects.json
Does a node with a credential show a warning sign? Double-click it and pick its credential: one of the three from Before you start. The three
submit_to_…nodes show a warning too: you fix them next.Then open WS2.12 - Triage New Mail with Projects. It hands each mail to the right workflow. After the import, it does not know your workflows yet. Change three of its nodes:
- Double-click
submit_to_quote_request_workflow. In the field Workflow, pick WS2.12 - KSMC - Quote Intake. - Double-click
submit_to_reply_with_approval. In the field Workflow, pick WS2.4 - Reply with Approval. submit_to_bid_workflowis for team C. Right-click it and click Deactivate.
-
n8n, switch on:
- Switch off the triage workflow of Session 1: open WS2.3 - Triage New Mail, or WS2.3 - Triage New Mail - SOLUTION if you published that one. Click the small arrow next to Publish at the top, then Unpublish. Why: only one triage workflow takes each new mail. The old one does not know quotes, so a request for a price would never reach your page.
- Switch on your three new workflows: in each, click Publish at the top. In the window that opens, click Publish again.
-
Your page: copy the file
ksmc_quotes.htmlinto the folderclaude/siteof kingo-pod.-
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/sitein 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 -
Drag the file
ksmc_quotes.htmlfrom your folderws2_s2/pagesinto that window.
-
-
Open your page: http://localhost:8080/ksmc_quotes.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 -
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 quote waits", and shows no red error message. Your page already talks to n8n. The test in section 2 checks the rest: your mail, Langflow and the workflows.
2 · Understand the templates
-
Start Claude Code in the terminal. Is it still running from this morning? Then skip this line.
cd ~/kingo-pod && ./kingo claude -
Send this to Claude Code:
Look at our n8n workflows "WS2.12 - KSMC - Quote Intake" and "WS2.12 - KSMC - Quote Queue". In five short lines: what happens to a mail that asks for a price, and where does a person decide? Change nothing. -
Try it with a mail. From your SKKU account, send a mail to your test Gmail account. Copy the subject and the text:
Quote for EXAMPLE-001Hello KSMC, please send us a quote for 500 units of EXAMPLE-001. They must work from -40 to 85 C. Ana Lopez, Acme DevicesWait two minutes, then click Reload on your page. The quote waits there, with its price and "All rules kept."
-
Decide, as the sales engineer. Type a short note (why), then click Approve and send. The quote moves to the tab Decided. A little later, it arrives in your SKKU inbox, as a reply to your mail.
Your first quote went out, and you approved it. Your system did the routine work: it read the mail, found the part and calculated the price. The decision stayed with a person: nothing left without the sales engineer's OK.
Who does what? For each step: Langflow, n8n, or a person on your page?
| Step | Who |
|---|---|
| Picks up each new mail | n8n |
| Decides that the mail asks for a price | Langflow |
| Finds the part number and the quantity in the mail | Langflow |
| Calculates the price from your price tiers | n8n |
| Approves the quote, so that it is sent | A person, on your page |
Why
n8n picks up each mail and follows fixed rules: it calculates the price the same way every time. Langflow reads the text: it sorts the mail and finds the values. Before anything leaves the company, a person decides.
3 · Change the templates for your team
Why these tools?
- n8n for the fixed rules. They need no AI. A fixed rule gives the same answer every time. You can test it. And it shows why it decided, for example "price 1 USD is below cost (1.2 USD): never quote it".
- Langflow for the reading. A customer writes in their own words. Only an AI model turns that into a part number, a quantity and what they need.
- A person for the decision. A quote is a promise to a customer: a person takes responsibility for it.
You can split the work differently. Some rules need judgement, for example "Does the chip fit what the customer needs, like -40 to 85 C?" A fixed rule cannot check that well. For such a rule, let Langflow judge and write a note on your page. The sales engineer 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 quote above 10,000 USD also needs the head of sales. Then press Enter.
Our project is KSMC Semiconductor Sales. 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:
- A polite no: on Reject, n8n mails the customer a short answer. Langflow writes it, and you approve it.
- Into a database: n8n also writes each approved quote into a table in Postgres, the database in kingo-pod. Other programs can read it there. Claude Code helps you set up the connection.
- A morning mail: every morning, n8n mails the sales engineer the quotes that have waited longer than two days.
- Your real price tiers, from your project data:
ksmc_pricing_tiers.csv. First copy the file into~/kingo-pod/claude: Claude Code reads only kingo-pod. Then ask Claude Code how to load it into the Data table. - A chip finder: a customer names no part number? A Langflow agent of your own suggests the right chip.