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.

    Accessors

    • get SupportsAudience(): boolean

      Whether this action can bound what it returns to an audience (RunActionParams.Audience): everyone besides the caller who will see its output, such as the other participants of a shared conversation.

      false by default, and the engine enforces it: when a run's audience adds a reader beyond the caller, ActionEngineServer.RunAction refuses the action with result code AUDIENCE_UNSUPPORTED, without running it. Override to return true only when the action honours the audience in full — every record, snippet and count it returns is something every reader may see (pass the audience to the search engine, check each reader's entitlement to anything it scopes by, and leave out aggregates computed before that filtering).

      Returns boolean

    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