AI Agents

Automated workflow

30 nodes 215 119 Automatic trigger
Download

Workflow Description

An advanced automated workflow combining intelligent agents with data persistence, receiving triggers from X and user interactions, processing requests through OpenAI's language model with caching capabilities and conditional control logic.

How it works

  1. 1.Receive triggers from X or user interactions through chat interfaces
  2. 2.Extract and process relevant information using OpenAI's language model
  3. 3.Store results and states in Redis for rapid retrieval and efficient management
  4. 4.Apply conditional logic to control workflow direction and execute different paths
  5. 5.Implement controlled pauses when needed and trigger additional workflows

Use cases

  • Automatically process X interactions with intelligent AI-powered responses in real time
  • Build a conversational agent that learns from stored data and improves responses over time
  • Automate complex multi-step tasks requiring conditional decisions and time delays

Requirements

  • Active X/Twitter account with API access and proper permissions
  • Valid OpenAI API key and supported language model configured
  • Running Redis server accessible for caching and data storage
  • Authentication settings and permissions for connected channels and applications

Service Value

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

Apps Used

Twitter/X OpenAI Redis Chat Trigger

Details

Trigger Automatic trigger
Nodes 30
Apps 4
Views 215
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 (30)

/

When clicking ‘Test workflow’

Manual Trigger

#1

No Operation, do nothing1

No Op

#2

Information Extractor

Information Extractor

#3

OpenAI Chat Model

OpenAI

#4

get wait seconds

Code

#5

Set last_seen

Redis

#6

Get waiting_reply

Redis

#7

Mod input

Set

#8

waiting_reply?

If

#9

When chat message received

Chat Trigger

#10

Set waiting_reply

Redis

#11

Get buffer

Redis

#12

Delete buffer_in

Redis

#13

Delete waiting_reply

Redis

#14

WaitSeconds

Wait

#15

Buffer messages

Redis

#16

Set buffer_count increment

Redis

#17

Get last_seen

Redis

#18

Get buffer_count

Redis

#19

Map ouput

Set

#20

Check Inactivity + Count

If

#21

Delete waiting_reply1

Redis

#22

No Operation, do nothing2

No Op

#23

Wait

Wait

#24

When Executed by Another Workflow

Execute Workflow Trigger

#25

Mock input data

Set

#26

No Operation, do nothing3

No Op

#27

Sticky Note

Sticky Note

#28

Sticky Note1

Sticky Note

#29

Sticky Note2

Sticky Note

#30