← Back to blog

Draft Support Replies with Mistral Large 4 in n8n

Build idea, not a verified tutorial. This was drafted by an automation Daniel built. Tool interfaces change often — check the current docs before relying on the steps.

Every support inbox fills up with emails that need someone to read, categorise, and write a first response — before a human even touches them. With Mistral Large 4 now available via API (launched 6 October 2026), you can do that classification and drafting in one call, using a model that genuinely handles long, messy customer emails well.

TRIGGERORCHESTRATEAI / ENRICHOUTPUTNew Gmail emailSet node (pullsubject + body)Mistral Large 4(classify + draftParse JSON responseGmail Draft (readyto review)
How it flows
1

Get a Mistral API key

You need an account on Mistral's platform (called Mistral Studio) and a paid billing method attached — Mistral requires a credit card before it issues API keys. Once billing is active, go to the API Keys page and click Create new key. Copy the key and keep it somewhere safe — you only see it once.

Mistral Studio · API Keys page
1 Click to create your key
Create new key
2 Copy the key immediately — it won't show again
sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxCopy
2

Add the Mistral credential in n8n

A credential in n8n is a saved, encrypted set of login details for an external service. You create it once and every node that needs Mistral can reuse it. Open n8n, click the Credentials menu in the left sidebar, click Add credential, search for Mistral Cloud, and paste your API key into the field.

n8n · Credentials panel
1 Open the credentials list
Add credential
2 Search for the Mistral credential type
3 Paste your key and save
API Keysk-xxxxxxxx…
3

Create the workflow and add a Gmail trigger

A trigger is the node that starts the whole workflow. In n8n, click + New workflow, then click the big + on the canvas to add a node. Search for Gmail Trigger and select it. Set the Event to Message Received and connect your Google account when prompted. Every new email in your inbox will now kick off the workflow.

n8n Canvas · Gmail Trigger node
1 Search for the trigger node
2 Choose what fires the workflow
MR Message ReceivedLA Label AddedTU Thread Updated
4

Pull out the subject and body with a Set node

The Gmail trigger gives you a big blob of data. A Set node lets you pick just the fields you care about and give them simple names. Add a Set node after the trigger. Create two fields: name the first `subject` and set its value to `{{ $json.subject }}`, and the second `body` and set it to `{{ $json.text }}` (that's the plain-text version of the email body). The curly-brace syntax is how n8n pulls data from the previous node.

n8n · Set node
1 Map the email fields to clean names
$json.subject→subject
$json.text→body
Keep only set fields
5

Call Mistral Large 4 with an HTTP Request node

Add an HTTP Request node. This is n8n's universal node for calling any web API — think of it as a form that sends a message to Mistral and waits for a reply. Set Method to `POST`, set URL to `https://api.mistral.ai/v1/chat/completions`. For Authentication, choose Predefined Credential Type, then select Mistral Cloud and pick the credential you created in Step 2. Switch Body Content Type to JSON, then paste the JSON body shown below. The model ID `mistral-large-4` tells the API exactly which model to use.

n8n · HTTP Request node · Mistral API call
1 Basic settings
MethodPOST
URLhttps://api.mistral.ai/v1/chat/completions
AuthenticationPredefined Credential Type → Mistral Cloud
Body Content TypeJSON
2 Paste this as the JSON body — it tells Mistral what to do
{ "model": "mistral-large-4", "response_format": {"type": "json_object"}, "messages": [ { "role": "system", "content": "You are a customer support assistant. Given a support email, return a JSON object with two keys: 'category' (one of: billing, technical, general) and 'draft_reply' (a polite, concise reply ready to send)." }, { "role": "user", "content": "Subject: {{ $json.subject }}\n\n{{ $json.body }}" } ] }
Returns{ "category": "billing", "draft_reply": "Hi there, thanks for reaching out…" }
6

Parse the AI's reply

Mistral returns a JSON object (structured data, like a dictionary) inside the response. Add another Set node. Set `category` to `{{ JSON.parse($json.choices[0].message.content).category }}` and `draft_reply` to `{{ JSON.parse($json.choices[0].message.content).draft_reply }}`. This unwraps the AI's answer into two clean fields the next node can use.

n8n · Set node · Parse AI response
1 Unwrap the AI's JSON reply into clean fields
JSON.parse($json.choices[0].message.content).category→category
JSON.parse($json.choices[0].message.content).draft_reply→draft_reply
Keep only set fields
2 What you get out
Parsed AI outputbilling
categorybilling
draft_replyHi there, thanks for reaching out about your invoice…
7

Save the draft reply back to Gmail

Add a Gmail node (not the trigger — the action node). Set Resource to Draft and Operation to Create. Set To to `{{ $('Gmail Trigger').item.json.from.value[0].address }}` (this pulls the sender's email address from the original trigger data), set Subject to `Re: {{ $('Gmail Trigger').item.json.subject }}`, and set Message to `{{ $json.draft_reply }}`. Now every incoming email produces a ready-to-review draft — you still hit send yourself.

n8n · Gmail node · Create Draft
1 Choose what the Gmail node does
D→C Draft → CreateM→S Message → SendM→R Message → Reply
2 Fill in the draft fields
To{{ $('Gmail Trigger').item.json.from.value[0].address }}
SubjectRe: {{ $('Gmail Trigger').item.json.subject }}
Message{{ $json.draft_reply }}

What you get

Every new email in your Gmail inbox is automatically classified into a category (billing, technical, or general) and turned into a ready-to-send Gmail draft. You open the draft, tweak if needed, and hit send — Mistral Large 4 does the reading and writing, you do the approving. Rough effort: ~1.5 hours. Mistral Large 4 API costs roughly $1.36 per million input tokens — a typical support email is under 500 tokens, so a few hundred emails costs pennies. n8n Cloud has a free trial; self-hosting is free..

Sources