Draft Support Replies with Mistral Large 4 in n8n
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.
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.
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.
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.
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.
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.
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.
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.
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..
NowGTM at Claimlane
Latest postLatest from the blog