# Collect Recent Loop Results (Cross-Run)

> Perform Collect Recent Loop Results (Cross-Run) through GenHealth.

Source: [https://genhealth.ai/docs/workflows/integrations/gen-health/collect_recent_loop_results](https://genhealth.ai/docs/workflows/integrations/gen-health/collect_recent_loop_results)

Integration: [GenHealth](https://genhealth.ai/docs/workflows/integrations/gen-health.md)

- Handler: `collect_recent_loop_results`

## Inputs

- `source_workflow_definition_id` — Source Workflow Definition Id (workflow_select)
  Optional selected identifier or value.
- `loop_node_id` — Loop Node Id (text)
  Optional text value.
- `collection_mode` — Collection Mode (select)
  Optional selected identifier or value.
  Default: `"finished_runs"`
  Options: Finished runs (legacy) ("finished_runs"), All started runs (normalized audit) ("normalized_all_started_runs")
- `report_day` — Report Day (text)
  Optional text value.
  Default: `"today"`
- `window_hours` — Window Hours (select)
  Optional selected identifier or value.
  Options: Full calendar day (""), Every hour ("1"), Every 2 hours ("2"), Every 3 hours ("3"), Every 4 hours ("4"), Every 6 hours ("6"), Every 8 hours ("8"), Every 12 hours ("12")
- `timezone` — Timezone (text)
  Optional text value.
  Default: `"UTC"`
- `auto_rollover_hour` — Auto Rollover Hour (number)
  Optional numeric value.
  Default: `2`
- `replay_mutable_runs` — Replay Mutable Runs (boolean)
  Optional true-or-false value.
  Default: `false`
- `result_node_ids` — Result Node Ids (text)
  Optional text value.
- `result_field_projection` — Result Field Projection (json)
  Optional JSON value.
- `compact_result_node_ids` — Compact Result Node Ids (text)
  Optional text value.
- `item_field_projection` — Item Field Projection (json)
  Optional JSON value.
- `max_iterations` — Max Iterations (number)
  Optional numeric value.
  Default: `2000`
- `max_output_bytes` — Max Output Bytes (number)
  Optional numeric value.
  Default: `3500000`

## Outputs

- `success` — Success
- `iterations` — Iterations
- `iteration_count` — Iteration Count
- `iterations_omitted` — Iterations Omitted
- `run_count` — Run Count
- `runs_in_window` — Runs In Window
- `runs_selected` — Runs Selected
- `runs_truncated` — Runs Truncated
- `runs_by_status` — Runs By Status
- `collection_mode` — Collection Mode
- `window_basis` — Window Basis
- `run_status_scope` — Run Status Scope
- `storage_source` — Storage Source
- `transaction_isolation` — Transaction Isolation
- `transaction_read_only` — Transaction Read Only
- `audit_scope_complete` — Audit Scope Complete
- `completed_run_count` — Completed Run Count
- `replay_mutable_runs_applied` — Replay Mutable Runs Applied
- `run_selection_scope` — Run Selection Scope
- `result_node_ids` — Result Node Ids
- `result_node_ids_applied` — Result Node Ids Applied
- `selected_result_node_count` — Selected Result Node Count
- `result_field_projection` — Result Field Projection
- `result_field_projection_applied` — Result Field Projection Applied
- `compact_result_node_ids` — Compact Result Node Ids
- `compact_result_node_ids_applied` — Compact Result Node Ids Applied
- `item_field_projection` — Item Field Projection
- `item_field_projection_applied` — Item Field Projection Applied
- `max_output_bytes` — Max Output Bytes
- `report_day` — Report Day
- `report_day_us` — Report Day Us
- `timezone` — Timezone
- `window_start` — Window Start
- `window_end` — Window End
- `window_closed` — Window Closed
- `window_id` — Window Id
- `window_label` — Window Label
- `truncated` — Truncated
- `error` — Error

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

```json
{
  "type": "object",
  "properties": {
    "timezone": {
      "type": "string",
      "default": "UTC",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "report_day": {
      "type": "string",
      "default": "today",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "loop_node_id": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "window_hours": {
      "enum": [
        "",
        "1",
        "2",
        "3",
        "4",
        "6",
        "8",
        "12"
      ],
      "type": "string",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "max_iterations": {
      "type": "number",
      "default": 2000,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "collection_mode": {
      "enum": [
        "finished_runs",
        "normalized_all_started_runs"
      ],
      "type": "string",
      "default": "finished_runs",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "result_node_ids": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "max_output_bytes": {
      "type": "number",
      "default": 3500000,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "auto_rollover_hour": {
      "type": "number",
      "default": 2,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "replay_mutable_runs": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "item_field_projection": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "compact_result_node_ids": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "result_field_projection": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "source_workflow_definition_id": {
      "type": "string",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "workflow_select"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "timezone": {},
    "run_count": {},
    "truncated": {},
    "window_id": {},
    "iterations": {},
    "report_day": {},
    "window_end": {},
    "window_basis": {},
    "window_label": {},
    "window_start": {},
    "report_day_us": {},
    "runs_selected": {},
    "window_closed": {},
    "runs_by_status": {},
    "runs_in_window": {},
    "runs_truncated": {},
    "storage_source": {},
    "collection_mode": {},
    "iteration_count": {},
    "result_node_ids": {},
    "max_output_bytes": {},
    "run_status_scope": {},
    "iterations_omitted": {},
    "completed_run_count": {},
    "run_selection_scope": {},
    "audit_scope_complete": {},
    "item_field_projection": {},
    "transaction_isolation": {},
    "transaction_read_only": {},
    "compact_result_node_ids": {},
    "result_field_projection": {},
    "result_node_ids_applied": {},
    "selected_result_node_count": {},
    "replay_mutable_runs_applied": {},
    "item_field_projection_applied": {},
    "compact_result_node_ids_applied": {},
    "result_field_projection_applied": {}
  },
  "additionalProperties": true
}
```
