Skip to documentation
GMail integration

Fetch Email PDF Attachments

Perform Fetch Email PDF Attachments through GMail.

View as Markdown
gmail_fetch_pdf_attachments
write

Inputs

  • message_id
    expressionrequired
    Message Id

    Required literal value or workflow expression.

  • document_type
    select
    Document Type

    Optional selected identifier or value.

    Default: "Other"

    Options: Prescription ("Prescription"), Demographics ("Demographics"), Insurance ("Insurance"), Qualifying Test ("Qualifying Test"), Physician Notes ("Physician Notes"), Other ("Other")

  • source
    text
    Source

    Optional text value.

    Default: "gmail_inbox"

  • show_documents_in_inbox
    boolean
    Show Documents In Inbox

    Optional true-or-false value.

    Default: false

  • deduplicate_by_content
    boolean
    Deduplicate By Content

    Optional true-or-false value.

    Default: false

  • content_hash_mode
    select
    Content Hash Mode

    Optional selected identifier or value.

    Default: "raw_bytes"

    Options: Raw Bytes (SHA-256) ("raw_bytes"), Content (re-encoding robust) ("content")

  • preserve_existing_stored_pdf
    boolean
    Preserve Existing Stored Pdf

    Optional true-or-false value.

    Default: false

  • document_status
    select
    Document Status

    Optional selected identifier or value.

    Default: "complete"

    Options: Complete ("complete"), Processing ("processing"), Review ("review")

  • workflow_id_override
    text
    Workflow Id Override

    Optional text value.

  • reuse_existing_document
    boolean
    Reuse Existing Document

    Optional true-or-false value.

    Default: false

  • body_field_label
    text
    Body Field Label

    Optional text value.

  • body_field_labels
    json
    Body Field Labels

    Optional JSON value.

Outputs

  • successSuccess
  • message_idMessage Id
  • document_idsDocument Ids
  • new_document_idsNew Document Ids
  • existing_document_idsExisting Document Ids
  • duplicate_countDuplicate Count
  • all_attachments_existingAll Attachments Existing
  • attachmentsAttachments
  • attachment_resultsAttachment Results
  • attachment_countAttachment Count
  • failed_countFailed Count
  • email_body_fieldEmail Body Field
  • email_body_fieldsEmail Body Fields
  • countCount
  • skippedSkipped
  • skip_reasonSkip Reason
  • errorError
  • error_messageError Message
  • error_codeError Code

Output schema completeness: best_effort_declared

Safety

External effect
write
Confirmation recommended
No
Retry safe
No
Dry run supported
No

Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

Input schema
{
  "type": "object",
  "required": [
    "message_id"
  ],
  "properties": {
    "source": {
      "type": "string",
      "default": "gmail_inbox",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "message_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "document_type": {
      "enum": [
        "Prescription",
        "Demographics",
        "Insurance",
        "Qualifying Test",
        "Physician Notes",
        "Other"
      ],
      "type": "string",
      "default": "Other",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "document_status": {
      "enum": [
        "complete",
        "processing",
        "review"
      ],
      "type": "string",
      "default": "complete",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "body_field_label": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "body_field_labels": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "content_hash_mode": {
      "enum": [
        "raw_bytes",
        "content"
      ],
      "type": "string",
      "default": "raw_bytes",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "workflow_id_override": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "deduplicate_by_content": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "reuse_existing_document": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "show_documents_in_inbox": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "preserve_existing_stored_pdf": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    }
  },
  "additionalProperties": false
}
Output schema
{
  "type": "object",
  "properties": {
    "count": {},
    "error": {},
    "skipped": {},
    "success": {},
    "error_code": {},
    "message_id": {},
    "attachments": {},
    "skip_reason": {},
    "document_ids": {},
    "failed_count": {},
    "error_message": {},
    "duplicate_count": {},
    "attachment_count": {},
    "email_body_field": {},
    "new_document_ids": {},
    "email_body_fields": {},
    "attachment_results": {},
    "existing_document_ids": {},
    "all_attachments_existing": {}
  },
  "additionalProperties": true
}
View all GMail actions