Outlook Webhook Payload
Outlook webhooks are sent for incoming and outgoing emails via connected Outlook/Microsoft 365 accounts.
Example payload
1 { 2 "event": { 3 "id": "evt_outlook_abc123", 4 "channel": "outlook", 5 "timestamp": 1706640000.0, 6 "data": { 7 "timestamp": 1706640000.0, 8 "direction": "inbound", 9 "platform": "outlook", 10 "email_id": "email_xyz789", 11 "message_id": "<Message-ID@outlook.com>", 12 "subject": "Re: Project proposal", 13 "body": "<html><body><p>Thanks for sending over the details...</p></body></html>", 14 "body_plain": "Thanks for sending over the details...", 15 "is_from_account": false, 16 "account_id": "acc_123", 17 "from_attendee": { 18 "display_name": "John Doe", 19 "identifier": "john@company.com", 20 "identifier_type": "EMAIL_ADDRESS" 21 }, 22 "to_attendees": [ 23 { 24 "display_name": "Your Business", 25 "identifier": "sales@yourbusiness.com", 26 "identifier_type": "EMAIL_ADDRESS" 27 } 28 ], 29 "cc_attendees": [ 30 { 31 "display_name": "Manager", 32 "identifier": "manager@company.com", 33 "identifier_type": "EMAIL_ADDRESS" 34 } 35 ], 36 "bcc_attendees": [], 37 "reply_to_attendees": [], 38 "email_event_type": "mail_received", 39 "date": 1706640000.0, 40 "read_date": null, 41 "folders": ["Inbox"], 42 "has_attachments": false, 43 "attachments": [], 44 "in_reply_to": { 45 "message_id": "<Previous-Message@outlook.com>", 46 "id": "email_prev123" 47 }, 48 "is_complete": true, 49 "origin": "external", 50 "usage_data": { 51 "prompt_tokens": 250, 52 "completion_tokens": 120, 53 "model": "gpt-4" 54 }, 55 "tools_called": [], 56 "analysis_result": { 57 "sentiment": "positive", 58 "intent": "follow_up" 59 } 60 } 61 }, 62 "lead_id": "lead_123", 63 "lead_contact": { 64 "number": "", 65 "email": "john@company.com", 66 "name": "John Doe" 67 }, 68 "business_id": "biz_456", 69 "lead_created": false 70 }
Field reference
Core fields
| Field | Type | Required | Description |
|---|---|---|---|
timestamp | float | Yes | Unix epoch timestamp |
direction | string | Yes | inbound or outbound |
platform | string | Yes | Always outlook |
email_id | string | Yes | Internal email ID |
message_id | string | Yes | RFC822 Message-ID header |
subject | string | Yes | Email subject line |
body | string | Yes | HTML email body |
is_from_account | boolean | Yes | True if sent by connected account |
account_id | string | Yes | Connected Outlook account ID |
email_event_type | string | Yes | Event type |
date | float | Yes | Server acknowledgment timestamp |
email_event_type values
| Value | Description |
|---|---|
mail_received | Incoming email |
mail_sent | Outgoing email |
from_attendee object
| Field | Type | Description |
|---|---|---|
display_name | string | Sender display name (optional) |
identifier | string | Email address |
identifier_type | string | Always EMAIL_ADDRESS |
to_attendees array
Array of recipient objects with same structure as from_attendee.
Optional fields
| Field | Type | Description |
|---|---|---|
body_plain | string | Plain text version |
cc_attendees | array | CC recipients |
bcc_attendees | array | BCC recipients |
reply_to_attendees | array | Reply-To addresses |
read_date | float | When email was read |
folders | array | Email folders |
role | string | Folder role |
has_attachments | boolean | Whether has attachments |
attachments | array | Email attachments |
in_reply_to | object | Parent email reference |
is_complete | boolean | Whether fully loaded |
tracking_id | string | Internal tracking ID |
origin | string | unipile or external |
usage_data | object | LLM token usage |
tools_called | array | Tool names executed |
analysis_result | object | AI analysis output |
appointments | array | Extracted appointments |
execution_context | object | Source trigger context |
attachments array
| Field | Type | Description |
|---|---|---|
id | string | Attachment ID |
name | string | Filename |
size | integer | Size in bytes |
mimetype | string | MIME type |
url | string | Download URL |
in_reply_to object
| Field | Type | Description |
|---|---|---|
message_id | string | Parent RFC822 Message-ID |
id | string | Parent internal ID |
Outlook and Gmail payloads share the same structure. The only difference is the platform field value.