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

# email.received

> One new email from a Gmail, Outlook or IMAP source.

```json Example theme={null}
{
  "type": "email.received",
  "provider": "gmail",
  "source_id": "2mJ8kQ4vXw9aB3cD5eF7gH1iK0L",
  "mailbox": "orders@acme.ng",
  "message": {
    "id": "18f2c1a9b7d3e4f5",
    "thread_id": "18f2c1a9b7d3e4f5",
    "label_ids": ["INBOX"],
    "internet_message_id": "<CAF=abc@mail.example.com>",
    "received_at": "2026-09-24T10:15:02Z",
    "from": { "name": "Supplier Ltd", "email": "invoices@supplier.com" },
    "to": [{ "name": "", "email": "orders@acme.ng" }],
    "cc": [],
    "reply_to": [],
    "subject": "Invoice INV-2231",
    "date": "Wed, 24 Sep 2026 11:15:00 +0100",
    "snippet": "Please find attached invoice INV-2231 for…",
    "text": "Please find attached invoice INV-2231 for September.",
    "html": "<p>Please find attached invoice INV-2231 for September.</p>",
    "attachments": [
      { "filename": "INV-2231.pdf", "mime_type": "application/pdf", "size": 48213, "attachment_id": "ANGjdJ8…" }
    ],
    "truncated": false
  }
}
```

## Fields

<ResponseField name="type" type="string" required>Always `email.received`.</ResponseField>
<ResponseField name="provider" type="string" required>`gmail`, `outlook` or `imap`.</ResponseField>
<ResponseField name="source_id" type="string" required>The source that made the event.</ResponseField>
<ResponseField name="mailbox" type="string" required>The address of the mailbox.</ResponseField>

<ResponseField name="message" type="object" required>
  The email.

  <Expandable title="message fields">
    <ResponseField name="id" type="string">The provider's message ID.</ResponseField>
    <ResponseField name="thread_id" type="string">The conversation ID.</ResponseField>
    <ResponseField name="label_ids" type="string[]">Gmail only. The message's labels.</ResponseField>
    <ResponseField name="folder_id" type="string">Outlook only. The folder ID.</ResponseField>
    <ResponseField name="internet_message_id" type="string">The `Message-ID` header.</ResponseField>
    <ResponseField name="received_at" type="string">When the mailbox got the message (RFC 3339).</ResponseField>
    <ResponseField name="from" type="object">`{ "name", "email" }`</ResponseField>
    <ResponseField name="to" type="object[]">A list of `{ "name", "email" }`.</ResponseField>
    <ResponseField name="cc" type="object[]">A list of `{ "name", "email" }`.</ResponseField>
    <ResponseField name="reply_to" type="object[]">A list of `{ "name", "email" }`.</ResponseField>
    <ResponseField name="subject" type="string">The subject.</ResponseField>
    <ResponseField name="date" type="string">The `Date` header as sent.</ResponseField>
    <ResponseField name="snippet" type="string">A short preview, up to 1 KB.</ResponseField>
    <ResponseField name="text" type="string">The plain text body.</ResponseField>
    <ResponseField name="html" type="string">The HTML body.</ResponseField>
    <ResponseField name="headers" type="object">Some message headers, when present.</ResponseField>

    <ResponseField name="attachments" type="object[]">
      A list of `{ "filename", "mime_type", "size", "attachment_id", "inline" }`. The event has attachment details, not the files.
    </ResponseField>

    <ResponseField name="web_link" type="string">Outlook only. A link that opens the message.</ResponseField>
    <ResponseField name="truncated" type="boolean">`true` when hooksnode cut the body to fit the size limit.</ResponseField>
  </Expandable>
</ResponseField>

## Size

An event is at most about 4 MiB. When an email is larger, hooksnode cuts the HTML first, then the text, and sets `truncated` to `true`. An IMAP message over 10 MiB is sent with headers only.
