β”‚ Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Mark Attachments

Code Activity Grooper.GPT

Marks documents for attachment to neighboring documents using configurable rules for use by Attach.

Remarks

The Mark Attachments activity analyzes each document in a Batch Folder to determine whether it should be attached to a neighboring document, such as a host or supporting document. This is accomplished by evaluating a set of configurable Attachment Rules that compare the current document to its immediate siblings (previous and next).

Overview

  • Operates at the folder scope, processing each document individually.
  • Evaluates each document against its previous and next siblings using the configured Attachment Rules.
  • Each rule defines conditions for attachment, including content types, relative position, and optional AI-driven content analysis using a large language model (LLM).
  • If a rule matches, a direction marker is set using the Attach.AttachmentDirection metadata key:
    • 1 indicates attachment to the previous sibling.
    • -1 indicates attachment to the next sibling.
    • 0 (or no marker) means no attachment.
  • The activity does not modify the document structure; it only sets markers for use by the Attach activity.

Usage Guidance

  • Run Mark Attachments on each document folder at the appropriate scope before executing Attach at the parent level.
  • Configure Attachment Rules to match your document types and attachment scenarios, using both rule-based and AI-enhanced logic as needed.
  • For AI-based rules, ensure the model, instructions, and quoting settings are properly configured.
  • Use this activity to enable intelligent grouping of documents, especially when attachments require contextual understanding beyond simple page-based heuristics.

Example

The following example demonstrates how Mark Attachments sets attachment markers for supporting documents.

Before Mark Attachments:

 Batch
  β”œβ”€πŸ“‘ Main Document
  β”œβ”€πŸ“‘ Addendum
  β”œβ”€πŸ“‘ Supporting Doc
  β””β”€πŸ“‘ Other Document
 

After Mark Attachments (markers set):

 Batch
  β”œβ”€πŸ“‘ Main Document
  β”œβ”€πŸ“‘ Addendum (Attach.AttachmentDirection = 1)
  β”œβ”€πŸ“‘ Supporting Doc (Attach.AttachmentDirection = 1)
  β””β”€πŸ“‘ Other Document
 

In this example, "Addendum" and "Supporting Doc" are marked for attachment to the previous document ("Main Document"). The actual nesting is performed by the Attach activity, which must be run immediately after Mark Attachments.

For more information, see the documentation for Attachment Rule, Attach, Batch Folder, and Batch Process.

Properties

NameTypeDescription
General
Processing Options

See Also

Used By

Notification