Draft the LLM Node: Turning a Vague Prompt Into a Working Spec
Objective: Given a plain data-moving workflow (form submission to Slack), write a complete LLM node spec, task, input mapping, and structured output schema, that a no-code platform could actually run without producing inconsistent results.
You're the marketing ops lead at RXBAR, the Chicago-founded protein bar company acquired by Kellogg's for $600M. Your website's 'wholesale inquiry' form dumps raw text into a Slack channel, and reps skip long submissions.
Write the LLM node's task instruction, input mapping, and output schema so two different runs of the same submission produce the same classification, following the lesson's three-part prompt structure.
Before you start
What you'll need
Free path (everything below is enough to finish)
Free, easy to share with a second reviewer before it goes live
Free tier supports a limited number of Zaps with AI actions, enough to build and test one workflow
No access? n8n's free self-hosted tier if Zapier's free-tier task limit is too tight
The process
2 steps
Step 01 of 02
The lesson's three-part prompt structure requires stating the exact task ('classify into exactly one of these three categories'), not a vague instruction like 'analyze this.'
A first-draft prompt reads 'Look at this wholesale inquiry and tell us what to do.' Rewrite it as an exact task instruction.
Procedure
- List the 3 categories reps actually route on: high-volume-retail, small-batch-inquiry, spam-or-irrelevant
- Write one sentence naming the task and the closed category list
- Add one line telling the model to also extract the requested case-pack quantity if present
- Read the instruction back, could a different person run it twice and get the same category both times?
TASK INSTRUCTION (draft) Classify this wholesale inquiry into exactly one of: high-volume-retail, small-batch-inquiry, spam-or-irrelevant. If a case-pack quantity is mentioned, extract it as a number.
Healthy
The instruction names a closed list of categories and a single extraction field.
Unhealthy
The instruction says 'tell us what to do,' leaving the category set undefined.
What this means
A closed category list is what makes two runs of the same input agree, an open-ended instruction invites a different answer every time.
So what do I do about it?
| Symptom | Action | Effort |
|---|---|---|
| Reps see inconsistent tags on similar submissions | Rewrite the prompt to name the exact closed category list | 30 min |
Step 02 of 02
Structured output modes constrain the model to return valid JSON matching a schema, guaranteeing the field names and types the next node expects, instead of a paragraph you have to regex apart.
The Slack-posting node downstream needs a category string and a numeric quantity field. Write the JSON schema the LLM node should be told to return.
Procedure
- Define the schema: category as an enum of the 3 values, quantity as a number or null
- Paste the schema into the LLM node's structured output field
- Map the Slack message template to read {{category}} and {{quantity}} directly, no parsing step
- Send one test submission with no quantity mentioned, confirm quantity returns null, not an empty string
{
"category": "high-volume-retail" | "small-batch-inquiry" | "spam-or-irrelevant",
"quantity": number | null
}Healthy
Every test run returns valid JSON with exactly these two fields, no free text wrapper.
Unhealthy
The model sometimes returns a sentence like 'This looks like a retail inquiry for 500 units.'
What this means
A schema-less prompt makes the next node's parsing brittle, one unexpected sentence format breaks the whole chain downstream.
So what do I do about it?
| Symptom | Action | Effort |
|---|---|---|
| Slack message shows raw unparsed model output | Add the structured output schema to the LLM node before mapping downstream fields | 30 min |
Final deliverable
A written LLM node spec (task instruction + input mapping + JSON output schema) ready to paste into a no-code platform.
See a reference example
Blue Bottle Coffee, wholesale inquiry LLM node spec
TASK: Classify this wholesale inquiry into exactly one of: high-volume-retail, small-batch-inquiry, spam-or-irrelevant. Extract case-pack quantity if mentioned.
INPUT MAPPING: {{form.message}} -> model input
OUTPUT SCHEMA:
{
"category": "high-volume-retail" | "small-batch-inquiry" | "spam-or-irrelevant",
"quantity": number | null
}
TEST RUN 1 (500-unit cafe order): {"category": "high-volume-retail", "quantity": 500}
TEST RUN 2 (same input, re-run): {"category": "high-volume-retail", "quantity": 500}Success criteria
You're done when you can:
- Task instruction names a closed, finite category list
- Output schema is valid JSON with typed fields the next node can map directly
- Same test input produces the same classification on repeated runs