# Global Workflow Object

## Global Workflow Object Structure

<details>

<summary>View an example Global Workflow Object</summary>

```json
{
  "step_1": {
    "data": {
      "totalUsers": 4,
      "averageAge": 31.25,
      "totalItemsSold": 81,
      "users": [
        {
          "name": "Alice",
          "email": "alice@example.com",
          "totalSpent": 22
        },
        {
          "name": "Bob",
          "email": "bob@example.com",
          "totalSpent": 20
        },
        {
          "name": "Charlie",
          "email": "charlie@example.com",
          "totalSpent": 24
        }
      ]
    },
    "response": {
      "message": "Received POST request",
      "contents": {
        "totalUsers": 4,
        "averageAge": 31.25,
        "totalItemsSold": 81,
        "users": [
          {
            "name": "Alice",
            "email": "alice@example.com",
            "totalSpent": 22
          },
          {
            "name": "Bob",
            "email": "bob@example.com",
            "totalSpent": 20
          },
          {
            "name": "Charlie",
            "email": "charlie@example.com",
            "totalSpent": 24
          }
        ]
      }
    }
  },
  "step_2": {
    "data": {
      "lam.result": [
        {
          "lam.workflowId": 49,
          "lam.payload": {
            "lam.queryParams": {
              "email": "alice@example.com"
            },
            "lam.body": {
              "name": "Alice",
              "email": "alice@example.com",
              "totalSpent": 22
            }
          }
        },
        {
          "lam.workflowId": 49,
          "lam.payload": {
            "lam.queryParams": {
              "email": "charlie@example.com"
            },
            "lam.body": {
              "name": "Charlie",
              "email": "charlie@example.com",
              "totalSpent": 24
            }
          }
        }
      ]
    },
    "response": {}
  }
}
```

</details>

The Global Workflow Object is tailored to keep track of data transformations and responses throughout the workflow's execution:

* **Input** (optional): Initial data input passed via [POST request ](broken://pages/NDYlc2hgJScoYlXk42FV)if the workflow starts with a flow that has no source.
* **Flow Steps**: Each flow within the workflow contributes to this object, where each step might include:
  * **Data**: This part holds the results of data transformations by the flow.
  * **Response**: Stores the output or response received from the destination API after the data is processed and sent.

## Usage and Functionality

* **Sequential Execution**: Each flow accesses and possibly modifies the Global Workflow Object, allowing subsequent flows to utilize the transformed data and responses from previous steps.
* **Conditional Logic**: The object structure supports workflows where flows can be dynamically adjusted or skipped based on conditions evaluated during the workflow execution.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.laminar.run/building-an-integration/advanced/workflows/global-workflow-object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
