Gmail 받은편지함 관리은(는) 무엇을 하나요?
목표
통합 도구를 사용하여 여러 Gmail 계정의 이메일을 확인하고 관리합니다.
스크립트
./scripts/gmail_unified.py- 받은편지함 확인 및 관리./scripts/gmail_multi_auth.py- 계정 인증./scripts/gmail_bulk_label.py- 대량 라벨링./scripts/gmail_create_filters.py- 필터 생성./scripts/gmail_auth.py- 인증 도우미
빠른 참조
# 모든 계정의 읽지 않은 메일 확인
python3 ./scripts/gmail_unified.py --query "is:unread" --limit 50
# 특정 계정만 확인
python3 ./scripts/gmail_unified.py --query "is:unread" --account yourcompany
# 등록된 계정 목록 보기
python3 ./scripts/gmail_unified.py --accounts
# 이메일 라벨링 및 보관 처리
python3 ./scripts/gmail_unified.py --query "from:notifications@" --label "Notifications" --archive
# 읽음 표시
python3 ./scripts/gmail_unified.py --query "from:noreply@" --mark-read
# 드라이런 (미리보기)
python3 ./scripts/gmail_unified.py --query "subject:invoice" --label "Invoices" --dry-run
계정 등록부
| 계정 | 이메일 | 자격 증명 | 토큰 |
|---|---|---|---|
| youruser | [email protected] | credentials.json | token_youruser.json |
| yourcompany | [email protected] | credentials_yourcompany.json | token_yourcompany.json |
인증 오류 문제 해결
"Token file not found"
python3 ./scripts/gmail_multi_auth.py --account yourcompany --email [email protected]
"invalid_scope: Bad Request"
rm token_youruser.json
python3 ./scripts/gmail_multi_auth.py --account youruser --email [email protected]
"Failed to authenticate" 루트 디렉토리에 credentials.json 파일이 있는지 확인하세요.
필요한 범위
gmail.modify- 이메일 읽기/쓰기gmail.labels- 라벨 생성/관리gmail.settings.basic- 설정 관리spreadsheets- Google Sheets 접근drive- Google Drive 접근
자격 증명 위치
모든 자격 증명 파일은 작업 공간 루트에 있어야 합니다:
credentials.json/credentials_yourcompany.json- OAuth 클라이언트 구성token_*.json- 인증 토큰 (자동 생성)gmail_accounts.json- 계정 등록부
스키마
입력
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
query | string | 아니오 | Gmail 검색 쿼리 (예: 'is:unread') |
account | string | 아니오 | 등록부의 특정 계정 이름 |
limit | integer | 아니오 | 가져올 최대 이메일 수 (기본값: 50) |
출력
| 이름 | 유형 | 설명 |
|---|---|---|
emails | array | 제목, 발신자, 날짜, 미리보기가 포함된 이메일 객체 목록 |
자격 증명
| 이름 | 출처 |
|---|---|
credentials.json | 파일 |
token_*.json | 파일 (자동 생성) |
연계 가능한 스킬
이 스킬과 잘 연계되는 스킬: gmail-label, instantly-autoreply
비용
무료 (Gmail API)