nworks_mail_download_attachment
Download email attachments by specifying mail ID and attachment ID. Save to a local directory or receive file content directly, with support for text and base64-encoded binaries.
Instructions
메일 첨부파일을 다운로드합니다. mailId와 attachmentId는 nworks_mail_read로 조회 가능. User OAuth 인증 필요 (mail.read scope). outputDir을 지정하면 로컬에 파일로 저장하고, 미지정 시 파일 내용을 직접 반환합니다 (텍스트는 text, 바이너리는 base64). 5MB 초과 파일은 반드시 outputDir를 지정해야 합니다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailId | Yes | 메일 ID (nworks_mail_list로 조회 가능) | |
| userId | No | 대상 사용자 ID (미지정 시 me) | |
| outputDir | No | 저장 디렉토리 (지정 시 파일로 저장, 미지정 시 내용을 직접 반환) | |
| outputName | No | 저장 파일명 (미지정 시 원본 파일명) | |
| attachmentId | Yes | 첨부파일 ID (nworks_mail_read로 조회 가능) |