Skip to Content
Fluxmail

download_attachment

Get metadata and a resource link for one attachment. With inline, the result also includes the content. For a PDF, inline adds extracted text, and pages returns the text of a page range such as 201-400. The size limit is 10 MB. To keep an attachment as a file, or to get one over the limit, save it with save_attachment.

Get metadata and a resource link for one attachment. With inline, the result also includes the content. For a PDF, inline adds extracted text, and pages returns the text of a page range such as 201-400. The size limit is 10 MB. To keep an attachment as a file, or to get one over the limit, save it with save_attachment.

Permissions

Required capabilities: mail.read.

Inputs

NameRequiredTypeDetails
accountIdNostring or nullAccount to operate on. Optional when exactly one account is connected. Minimum length: 1. Maximum length: 512.
messageIdYesstringMinimum length: 1. Maximum length: 512.
attachmentIdYesstringOpaque attachment ID returned by message metadata Minimum length: 1. Maximum length: 512.
inlineNoboolean or nullNone
pagesNostring or nullPDF page or page range to read as text, such as 201-400
{
  "type": "object",
  "properties": {
    "accountId": {
      "description": "Account to operate on. Optional when exactly one account is connected.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        {
          "type": "null"
        }
      ]
    },
    "messageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "attachmentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "description": "Opaque attachment ID returned by message metadata"
    },
    "inline": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "pages": {
      "description": "PDF page or page range to read as text, such as 201-400",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[1-9]\\d{0,5}(-[1-9]\\d{0,5})?$",
          "description": "PDF page or page range to read as text, such as 201-400"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "messageId",
    "attachmentId"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false
}

Last updated

On this page