Member Junction
    Preparing search index...

    Smart file content retrieval action that automatically handles content extraction based on file type. Returns LLM-ready content (text for documents, base64 for images).

    This action combines file download with intelligent content extraction:

    • Text formats (txt, md, html, json, csv) → Returns plain text
    • Images (png, jpg, gif, webp) → Returns base64 for LLM vision
    • PDFs → Extracts text using pdf-parse
    • Excel files → Converts to structured JSON/CSV text
    • Word documents → Extracts text using mammoth
    • Binary files → Returns base64 with warning
    // Get PDF content (auto-extracts text)
    await runAction({
    ActionName: 'File Storage: Get File Content',
    Params: [{
    Name: 'StorageAccount',
    Value: 'Box'
    }, {
    Name: 'ObjectID',
    Value: '347751234567'
    }]
    });
    // Returns: { Format: "text", Content: "extracted text...", ExtractionMethod: "pdf-parse" }

    // Get image content (returns base64)
    await runAction({
    ActionName: 'File Storage: Get File Content',
    Params: [{
    Name: 'StorageAccount',
    Value: 'Google Drive'
    }, {
    Name: 'ObjectName',
    Value: 'screenshots/diagram.png'
    }]
    });
    // Returns: { Format: "image", Content: "base64...", ExtractionMethod: "none" }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    AuthorizesCaller: boolean

    True when the action authorizes its caller itself, so a public entry point such as the RunAction mutation may run it for an authenticated user without an MJ: Action Authorizations link. Set it only on an action that either checks an authorization the caller must hold, or reads and writes only with the caller's own permissions. Leave it false for an action that acts with more authority than its caller, or that reaches data or sends messages the caller chooses but could not otherwise reach.

    The engine reads the marker only from the class that runs, never from its parent classes. A subclass that overrides a marked action must declare the marker again.

    Methods

    • Retrieve file content with automatic extraction based on file type

      Parameters

      • params: RunActionParams

        The action parameters:

        • StorageAccount: Required - Name of the storage provider
        • ObjectName: Required if ObjectID not provided - Name/path of the object
        • ObjectID: Optional - Provider-specific object ID (bypasses path resolution)

      Returns Promise<ActionResultSimple>

      Operation result with:

      • ContentType: Original MIME type of the file
      • Format: "text" | "image" | "structured" | "binary"
      • Content: Extracted/converted content ready for LLM
      • Size: Original file size in bytes
      • ExtractionMethod: Method used ("none" | "pdf-parse" | "excel-parse" | "word-extract")
      • Warning: Optional warning for unsupported formats