AI Agents

n8n automation

46 nodes 221 119 Automatic trigger
Download

Workflow Description

An advanced automation template integrating an AI agent with n8n, receiving messages through a chat interface and processing them using OpenAI models while maintaining conversation memory and storing data in Redis for enhanced workflow control.

How it works

  1. 1.Receive input from the chat trigger and activate the workflow execution
  2. 2.Process incoming messages using an intelligent AI agent powered by OpenAI
  3. 3.Apply conditional logic to manage workflow routing and decision-making
  4. 4.Maintain conversation history in a buffered memory system
  5. 5.Store results and sensitive data securely in Redis
  6. 6.Deliver responses and outputs to communication platforms

Use cases

  • Build an autonomous agent that answers customer inquiries without manual intervention
  • Manage multi-step conversations while preserving context and conversation flow
  • Integrate advanced language models with caching and storage systems
  • Automate complex tasks on Twitter/X with sophisticated memory handling

Requirements

  • Valid OpenAI API key and access to a modern language model
  • Configured Redis server with secure connection credentials
  • Twitter/X accounts or other platforms with adequate permissions
  • Basic knowledge of workflow design and conditional logic implementation

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Twitter/X N8N Redis AI Agent Chat Trigger Tool Memory Mcp Trigger OpenAI

Details

Trigger Automatic trigger
Nodes 46
Apps 9
Views 221
Downloads 119

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (46)

/

Simplify Workflows

Set

#1

When Executed by Another Workflow

Execute Workflow Trigger

#2

Operations

Switch

#3

Get MCP-tagged Workflows

N8N

#4

Filter Matching Ids

Filter

#5

Store In Memory

Redis

#6

AddTool Success

Set

#7

AddTool Error

Set

#8

Get Memory

Redis

#9

Split Out

Split Out

#10

Filter Matching IDs

Filter

#11

Store In Memory1

Redis

#12

Remove Tool Success

Set

#13

Convert to JSON

Set

#14

listTools Success

Set

#15

Get MCP-tagged Workflows1

N8N

#16

Simplify Workflows1

Set

#17

listTools Success1

Aggregate

#18

Get Parameters

Set

#19

executeTool Result

Aggregate

#20

AI Agent

Agent

#21

When chat message received

Chat Trigger

#22

MCP Client

Mcp Client Tool

#23

Simple Memory

Memory Buffer Window

#24

Convert to JSON1

Set

#25

Has Workflow Available?

If

#26

ExecuteTool Error

Set

#27

Workflow Exists?

If

#28

N8N Workflows MCP Server

Mcp Trigger

#29

Add Workflow

Tool Workflow

#30

RemoveWorkflow

Tool Workflow

#31

List Workflows

Tool Workflow

#32

SearchWorkflows

Tool Workflow

#33

ExecuteWorkflow

Tool Workflow

#34

Sticky Note

Sticky Note

#35

Execute Workflow with PassThrough Variables

Execute Workflow

#36

Sticky Note1

Sticky Note

#37

Sticky Note2

Sticky Note

#38

OpenAI Chat Model

OpenAI

#39

Is Empty Array?

If

#40

Delete Key

Redis

#41

Sticky Note3

Sticky Note

#42

Sticky Note4

Sticky Note

#43

Sticky Note5

Sticky Note

#44

Sticky Note6

Sticky Note

#45

Sticky Note7

Sticky Note

#46