This guide provides examples of the Workspace Studio event objects.

Flows sends event parameters in the
common Google Workspace add-ons event object used throughout Google Workspace add-ons.
To learn more about the common event object, see
[Google Workspace add-ons event objects](https://developers.google.com/workspace/add-ons/concepts/event-objects).

The flow event object includes the following objects:

- **`workflow`**: An event detailing what happens when a flow runs, is
  created, updated, deleted, or a custom resource is requested. Depending on what
  happens, it has the following objects:

  - **`actionInvocation`**: A step runs.
  - **`resourceRetrieval`**: A custom resource gets requested from a flow.

The following table outlines which event object is populated based on what
a flow does:

| Event object | Workflow action | Workflow resource |
|---|---|---|
| `actionInvocation` | `onExecuteFunction` Called when `onExecuteFunction` is invoked on an action. | Not applicable |
| `resourceRetrieval` | Not applicable | `providerFunction` Called when the resource is requested from the workflow. |

## `actionInvocation`

The following example shows an `actionInvocation` event:

### JSON

    {
        "workflow": {
            "triggerEventSource": "TRIGGER_EVENT_SOURCE_AUTOMATED",
            "actionInvocation": {
                "inputs": {
                    "operation": {
                        "stringValues": [
                            "+"
                        ]
                    },
                    "value2": {
                        "integerValues": [
                            2
                        ]
                    },
                    "value1": {
                        "integerValues": [
                            2
                        ]
                    }
                }
            }
        },
        "userLocale": "en",
        "hostApp": "flows",
        "clientPlatform": "web",
        "commonEventObject": {
            "timeZone": {
                "offset": -14400000,
                "id": "America/New_York"
            },
            "userLocale": "en-US",
            "hostApp": "WORKFLOW",
            "platform": "WEB"
        },
        "userCountry": "US",
        "userTimezone": {
            "id": "America/New_York",
            "offSet": "-14400000"
        }
    }

## `resourceRetrieval`

The following example shows a `resourceRetrieval` event:

### JSON

    {
        "workflow": {
            "resourceRetrieval": {
                "resourceReference": {
                    "resourceType": {
                        "workflowBundleId": "workflow_bundle_id",
                        "workflowResourceDefinitionId": "workflow_resource_definition_id"
                    },
                    "resourceId": "resource_id"
                }
            }
        },
        "userLocale": "en",
        "hostApp": "flows",
        "clientPlatform": "web",
        "commonEventObject": {
            "timeZone": {
                "offset": -14400000,
                "id": "America/New_York"
            },
            "userLocale": "en-US",
            "hostApp": "WORKFLOW",
            "platform": "WEB"
        },
        "userCountry": "US",
        "userTimezone": {
            "id": "America/New_York",
            "offSet": "-14400000"
        }
    }