> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# New Message

Triggers a workflow on every new message in a user's mailbox.

**Endpoint**: `https://gmail.googleapis.com/gmail/v1/users/{userId}/messages`

<Note>
  Workflows based on this trigger will search for new events **every minute**.
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter | Description                                                                                                                                                                                                                                                                                                                                                                                                             |
  | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Query     | Specify to filter gmail messages from the events by specific conditions (same as the Gmail messages search bar). <br />For example, from:[someuser@example.com](mailto:someuser@example.com) will limit triggered events only to messages sent from [someuser@example.com](mailto:someuser@example.com).<br />Note: Do not add any time limitations (e.g. after or before) as they will disrupt the trigger's function. |
  | User ID   | The user's email address. The special value `me` can be used to indicate the authenticated user.                                                                                                                                                                                                                                                                                                                        |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter               | Description                                                                                                                                                                                                                                                                                                                  |
  | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Delegated User Override | Perform the action on behalf of another user, overriding the delegated user defined in the connection.<br /><br />If not specified, the delegated user is the one provided in the connection.<br /><br />Has no effect when using an OAuth connection.<br /><br />NOTE: the connection details are not edited by this input. |
</div>

## Sample Event

```json theme={"dark"}
{
	"id": "1847639ebb049aee",
	"threadId": "1847639ebb049aee"
}
```
