N8N is an open source, self hosted (cloud hosted if you don’t want to host it yourself), automation tool. For years these types of tools have been slowly chipping away at the mundaine and repetitive jobs that can be automated away with simple workflows, but now that large language models have been introduced to the mix, the workflows can do much, much more.
AI agents are a relatively new thing, an extension of the LLMs capabilities with tool use, retrieval augmented generation and custom system prompts. This allows the agents to be super useful for more specific jobs where having up to date knowledge of a certain topic is crucial. Many LLMs are trained up to a particular date, beyond this date, and without any additional tools, will either; not give you a current answer, or will hallucinate something completely wrong. We are going to take advantage of a free to use platform (limited to some credits per day) called Mistral chat, where we can easily create AI agents.
Creating the agent
Create an account in Miistral chat (https://chat.mistral.ai/) and go to the “Agents” tab.
Click the “Create an agent” button, top right.

Add in this custom instruction to the “Instructions” section:
You are an n8n Automation Engineering Specialist. Your primary function is to assist a web developer and AI workshop lead in designing, building, and optimizing sophisticated n8n workflows for marketing and customer service automation. You operate with the precision and efficiency of a senior engineer.
**Core Capabilities & Knowledge Base:**
- Expertise in n8n nodes, triggers, expressions, and workflow design.
- Specialize in marketing automation (lead capture, email sequences, segmentation) and customer service automation (onboarding, feedback, support triage).
- Proficient in integrating WordPress, Mailchimp/SendGrid, Stripe, Calendly, Slack, and similar tools via their APIs and webhooks.
**Behavioral Guidelines:**
1. **Tone:** Be direct, concise, and technically accurate. Avoid fluff.
2. **Methodology:** First, clarify the automation goal and trigger. Then, propose a workflow architecture. Finally, detail key node configurations with specific expressions or settings.
3. **Proactivity:** Anticipate pitfalls like API rate limits and suggest error handling strategies.
4. **Examples:** Use concrete examples for complex concepts (e.g., "Use a Switch node with the condition: `{{ $json.purchase_product_name }} == 'Advanced AI Workshop'`").
5. **Clarity:** If a request is vague, ask specific questions about triggers, actions, and apps involved.
**Constraints:**
- Only advise on features n8n actually possesses.
- Prioritize practical, simple solutions over complex ones.
- State assumptions clearly if unsure about a third-party API's behavior.Using the agent to create a workflow
Now we could ask the agent something like –
“Give me a list of automations I can use for social media marketing”
Then we can choose which automation we want to try and ask –
“Can you give me a json file for setting up the [choice of automation from above] automation”
For my example I chose a trend alerts automation and I got the following detailed json output that I can save as a json file and upload to N8N. This builds the workflow straight away with all the connections, you just have to edit some of the fields in the json, in my example I need to change the slack credentials, replace the RSS feed URL and choose keywords to filter by. The agent should list information required to use the workflow in the same chat output.
Saving the code as a .json file
Copy the json code that your agent has produced and paste it into a text editor or code editor of your choice. Name it something sensible and save it with the file extension .json
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [250, 300]
},
{
"parameters": {
"url": "https://example-news-rss-feed.com/feed",
"options": {}
},
"name": "RSS Feed - Fetch Trends",
"type": "n8n-nodes-base.rssFeedRead",
"typeVersion": 1,
"position": [450, 300]
},
{
"parameters": {
"operation": "filter",
"conditions": {
"string": [
{
"value1": "{{ $json[\"item\"][\"title\"] }}",
"operation": "contains",
"value2": "AI"
}
]
}
},
"name": "Filter - AI Trends",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [650, 300]
},
{
"parameters": {
"text": "🚨 **New AI Trend Alert!**\n\n**Title:** {{ $json[\"item\"][\"title\"] }}\n**Link:** {{ $json[\"item\"][\"link\"] }}\n**Published:** {{ $json[\"item\"][\"pubDate\"] }}",
"channel": "social-media-alerts",
"options": {}
},
"name": "Slack - Send Alert",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [850, 300],
"credentials": {
"slackApi": {
"id": "YOUR_SLACK_CREDENTIALS_ID",
"name": "Slack API"
}
}
},
{
"parameters": {
"mode": "everyHour",
"minutes": 0
},
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [250, 500]
}
],
"connections": {
"Start": {
"main": [[{
"node": "RSS Feed - Fetch Trends",
"type": "main",
"index": 0
}]]
},
"RSS Feed - Fetch Trends": {
"main": [[{
"node": "Filter - AI Trends",
"type": "main",
"index": 0
}]]
},
"Filter - AI Trends": {
"main": [[{
"node": "Slack - Send Alert",
"type": "main",
"index": 0
}]]
},
"Schedule Trigger": {
"main": [[{
"node": "RSS Feed - Fetch Trends",
"type": "main",
"index": 0
}]]
}
}
}
Importing the json file workflow into N8N
Login to N8N (https://n8n.io/), or create an account. The cloud version gives you a 14 day free trial, you can host the platform yourself (https://docs.n8n.io/hosting/).

Once you sign in to your workspace you will get the opportunity to “Import from file”. Located in the top right horizontal 3 dot menu next to the “Save” button.

Select your saved json file and your custom workflow will appear instantly on the workspace, fully connected and ready to test.

If you didn’t add any of the details into your json file, like RSS feed or api keys you can double click on the elements in the workflow, allowing you to edit and add those details in at this stage.