AI Agents

OpenAI Assistant with custom n8n tools

14 nodes 203 134 Automatic trigger
Download

Workflow Description

An advanced automation that integrates OpenAI Assistant with custom n8n tools, enabling you to build intelligent agents that interact with users via chat and perform complex tasks using custom code and external integrations like X.

How it works

  1. 1.Activate the assistant through manual chat trigger and send the request to OpenAI
  2. 2.Process the response and determine if it requires calling a custom tool
  3. 3.Execute the appropriate tool (custom code or external integration such as Twitter/X)
  4. 4.Merge results and send the final response back to the user

Use cases

  • Build an intelligent agent that answers customer inquiries and performs automated actions
  • Create an advanced assistant that integrates with social media and external services

Requirements

  • Valid API key from OpenAI
  • Design custom tools based on your project requirements
  • Basic understanding of conditional logic and workflow flows in n8n

Service Value

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

Apps Used

Manual Chat Trigger OpenAI Twitter/X Tool Code

Details

Trigger Automatic trigger
Nodes 14
Apps 5
Views 203
Downloads 134

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 (14)

/

On new manual Chat Message

Manual Chat Trigger

#1

OpenAI Assistant

OpenAI

#2

Execute Workflow Trigger

Execute Workflow Trigger

#3

Mapping data

Code

#4

List countries?

If

#5

Mapping data1

Code

#6

Sticky Note

Sticky Note

#7

Return country list

Set

#8

Return specific capital

Set

#9

Tool to call the workflow below

Tool Workflow

#10

Concatenate country names

Summarize

#11

Get the matching country's details

Merge

#12

Sticky Note1

Sticky Note

#13

Tool: Get current date and time

Tool Code

#14