Skip to main content
Activity represent the individual outgoing, incoming, or drafted email within a Thread.

Attributes

Each Activity has the following attributes:
  • id: string
  • agentId: string - The agent associated with the Activity
  • channelProvider: string - The provider of the channel (e.g., GMAIL, OUTLOOK)
  • threadId: string - The Thread associated with the Activity
  • direction: string - INBOUND for incoming emails, OUTBOUND for outgoing emails
  • externalReferenceId: string - The external system’s identifier for the Activity (e.g., Gmail message ID)
  • scheduledAt: Date - The scheduled time for the Activity
  • transcript: string - The full transcript of the Activity, including headers and body
  • status: string - The status of the Activity (e.g., DRAFTED, SCHEDULED, IN_PROGRESS, COMPLETED)
  • metadata: JSON - Additional metadata associated with the Activity
  • fromName: string - The name of the sender
  • from: string - The email address of the sender
  • to: string[] - An array of recipient email addresses
  • cc: string[] - An array of CC email addresses
  • bcc: string[] - An array of BCC email addresses
  • subject: string - The subject of the email
  • body: string - The body content of the email
  • createdAt: Date - Timestamp when the Activity was created
  • updatedAt: Date - Timestamp when the Activity was last updated

Example

{
  "id": "cdc9c789-f489-44f8-94dc-4c6b246a6b40",
  "agentId": "eaeae4eb-1438-425d-a984-c3c6d764dd29",
  "channelProvider": "GMAIL",
  "threadId": "9dd51fe2-48ae-42d0-91db-0123ea3423b5",
  "direction": "INBOUND",
  "externalReferenceId": "gmail-message-id",
  "scheduledAt": "2023-11-07T05:31:56Z",
  "transcript": "From: John Doe [[email protected]]\nSent At: 2023-11-07T05:31:56Z\nTo: [email protected]\nCC: [email protected]\nBCC: [email protected]\nSubject: Meeting Request\n\nHi there, I would like to schedule an appointment for my annual exam.",
  "status": "COMPLETED",
  "metadata": {},
  "fromName": "John Doe",
  "from": "[email protected]",
  "to": ["[email protected]"],
  "cc": ["[email protected]"],
  "bcc": ["[email protected]"],
  "subject": "Annual exam",
  "body": "Hi there, I would like to schedule an appointment for my annual exam.",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}