Data model: GmailMail

All Gmail activities use the GmailMail data model. GmailMail extends the shared Mail abstract class so that Gmail emails can be used anywhere a Mail object is expected.

This table lists the GmailMail properties:

Property Data Type Source Description
Subject String Subject header The subject of the email.
Sender String From header, email The email address of the sender.
SenderName String From header, display name The sender display name.
To List<String> To header The list of recipient email addresses.
CC List<String> Cc header The list of copied recipient email addresses.
BCC List<String> Bcc header The list of blind copied recipient email addresses.
Body String MIME payload The email body as plain text.
ReceivedTime String Date header or internalDate The date and time when the email is received.
IsUnread Boolean Label list contains UNREAD Indicates whether the email is unread.
MessageId String Gmail API message ID The unique Gmail message identifier.
Attachments List<GmailMailAttachment> MIME parts The list of attachments. Each attachment exposes AttachmentId and FileName.

These are the key characteristics and behavior of the GmailMail object and the associated data:

  • GmailMail extends the abstract Mail class and can be used as input to the Delete, Move, and Mark activities.
  • HTML email content is converted to plain text. The conversion behavior matches the HTMLToText behavior used by GraphMail.
  • Attachments are populated from MIME payload parts. Each attachment includes an Attachment ID and File Name property.

Common properties

All Gmail activities include the Continue on error property. By default, this property is set to True, enabling the workflow to continue execution if the activity encounters an error. When the property is set to False, workflow execution stops when an error occurs.

Response codes

This table lists the standard response codes returned by Gmail activities

Code Meaning
200 Success
400 Bad request, such as invalid Mail ID or label not found
500 Unexpected error
502 Invalid filter syntax for Get Gmail Emails only

Error handling

All Gmail activities use the Continue on error property to control workflow behavior when an error occurs.

  • If the Continue on error property is set to True, the activity logs the error and the workflow continues execution.
  • If this property is set to False, the activity displays an exception message and the workflow stops execution.
  • The Response code output property reflects the result of the operation regardless of the Continue on error setting
  • The Response code output property returns the result of the operation regardless of the Continue on error setting.

Authentication

Gmail activities use OAuth 2.0 authentication configured through the Infor Mastermind integration layer. The GmailService client is injected as a workflow extension, following the same integration pattern as GraphServiceClient.

  • Gmail activities do not include an Account or Shared Mailbox property.
  • The authentication configuration determines the target mailbox through user consent or service account impersonation.
  • All API requests use the users/me/ endpoint. For service accounts, me represents the impersonated user.
  • The runtime automatically refreshes access tokens through proactive timer-based refresh and on-demand expiration checks.