FM
FlowMarket
AI Agents Intermediate ⚡ 11 n8n Nodes

AI agent with charts capabilities using OpenAI structured output

This workflow is an experiment to integrate charts in AI Agents, using the new Structured Output from OpenAI and Quickchart.io. How it works - Users chat wit...

🔌 Nodes & Integrations Used (7)

Lm Chat Open Ai Memory Buffer Window Tool Workflow Execute Workflow Trigger HTTP Request Agent Chat Trigger

📖 Implementation & Setup Guide

This workflow is an experiment to integrate charts in AI Agents, using the new [Structured Output from OpenAI](https://openai.com/index/introducing-structured-outputs-in-the-api/) and [Quickchart.io](https://quickchart.io/).

How it works - Users chat with an AI Agent. - Anytime the AI Agent considers a chart is needed, it calls a tool to generate a chart - OpenAI generates a chart using the Quickchart definition - This object is added at the end of a Quickchart.io URL ([see documentation](https://quickchart.io/documentation/usage/parameters/)) - The url is added in the conversation via the AI Agent as markdown.

Set up steps - Create an [OpenAI API Key](https://platform.openai.com/api-keys) - Create the OpenAI credentials - Use the credentials for the HTTP Request node (as Predefined Credential type) - Activate your workflow - Start chatting - For example, you can ask the AI Agent to generate a chart about the top 5 movies at the box office - Start exploring the limits

**Shout-out** [Quickchart.io](https://quickchart.io) is an amazing open source project that provides a free API to test. Go check them out!

**Example of chart**

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save AI_agent_with_charts_capabilities_using_OpenAI_structured_output.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related AI Agents Workflows

View All in AI Agents →