DOCS/workflow/02_skills/skill_email_send_request.md
happybell80 9cb0145a4e docs: 01_conversation + 02_skills 워크플로우 문서 현행화 — n8n 제거, SKILL.md+executor 기준 재작성
- coldmail_ir_notification_sync: LangGraph+APScheduler 기반으로 전면 재작성
- slack_action_extractor_request: v2 IntentClassifier→executor 흐름 기준 재작성
- slack_thread_summary_request: 동일
- message_flow_v2: _format_as_robeing() 해석 단계 보완
- skill_calendar/email/news_request: SKILL.md→executor 직접 호출 기준 재작성
- skill_slack_send_message_bridge: slack_sdk 직접 호출 + skill-slack HTTP 이중 경로 기술
- slack_direct_api_send: grounding 개선 사항 반영

Refs: DOCS#8

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 07:57:58 +09:00

2.7 KiB

type, tags, last_updated
type tags last_updated
workflow
workflow
skill-email
email
executor
intent
2026-04-06

skill_email_send_request 워크플로우

목적

이메일 스킬 요청 처리. 이메일 발송(send), 조회(read), 요약(process)을 SKILL.md 기반 executor 또는 email_integration 모듈을 통해 skill-email 서비스로 전달한다.

현행 아키텍처

  • v2 경로: IntentClassifier -> executor -> SKILL_EMAIL_URL 환경변수에서 URL 해소 후 HTTP 호출
  • Slack 경로: slack/message_service.py에서 "네이버웍스 메일" 키워드 감지 시 email_integration.send_naverworks_to_slack() 직접 호출
  • email_integration: app/services/skills/email_integration.py -- Gmail/NaverWorks 멀티 프로바이더 지원

n8n webhook 브릿지는 사용하지 않는다.

흐름 (v2 메시지 경로)

사용자 발화 ("메일 확인해줘")
  -> IntentClassifier.classify()
      -- IntentResult(skill="skill-email", action="email_read", endpoint="/messages", slots={...})
  -> executor.execute()
      -- registry.resolve_url() -> SKILL_EMAIL_URL 환경변수
      -- registry.resolve_method("email_read") -> GET (SKILL.md frontmatter)
      -- GET {SKILL_EMAIL_URL}/messages (httpx, X-User-Id 헤더)
  -> _format_as_robeing() -> 응답

SKILL.md 엔드포인트 정의

action 메서드 경로
send / email_send POST /send
read / email_read GET /messages
process / email_summary POST /process

email_integration 모듈

app/services/skills/email_integration.pyEmailIntegration 클래스가 다음을 담당한다:

기능 메서드
Gmail 장착 확인 check_gmail_equipped() -- DB 직접 조회
프로바이더 결정 get_email_provider() -- 키워드 또는 DB 조회
이메일 요청 처리 process_email_request() -- skill-email HTTP 호출
NaverWorks->Slack send_naverworks_to_slack() -- 메일 조회 후 Slack 블록 전송
UUID 매핑 get_uuid_from_slack() -- AUTH_SERVER_URL 매핑 API

환경변수

변수 용도
SKILL_EMAIL_URL skill-email 서비스 베이스 URL
SKILL_SLACK_URL Slack 전송 시 사용
AUTH_SERVER_URL Slack ID -> UUID 매핑 API
INTERNAL_API_KEY skill-email 인증
SERVICE_API_KEY skill-slack 인증
POSTGRES_CONNECTION_STRING Gmail 토큰/프로바이더 DB 조회

관련 문서