Member Junction
    Preparing search index...

    Appends content operations to an existing in-progress document. Each call creates a new section that can later be modified or removed by ID.

    Parameters:

    • Handle (required): the document handle from Create Document
    • Operations (required, JSON array): array of DocumentOperation objects Each operation has a "type" field: heading, paragraph, table, list, image, hr, pageBreak, sheet (Excel), formula (Excel)

    Output:

    • sectionIds: array of section IDs created
    • totalSections: total number of sections in the document

    Hierarchy

    • BaseFileHandlerAction
      • AddDocumentContentAction
    Index

    Constructors

    Methods

    • Get file content from various sources based on parameters Priority: FileID > FileURL > Data parameter

      Parameters

      • params: RunActionParams

        Action parameters

      • dataParamName: string

        Name of the parameter containing direct data

      • fileParamName: string = 'FileID'

        Name of the parameter containing file ID (default: 'FileID')

      • urlParamName: string = 'FileURL'

        Name of the parameter containing file URL (default: 'FileURL')

      Returns Promise<
          {
              content: string
              | Buffer;
              fileName?: string;
              mimeType?: string;
              source: "url" | "storage" | "direct";
          },
      >

      Object with content and metadata

    • Executes the action with the provided parameters.

      Parameters

      Returns Promise<ActionResultSimple>

      Promise resolving to the action result

    • Save file to MJ Storage. Uploads the content to a FileStorageAccount and creates the corresponding MJ: Files entity record.

      Parameters

      • content: string | Buffer

        File content as string or Buffer

      • fileName: string

        Name for the file

      • mimeType: string

        MIME type of the file

      • params: RunActionParams

        Action parameters (for contextUser)

      • OptionalstorageAccountName: string

        Optional: name of the storage account to use (falls back to first active)

      • OptionalstoragePath: string

        Optional: custom storage path prefix (falls back to artifacts/{date}/{uuid}/)

      Returns Promise<string>

      The ID of the newly created MJ: Files record