(Use Case) Data Analysis Automation (1) - Korean Baby Name Ranking Analysis (⭐⭐⭐)

Tags
Empty
Date of creation
Name
(Use Case) Data Analysis Automation (1) - Korean Baby Name Ranking Analysis (⭐⭐⭐)
Category
Empty
Created by
  • data_popcorn

Prerequisite

Airtable API
OpenAI API
Slack API

Scenario

💡
One line summary
A workflow that analyzes the top 50 names for children born between 2020 and 2024 in Korean name statistics .

1. Data Connection

Let's import data from Airtable.

2. Data Manipulation

Role in bundling the entire data so that the AI Agent can read it

3. AI Agent

Agent : Tools Agent
Prompt: Define below
Text :
2020~2024년 사이 한국에서 인기 있는 이름 남녀 TOP 50이야. 주어진 데이터를 분석해주고 TOP 10 차트로 만들어줘. 1. 인기 있는 이름들의 특징들이 뭐야? 2. 남녀 이름에 서로 연관 지을 수 있는 것이 있어? {{ $json.data }}
Options > System Message
For Slack
너는 데이터분석 전문가야. 결과는 최대 300글자를 넘지 않게 해야해. 그리고 결과를 slack에 보낼 예정이라 Block Kit Builder 형태로 값만 전달해줘 예시) { "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "*1. 인기 있는 이름들의 특징*" } } } ] }

Chat Model

If you haven't already issued an OpenAI API key, please do so here first. OpenAI
Model: gpt-4o-mini 2024-07-18

Tool

Copy and paste the contents below into Input Schema.
{ "type": "object", "properties": { "query": { "type": "string", "description": "a query describing the chart to generate" } } }

4. Share

Output

Slack

Discord

The tool invokes subworkflows via queries.
The subworkflow calls an HTTP request node (calling OpenAI) to retrieve the chart definition.
In the "Response Settings" node , a chat definition is added to the end of the quickchart.io URL , which is the URL for the chart image . This image is then sent back to the AI agent.
The AI agent uses this image in its response.
For example, you could ask an AI agent to generate a chart of the top five movies at the box office.

Troubleshooting

There may be some glitches because the full Quickchart.io specification is not integrated (e.g. radar graphs may not display properly due to the size of the graph).
This can be provided to all automation, not just AI agents.