Mattering Automations Mistral AI integration
Connect Mistral AI to Mattering Automations: chat completions, Codestral code completion, Mistral OCR, embeddings, moderation, classifiers, and batch inference as workflow steps, authenticated with a Mistral API key.
The Mattering Automations Mistral AI integration puts Mistral AI Studio on your automation canvas: run chat completions with reasoning, vision, JSON mode, and function calling inside a workflow step, complete code with Codestral, read documents with Mistral OCR, create embeddings, moderate or classify content, run agents built in Mistral's console, and push bulk work through asynchronous batch jobs.
Setup is one API key from the Mistral AI Studio console. This guide covers creating the key, connecting it, a verify path that costs nothing to run, and the full node reference, and it ends with the failure modes worth recognizing on sight.
Before you start
- A Mistral account at console.mistral.ai with an active plan on the workspace. The free plan (Free mode) works for testing: no credit card is required. Mistral states that free-plan API data, input and output, may be used to train its models unless you opt out in the Admin Console, so keep free-tier calls to test data and use the pay per use Scale plan, which is opted out of training by default, for real workloads.
- A Mattering workspace with access to the Automations app.
- For the OCR node, documents reachable by URL or supplied as base64 data URLs. There is no local file upload.
- For the two classification nodes, a classifier you have fine-tuned on Mistral's platform. They have no general-purpose default model; the moderation nodes cover the built-in categories.
Create a Mistral API key
Mattering authenticates to Mistral with an API key sent as an Authorization bearer header. It is a single field: no organization id, no version header, no OAuth flow to complete. Keys belong to a workspace, and the plan and rate limits attach at the workspace level, shared by every key in it.
Connect Mistral AI to Mattering
Verify it works
Open any automation canvas and check the palette: a Mistral section should list eight query nodes and sixteen action nodes. Drop Mistral: List Models onto the canvas and run a test step. It takes no parameters and is free to call, so a successful response returns every model your key can use, each with its capabilities, context length, aliases, and deprecation date. That makes it the cheapest credential check available.
To confirm inference itself works, add Mistral: Chat Completion, keep the default mistral-small-latest model, put one short message in the messages array, and set max_tokens low. A successful run returns the reply at data.choices[0].message.content along with token usage.
Node reference
24 nodes, generated from the connector itself so this reference always matches what ships.
Read and query nodes 8
Mistral: Download File Content
mistral_download_file
Download a stored file's raw content: the primary way to collect batch job results. The full text comes back at data.content, and because batch outputs are JSONL, each line is also parsed into data.lines so a For Each node can loop over the individual responses.
Mistral: Get Batch Job
mistral_get_batch_job
Poll one batch job by ID: status (QUEUED, RUNNING, SUCCESS, FAILED...), progress counters, and on completion the output_file and error_file IDs. With inline=true, jobs created from inline requests return their outputs directly in the response.
Mistral: Get File
mistral_get_file
Retrieve one file's metadata by ID: filename, size, purpose, line count, and source. Useful for checking a batch job's output_file before downloading it.
Mistral: Get File Signed URL
mistral_get_file_signed_url
Get a temporary signed download URL for a stored file, valid for a configurable number of hours. Hand the URL to any downstream node or external system that needs the raw file without a Mistral credential.
Mistral: Get Model
mistral_get_model
Retrieve one model by ID: its capabilities (chat, FIM, function calling, vision, fine-tuning support), maximum context length, aliases, and deprecation date. Works for base models and your fine-tuned models alike.
Mistral: List Batch Jobs
mistral_list_batch_jobs
List your batch inference jobs with paging and filters by model, status, and creation date. Each job carries progress counters and, once finished, the output_file and error_file IDs to download.
Mistral: List Files
mistral_list_files
List files stored in your Mistral workspace: fine-tuning datasets, batch inputs, batch outputs, and OCR documents, with paging and filters by purpose, type, source, and filename search.
Mistral: List Models
mistral_list_models
List every model your Mistral API key can use: base models with their capabilities (chat, function calling, vision, fine-tuning), context lengths, aliases, and deprecation dates, plus your fine-tuned models. Free to call, which makes it the credential health check for this connector.
Action nodes 16
Mistral: Agent Completion
mistral_agent_completion
Run a completion against a Mistral agent built in the Mistral Studio console: the agent carries its own model, instructions, and tool set, so this node only needs the agent ID and the messages. Output lands at data.choices[0].message.content. Streaming is forced off.
Mistral: Archive Fine-Tuned Model
mistral_archive_fine_tuned_model
Archive a fine-tuned model, taking it out of active use without deleting it. Fully reversible with the Unarchive node.
Mistral: Cancel Batch Job
mistral_cancel_batch_job
Request cancellation of a running batch job. Requests already completed stay completed and billed; the job moves through CANCELLATION_REQUESTED to CANCELLED.
Mistral: Chat Completion
mistral_chat_completion
Generate a chat completion with a Mistral model: frontier reasoning with Magistral, multimodal input on vision models, JSON mode and structured outputs, and function calling. The generated text lands at data.choices[0].message.content. Streaming is not supported on the canvas and is forced off.
Mistral: Classify Chat
mistral_classify_chat
Run whole conversations through one of your custom classifier models: classify a chat transcript by intent, topic, resolution status, or any taxonomy the classifier was trained on, using the full multi-turn context.
Mistral: Classify Text
mistral_classify_text
Run raw text through one of YOUR custom classifier models (trained with Mistral's classifier factory fine-tuning): intent detection, sentiment, routing labels, or any custom taxonomy. Returns per-label score maps per input at data.results[i].
Mistral: Create Batch Job
mistral_create_batch_job
Start an asynchronous batch inference job at roughly half the price of live calls. Feed it either uploaded .jsonl input_files or - canvas-friendly - inline requests (a JSON array of {custom_id, body} objects), pick the target endpoint and model, then poll with Get Batch Job and download results with Download File Content.
Mistral: Create Embeddings
mistral_create_embeddings
Turn text into embedding vectors with mistral-embed or codestral-embed (for code). Send one string or a JSON array of strings, get one vector per input at data.data[i].embedding plus token usage. Keep batches modest: every vector is a large float array in the execution record.
Mistral: Delete File
mistral_delete_file
Permanently delete a stored file from your Mistral workspace. This cannot be undone; download anything you still need first.
Mistral: Delete Model
mistral_delete_model
Permanently delete a fine-tuned model. This cannot be undone: prefer the Archive node when the model might be needed again.
Mistral: FIM Code Completion
mistral_fim_completion
Fill-in-the-middle code completion with Codestral: give the code before the cursor as prompt and optionally the code after it as suffix, and the model generates what goes between. With no suffix it completes the prompt forward. Output lands at data.choices[0].message.content. Streaming is forced off.
Mistral: Moderate Chat
mistral_moderate_chat
Moderate a whole conversation instead of raw text: the model classifies the LAST message in each conversation against the nine moderation categories using the earlier turns as context, which catches conversational harms plain text moderation misses.
Mistral: Moderate Text
mistral_moderate_text
Classify raw text against Mistral's nine moderation categories (sexual, hate and discrimination, violence and threats, dangerous and criminal content, self-harm, health, financial, law, PII). Returns per-category booleans and scores per input at data.results[i], ready for a Filter node to gate on.
Mistral: OCR a Document
mistral_ocr_document
Run Mistral OCR on a PDF or image by URL: each page comes back as clean markdown at data.pages[i].markdown with optional extracted images, tables, headers/footers, and structured annotations via JSON schema. The document-understanding workhorse: point it at an invoice, contract, or scan and pipe the markdown into a chat node.
Mistral: Unarchive Fine-Tuned Model
mistral_unarchive_fine_tuned_model
Restore an archived fine-tuned model to active use. The reverse of the Archive node (the API models unarchive as a DELETE of the archive marker).
Mistral: Update Fine-Tuned Model
mistral_update_fine_tuned_model
Rename a fine-tuned model or update its description. Only applies to your ft:... models, not base models.
Using the integration
On the automation canvas
Mistral nodes chain with everything else: pull a record, generate or extract with Mistral: Chat Completion, then write the result into a task, a message, or a database row. Template references resolve inside nested JSON, so an upstream node's output can drop straight into one entry of the messages array rather than templating the whole array as a single blob.
Documents in, markdown out
Mistral: OCR a Document takes a PDF or image by URL, or a base64 data URL, and returns each page as markdown with optional tables, extracted images, headers and footers, and schema-driven annotations. The usual pattern is OCR first, then a chat completion in JSON mode to turn the markdown into structured fields.
Batch inference without file uploads
Mistral: Create Batch Job accepts inline requests, a JSON array of custom_id and body objects, alongside the target endpoint and model, so bulk work starts without uploading a JSONL file. Poll with Mistral: Get Batch Job, which can return outputs inline for inline jobs, or read the finished output file with Mistral: Download File Content, which parses each JSONL line into a lines array a For Each node can loop. Mistral's docs price batch inference at roughly half the cost of live calls.
Moderation and your own classifiers
Mistral: Moderate Text and Mistral: Moderate Chat score content against Mistral's nine moderation categories and return booleans plus scores a Filter node can gate on; the chat variant judges the last message in context. Mistral: Classify Text and Mistral: Classify Chat do the same through a classifier you trained yourself and require your own ft:classifier model id.
Agents built in Mistral's console
Mistral: Agent Completion runs an agent you configured in Mistral's agent builder in the Studio console by its id. The agent carries its own model, instructions, and tool set, so the node only needs the agent id and the messages, and the reply lands in the same choices shape as a chat completion.
From AI assistants over MCP
Every node speaks MCP, the open protocol for connecting AI assistants to tools. Claude, ChatGPT, and Matter can drive them, so an assistant can plan a workflow and hand the generation, document parsing, or classification to Mistral.
Troubleshooting
Every node returns a 401
Calls start failing with a 429
A classification node rejects the model
A node returns a model not found error
Create Batch Job returns a job instead of results
There is no file upload node
A node you expected from Mistral's docs is missing
A delete ran and the model or file is gone
Related
The Mistral AI MCP
What connecting Mistral AI unlocks for AI agents and automations, with common uses and FAQs.
More guides
All Automations documentation
Every integration guide, plus how connectors, credentials, and workflows fit together.
Mistral AI is a trademark of its respective owner. Mattering uses platform names to identify the services these integrations connect to; no endorsement or affiliation is implied.