AI Agent with Gemini & Slack

AI & HCI
이메일이 오면 AI가 읽고, 판단하고, Slack으로 알린다 — 사람 손 없이.
Posted on June 26, 2026, 7:21 a.m. by SANGJIN
random_image

Built an agentic workflow that classifies incoming emails by urgency using Gemini, then automatically sends the result to Slack. The same 3-node pipeline was implemented three ways — n8n, LangChain, and LangGraph — to directly compare how each tool expresses orchestration.

The core architecture: Orchestration lives outside the Model. Gemini only judges. n8n or FastAPI controls the flow.

Key decisions:

n8n: visual node wiring on a canvas, Flask server for Python/Gemini calls

LangChain: chain = prompt | llm | parser handles the AI judgment node only

LangGraph: add_node / add_edge makes the pipeline structure explicit in code — the same concept as drawing lines between nodes in n8n

Tech: Gemini API (free tier), n8n, LangChain, LangGraph, FastAPI, Flask, Slack Webhook, Python


이메일 긴급도를 Gemini로 분류하고 결과를 Slack으로 자동 발송하는 Agentic Workflow를 구축했다. 동일한 3-노드 파이프라인을 n8n / LangChain / LangGraph 세 가지 방식으로 구현해, 각 도구가 오케스트레이션을 어떻게 표현하는지 직접 비교했다.

핵심 아키텍처: Orchestration은 Model 바깥에 있다. Gemini는 판단만 한다. 흐름은 n8n 또는 FastAPI가 쥔다.

구현별 핵심:

n8n: 캔버스에서 노드를 선으로 연결. Python/Gemini 호출은 Flask 서버 경유

LangChain: chain = prompt | llm | parser 가 AI 판단 노드 하나만 담당

LangGraph: add_node / add_edge 로 파이프라인 구조를 코드로 명시 — n8n에서 선을 그었던 것과 동일한 개념

사용 기술: Gemini API (무료 티어), n8n, LangChain, LangGraph, FastAPI, Flask, Slack Webhook, Python


Links

Github: https://github.com/SangjinKO/agent-email-llm-slack

Velog: https://velog.io/@kosang234/Gemini%EB%A1%9C-%ED%8C%90%EB%8B%A8%ED%95%98%EA%B3%A0-Slack%EC%9C%BC%EB%A1%9C-%EB%B3%B4%EB%82%B4%EB%8A%94-AI-Agent%EB%A5%BC-%EC%84%B8-%EB%B2%88-%EB%A7%8C%EB%93%A4%EB%A9%B4%EC%84%9C-%EA%B9%A8%EB%8B%AC%EC%9D%80-%EA%B2%83%EB%93%A4

Agent

Leave a Comment: