Use this foundational n8n workflow to integrate diverse AI models, like Mistral, through OpenRouter.ai. Learn how to configure the n8n HTTP Request node for custom LLM automation.
Download this n8n workflow template and start using it instantly.
Automation engineers seeking flexible LLM access.
Users who need to test multiple AI models (e.g., Mistral, Llama) without changing providers.
Developers building custom chatbots or AI services within an n8n workflow.
Anyone looking for advanced n8n templates for AI integration.
This powerful n8n workflow provides a streamlined method for accessing the vast library of large language models available through OpenRouter.ai. Instead of relying solely on dedicated n8n nodes for specific providers, this n8n template uses the universal HTTP Request n8n node to communicate directly with the OpenRouter API. This allows for unparalleled flexibility in model choice (currently configured for Mistral) and prompt engineering. If you are looking to build robust, model-agnostic AI solutions, this foundational n8n workflow is essential. It demonstrates a clean pattern for setting input parameters and processing the resulting JSON from external AI services, making it a highly useful starter for complex AI automation.
The n8n workflow initiates with a manual n8n trigger, designed for easy testing and deployment.
Model ID (pointing to a free Mistral model on OpenRouter) and the user Message (the prompt).choices[0].message.content) from the complex API JSON structure, providing a clean, final output.To deploy this n8n workflow effectively, follow these steps:
This n8n workflow relies on core n8n nodes to achieve seamless integration:
When clicking ‘Execute workflow’ (Manual Trigger): This serves as the starting n8n trigger for immediate manual execution and testing of the n8n workflow.
Set Model & Prompt (Set Node): A critical n8n node used to define the LLM model identifier (mistralai/mistral-small-3.2-24b-instruct:free) and the user's prompt (What is the meaning of life?). This separation simplifies future modifications of the n8n template.
OpenRouter.ai (HTTP Request Node): The central n8n node responsible for communication. It is configured to send a POST request to the OpenRouter chat completions endpoint. It dynamically builds the JSON request payload using variables defined in the previous n8n node and uses HTTP Bearer authentication.
Summarize (Summarize Node): Used here not for standard aggregation, but specifically configured to drill down into the complex JSON response and extract the clean text output from the AI, specifically from the path choices[0].message.content.
Build an advanced n8n workflow using OpenAI Assistants, PostgreSQL memory, and external API calls (MySQL/HTTP). This n8n template manages context and retrieves real-time data.

Use this core logic n8n workflow to reliably change the file extension and associated MIME type of binary data passing through your n8n automation. Essential for consistent file processing.

Centralize your n8n error handling with this robust n8n workflow. Automatically configure error handlers, catch failures, and send detailed Gmail alerts for instant visibility across all your n8n projects.

This n8n workflow automates a full RAG system using Google Drive, OCR (Mistral AI), OpenAI embeddings, and Supabase vectors. Utilize these n8n templates to power a multi-channel AI chat agent across Slack, Telegram, and Gmail.









































