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

# New Email

Triggers when new mail is found in your Gmail inbox

## Input

| Property    | Type             | Required | Description                        |
| ----------- | ---------------- | -------- | ---------------------------------- |
| subject     | SHORT\_TEXT      | No       | The email subject                  |
| fromAddress | SHORT\_TEXT      | No       | The address sending the new mail   |
| to          | SHORT\_TEXT      | No       | The address receiving the new mail |
| label       | DROPDOWN         | No       | The label tagged to the mail       |
| category    | STATIC\_DROPDOWN | No       | category of the mail               |

## Sample Output

```json theme={null}
{
  "message": {
    "id": "183baac18543bef8",
    "threadId": "183baac18543bef8",
    "labelIds": [
      "UNREAD",
      "CATEGORY_SOCIAL",
      "INBOX"
    ],
    "snippet": "",
    "payload": {
      "partId": "",
      "mimeType": "multipart/alternative",
      "filename": "",
      "body": {
        "size": 0
      }
    },
    "sizeEstimate": 107643,
    "historyId": "99742",
    "internalDate": "1665284181000"
  },
  "body_html": "<div dir=\"ltr\">Hello World</div>",
  "body_plain": "Hello World",
  "subject": "Hello World",
  "thread": {
    "id": "382baac18543beg8",
    "historyId": "183baac185",
    "messages": [
      {
        "id": "183baac18543bef8",
        "threadId": "382baac18543beg8",
        "labelIds": [
          "UNREAD",
          "CATEGORY_SOCIAL",
          "INBOX"
        ],
        "snippet": "",
        "payload": {
          "partId": "",
          "mimeType": "multipart/alternative",
          "filename": "",
          "body": {
            "size": 0
          }
        },
        "sizeEstimate": 107643,
        "historyId": "99742",
        "internalDate": "1665284181000"
      }
    ]
  }
}
```
