Quotes that write themselves: how the AI automation for a print shop works
An n8n flow pulls quote requests from the mailbox, has Claude read out the details, calculates the price and emails the quote. Here is how it fits together, step by step.
Our client, a print shop, gets a lot of its quote requests by email. No two emails are alike. One customer might write "twelve copies, 160 pages, 24 of them in colour". Another starts with the story behind the project and only mentions the numbers in the last sentence. Someone had to read every email, work out the price and type a reply.
We built a flow in n8n that takes this over. It runs every hour, reads the new requests, calculates the price and sends the quote, in Dutch or in English.
What happens every hour
n8n is a tool in which you build an automation as a chain of blocks, called nodes. Each block does one thing and hands its result to the next. This flow starts by itself every hour and then goes through these steps:
- Fetch the new emails from the mailbox.
- Clean up each email until only the text the customer wrote is left.
- Check whether this customer has already had a quote.
- Have Claude, Anthropic's language model, read out the details.
- Check that there is enough information to put a price on it.
- Calculate the price.
- Email the quote in the customer's language.
- Let a member of staff know if the email contained another question, or if something went wrong.
Fetching and cleaning up the emails
The print shop uses Microsoft 365. n8n fetches the emails through the Microsoft Graph API, with a search that only returns messages from the last two days. Because the flow looks back two days, no request gets lost if it doesn't run for a few hours.
An email arrives as HTML. A short piece of code strips the HTML tags, converts special characters and keeps only the relevant text. Less text also costs less: you pay a language model for every bit of text it reads.
One request, one quote
n8n has built-in tables, called Data Tables. For each contact, the table holds the email address, whether a quote has gone out and when. The flow looks up the sender of every email and only carries on if that address is in the table and hasn't had a quote yet. If the same customer writes again later, they don't get a second quote.
If no quote can be made, that goes into the table too. That way the print shop can see at a glance which requests still need a person to look at them.
Claude reads the request
The reading happens in n8n's AI Agent node, with Claude Sonnet as the language model. The instruction to the model is short: you'll get a raw email in Dutch or English, pull out these six things.
- the number of copies;
- the number of black-and-white pages;
- the number of colour pages;
- the language of the email;
- whether the customer wants a laminated cover;
- whether the email asks anything else.
A Structured Output Parser is attached to the AI Agent node. It fixes the shape of the answer: a JSON object with exactly those six fields, numbers where numbers belong. For an email like "I'd like 12 copies printed, 160 pages in black and white and 24 in colour, with a laminated cover. Could you post them to me as well?", this is what comes back:
{
"quantity": 12,
"blackAndWhite": 160,
"color": 24,
"language": "E",
"coverPage": "Y",
"extraQuestion": "Y"
}
Why the price doesn't come from the language model
A language model is good at reading messy text. Working through a price list is a different matter: it might round differently or forget a discount, and asking the same question twice doesn't always get you the same answer twice. For a quote, that won't do.
So Claude's job ends once it has read the email. First, a plain check makes sure there is at least a number of copies and a number of black-and-white pages. If there isn't, the flow makes no quote and records that in the table. Then a Code node works out the price with the print shop's own rules: a price per page for black and white and for colour, a fixed cost per book, a surcharge for a laminated cover and a discount above a certain number of copies.
If a rate changes, someone edits one number. Nobody has to rewrite a prompt and hope the model remembers the new price.
The quote goes out
The language Claude picked up decides which text the customer gets: Dutch or English.
The quote also explains what happens next: the customer sends their files as a PDF, the print shop checks the layout, prints a proof and lets them know when the first copy is ready. That part stays human work, as it should.
Sending goes through SMTP2GO, a service that sends email through a simple API.
What the flow leaves to people
A good automation knows when to stop. This one stops in three cases.
If the number of copies or the number of pages is missing, no quote goes out.
If the customer asks something else in the same email, about delivery for example, the quote still goes out. The print shop also gets an internal email asking someone to reply to the customer personally. It opens with "Hello, this is your AI bot."
And if something goes wrong, because the language model gives no usable answer or an email fails to send, the team hears about it straight away in an internal chat message.
The tools at a glance
| Part | Tool | What it does |
|---|---|---|
| Automation | n8n | Runs the flow every hour and connects all the steps. |
| Mailbox | Microsoft 365, through the Microsoft Graph API | Supplies the new requests. |
| Reading | Claude Sonnet (Anthropic), in the AI Agent node | Pulls the six details out of the email. |
| Fixed format | Structured Output Parser | Forces the answer into a JSON schema. |
| Memory | n8n Data Tables | Keeps track of who has had a quote, and when. |
| Cleaning up and calculating | Code nodes in JavaScript | Cleans up the email and works out the price. |
| Sending | SMTP2GO | Sends the quote. |
| Alerts | Telegram | Says when something goes wrong. |
Is this something for your business?
The same setup works outside printing too. It pays off most when:
- requests come in as free text, by email or through a form;
- your price follows from a handful of details and fixed rules, even if those rules are complicated;
- someone on your team spends hours on this every week;
- a quick answer makes a difference to your customers.
You don't need to buy a new software package. We build on the mailbox and the software you already have, and we start with one type of request. Once that works, we move on to the next.