Config Editor
- Schema
- Actions
- Enum Types
- Placeholder
Actions
Overview
The actions can be only be triggered in valid processing scopes:
global.*
: Globally available, can be placed anywhere in the configuration.thread.*
: Run in the context of a thread (includesmessage
andattachment
context).message.*
: Run in the context of a message (includesattachment
context).attachment.*
: Run in the context of an attachment.
Attachment Actions
attachment.extractText
Extract text from an attachment into a Google Docs file or for further processing.
Supported file types: GIF, JPEG, PDF, PNG
Arguments | Type | Description |
---|---|---|
docsFileLocation | string | The location of the (temporary) Google Docs file containing the extracted OCR text, in case it should be stored in addition to further processing. Supports placeholder substitution. Default: (unset) |
extract | string | A regular expression that defines which values should be extracted. It is recommended to use the named group syntax (?<name>...) to reference the extracted values using names like {{attachment.extracted.name}} . |
language | string | Hints at the language to use for OCR. Valid values are BCP 47 codes. Default: (unset, auto-detects the language) |
attachment.noop
Do nothing (no operation). Used for testing.
This action takes no arguments.
attachment.store
Store an attachment to a Google Drive location.
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
attachment.storeDecryptedPdf
Decrypt a PDF attachment and store it to a Google Drive location.
NOTE: PDF decryption is done in an asynchronous process which causes
some limitations (failure detection, logs will appear later mixed with
other actions).
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
password | string | The password to be used for PDF decryption. |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
Global Actions
global.log
Create a log entry.
Arguments | Type | Description |
---|---|---|
level | LogLevel | The level of the log message (default: info ). See Enum Type LogLevel for valid values. |
location | string | The location of the log message |
message | string | The message to be logged. |
global.noop
Do nothing (no operation). Used for testing.
This action takes no arguments.
global.panic
Terminate processing due to an error.
Arguments | Type | Description |
---|---|---|
level | LogLevel | The level of the log message (default: info ). See Enum Type LogLevel for valid values. |
location | string | The location of the log message |
message | string | The message to be logged. |
global.sheetLog
Create a log entry in the log spreadsheet.
Arguments | Type | Description |
---|---|---|
level | LogLevel | The level of the log message (default: info ). See Enum Type LogLevel for valid values. |
location | string | The location of the log message |
message | string | The message to be logged. |
Message Actions
message.exportAsHtml
Export a message as HTML document and store it to a GDrive location.
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
embedAttachments | boolean | Embed attachments (default: true ) |
embedAvatar | boolean | Embed an avatar (from Gravatar) of the sender (default: true ) |
embedInlineImages | boolean | Embed inline images (default: true ) |
embedRemoteImages | boolean | Embed remote images (default: true ) |
includeAttachments | boolean | Include attachments (default: true ) |
includeHeader | boolean | Include the message header (default: true ) |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
width | number | The width (in px) of the message (default: 700 ) |
message.exportAsPdf
Export a message as PDF document and store it to a GDrive location.
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
embedAttachments | boolean | Embed attachments (default: true ) |
embedAvatar | boolean | Embed an avatar (from Gravatar) of the sender (default: true ) |
embedInlineImages | boolean | Embed inline images (default: true ) |
embedRemoteImages | boolean | Embed remote images (default: true ) |
includeAttachments | boolean | Include attachments (default: true ) |
includeHeader | boolean | Include the message header (default: true ) |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
width | number | The width (in px) of the message (default: 700 ) |
message.forward
Forwards this message.
Arguments | Type | Description |
---|---|---|
to | string | The recipient of the forwarded message. |
message.markRead
Marks the message as read.
This action takes no arguments.
message.markUnread
Marks the message as unread.
This action takes no arguments.
message.moveToTrash
Moves the message to the trash.
This action takes no arguments.
message.noop
Do nothing (no operation). Used for testing.
This action takes no arguments.
message.star
Adds a star to a message.
This action takes no arguments.
message.storeFromURL
Store a document referenced by a URL contained in the message body to GDrive.
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
headers | Record<string,string> | The header to pass to the URL. May be used to pass an authentication token. Supports placeholder substitution. |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
url | string | The URL of the document to be stored. To extract the URL from the message body use a message body matcher like "(?<url>https://...)" and "{{message.body.match.url}}" as the URL value.NOTE: Take care to narrow down the regex as good as possible to extract valid URLs. Use tools like regex101.com for testing on example messages. |
message.storePDF
Generate a PDF document from the message and store it to GDrive.
DEPRECATED: Use message.exportAsPdf
instead.
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
skipHeader | boolean | Skip the header if true . |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
message.unstar
Removes the star from a message.
This action takes no arguments.
Thread Actions
thread.addLabel
Add a label to the thread.
Arguments | Type | Description |
---|---|---|
name | string | The name of the label. |
thread.exportAsHtml
Export a thread as HTML document and store it to a GDrive location.
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
embedAttachments | boolean | Embed attachments (default: true ) |
embedAvatar | boolean | Embed an avatar (from Gravatar) of the sender (default: true ) |
embedInlineImages | boolean | Embed inline images (default: true ) |
embedRemoteImages | boolean | Embed remote images (default: true ) |
includeAttachments | boolean | Include attachments (default: true ) |
includeHeader | boolean | Include the message header (default: true ) |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
width | number | The width (in px) of the message (default: 700 ) |
thread.exportAsPdf
Export a thread as PDF document and store it to a GDrive location.
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
embedAttachments | boolean | Embed attachments (default: true ) |
embedAvatar | boolean | Embed an avatar (from Gravatar) of the sender (default: true ) |
embedInlineImages | boolean | Embed inline images (default: true ) |
embedRemoteImages | boolean | Embed remote images (default: true ) |
includeAttachments | boolean | Include attachments (default: true ) |
includeHeader | boolean | Include the message header (default: true ) |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
width | number | The width (in px) of the message (default: 700 ) |
thread.markImportant
Mark the thread as important.
This action takes no arguments.
thread.markRead
Mark the thread as read.
This action takes no arguments.
thread.markUnimportant
Mark the thread as unimportant.
This action takes no arguments.
thread.markUnread
Mark the thread as unread.
This action takes no arguments.
thread.moveToArchive
Move the thread to the archive.
This action takes no arguments.
thread.moveToInbox
Move the thread to the inbox.
This action takes no arguments.
thread.moveToSpam
Move the thread to spam.
This action takes no arguments.
thread.moveToTrash
Move the thread to trash.
This action takes no arguments.
thread.noop
Do nothing (no operation). Used for testing.
This action takes no arguments.
thread.removeLabel
Remove a label from the thread.
Arguments | Type | Description |
---|---|---|
name | string | The name of the label. |
thread.storePDF
Generate a PDF document for the whole thread and store it to GDrive.
DEPRECATED: Use thread.exportAsPdf
instead.
Arguments | Type | Description |
---|---|---|
conflictStrategy | ConflictStrategy | The strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values. |
description | string | The description to be attached to the Google Drive file. Supports placeholder substitution. |
location | string | The location (path + filename) of the Google Drive file. For shared folders or Team Drives prepend the location with the folder ID like {id:<folderId>}/... .Supports placeholder substitution. |
skipHeader | boolean | Skip the header if true . |
toMimeType | string | Convert to a Google file type using one of the supported mime-types by Google Drive, like: * application/vnd.google-apps.document : Google Docs* application/vnd.google-apps.presentation : Google Slides* application/vnd.google-apps.spreadsheet : Google Sheets |
Enum Types
These are the supported enum types with their keys (only used for development) and values that can be used in the configuration.
AttachmentOrderField
Represents an attachment field to be ordered by for processing.
Key | Value | Description |
---|---|---|
CONTENT_TYPE | contentType | Order by the content type of the attachment. |
HASH | hash | Order by the hash of the attachment. |
NAME | name | Order by the name of the attachment. |
ConflictStrategy
Strategy that defines how to deal in case of conflicts with already existing files at the desired location in Google Drive.
Key | Value | Description |
---|---|---|
BACKUP | backup | Create a backup of the existing file by renaming it. |
ERROR | error | Terminate processing with an error. |
KEEP | keep | Keep the existing file and create the new one with the same name. |
REPLACE | replace | Replace the existing file with the new one. |
SKIP | skip | Skip creating the new file and keep the existing one. |
UPDATE | update | Update the existing file with the contents of the new one (keep it's file ID). |
ContextType
A type of context.
Key | Value | Description |
---|---|---|
ATTACHMENT | attachment | A context holding the attachment configuration and information about the currently processed attachment. |
ENV | env | A context holding all environment information and references to environment objects. |
MESSAGE | message | A context holding the message configuration and information about the currently processed message. |
PROCESSING | proc | A context holding all processing information like the configuration, integration adapters, action registry and timer. |
THREAD | thread | A context holding the thread configuration and information about the currently processed thread. |
E2EStatus
Status of end-to-end tests
Key | Value | Description |
---|---|---|
ERROR | error | An end-to-end test produced an error while executing. |
FAILED | failed | The end-to-end test failed. |
SKIPPED | skipped | The end-to-end test has been skipped. |
SUCCESS | success | The end-to-end test was successful. |
LogLevel
Levels of log messages used for marking and filtering.
Key | Value | Description |
---|---|---|
DEBUG | debug | Log level for debugging messages. |
ERROR | error | Log level for error messages. |
INFO | info | Log level for info messages. |
TRACE | trace | Log level for execution tracing |
WARN | warn | Log level for warning messages. |
LogRedactionMode
Specifies how sensitive data should be redacted for logging.
Key | Value | Description |
---|---|---|
ALL | all | Redact all possibly sensitive data |
AUTO | auto | Automatically detect sensitive data to be redacted |
NONE | none | Do not redact sensitive data at all. |
MarkProcessedMethod
The method to mark processed threads/messages/attachments.
Key | Value | Description |
---|---|---|
ADD_THREAD_LABEL | add-label | Adds the label defined in the setting markProcessedLabel to each processed thread.NOTE: - Automatically appends the action thread.addLabel to the list of global thread actions- Automatically appends -label:<markProcessedLabel> to the global thread match query configLimitations: - It cannot handle multiple messages per thread properly. |
CUSTOM | custom | Doesn't do anything to mark threads, messages or attachments as processed and leaves this task to the user. NOTE: - Use actions on the desired level (threads, messages or attachments) to mark them as processed. - Take care to exclude them from queries in the thread match config, to prevent re-processing over and over again. Limitations: - Is more complex since you have to take care to |
MARK_MESSAGE_READ | mark-read | Marks processed messages as read, which is more flexible than adding a thread label. But it comes at the cost of marking messages as read, which may not be expected. NOTE: - Automatically appends the action message.markRead to the list of global message actions- Automatically appends -is:read to the global thread match query config- Automatically adds is: ["unread"] to the global message match configLimitations: - Since it marks messages as read it may not be applicable in all cases. |
MessageFlag
A flag to match messages with certain properties.
Key | Value | Description |
---|---|---|
READ | read | Matches read messages. |
STARRED | starred | Matches starred messages. |
UNREAD | unread | Matches unread messages. |
UNSTARRED | unstarred | Matches un-starred messages. |
MessageOrderField
Represents a message field to be ordered by for processing.
Key | Value | Description |
---|---|---|
DATE | date | Order by the date of the message. |
FROM | from | Order by the sender of the message. |
ID | id | Order by the ID of the message. |
SUBJECT | subject | Order by the subject of the message. |
MetaInfoType
The type of meta information used for context substitution placeholders.
Key | Value | Description |
---|---|---|
BOOLEAN | boolean | Boolean type substituted to true or false . |
DATE | date | Date/time type. For substitution a format string can be given using ${<placeholder>:date:<expression>:<format>} . |
NUMBER | number | A numeric data type. |
STRING | string | A string data type. |
VARIABLE | variable | A custom configuration variable. |
OrderDirection
Represents the direction a list should be ordered.
Key | Value | Description |
---|---|---|
ASC | asc | Order ascending. |
DESC | desc | Order descending. |
ProcessingStage
The stage of action processing
Key | Value | Description |
---|---|---|
MAIN | main | The stage during processing the main object (thread, message, attachment) |
POST_MAIN | post-main | The stage after processing the main object (thread, message, attachment) |
PRE_MAIN | pre-main | The stage before processing the main object (thread, message, attachment) |
ProcessingStatus
The result status of processing a config or an action.
Key | Value | Description |
---|---|---|
ERROR | error | An error has occurred. |
OK | ok | The processing was successful. |
RunMode
The runtime mode in which processing takes place.
Key | Value | Description |
---|---|---|
DANGEROUS | dangerous | This run-mode will execute all configured actions including possibly destructive actions like overwriting files or removing threads or messages. ATTENTION: Use this only if you know exactly what you're doing and won't complain if something goes wrong! |
DRY_RUN | dry-run | This run-mode skips execution of writing actions. Use this for testing config changes or library upgrades. |
SAFE_MODE | safe-mode | This run-mode can be used for normal operation but will skip possibly destructive actions like overwriting files or removing threads or messages. |
ThreadOrderField
Represents a thread field to be ordered by for processing.
Key | Value | Description |
---|---|---|
FIRST_MESSAGE_SUBJECT | firstMessageSubject | Order by the subject of the first message in the thread. |
ID | id | Order by the ID of the thread. |
LAST_MESSAGE_DATE | lastMessageDate | Order by the date of the last message in the thread. |
Placeholder
The placeholder in the following table are available for substitution in strings, depending on the scope which are defined as follows:
Environment Placeholder
These placeholder are valid globally and can also be used for internal purposes before processing starts (e.g. during adapter initialization).
Key | Title | Description | Example |
---|---|---|---|
date.now | Current Timestamp | The current timestamp. Use "${<key>:date::<format>}" to format the date/time using a custom date-fns format strings (default: "yyyy-MM-dd HH:mm:ss" ). | "2023-06-26 09:00:00" |
env.runMode | Runmode | The runMode used for processing. | "safe-mode" |
env.timezone | Timezone | The timezone used for processing. | "Etc/UTC" |
lib.description | Library Description | The description of the Gmail Processor library. | "__PACKAGE_DESCRIPTION__" |
lib.name | Library Name | The name of the Gmail Processor library. | "__PACKAGE_NAME__" |
lib.version | Library Version | The version of the Gmail Processor library. | "__PACKAGE_VERSION__" |
user.email | User Email | The email address of the active user. | "my.email@gmail.com" |
Processing Placeholder
These placeholder are valid globally during any processing phase.
Key | Title | Description | Example |
---|---|---|---|
timer.startTime | Timer Start Time | The start timestamp of the processing script. Use "${<key>:date::<format>}" to format the date/time using a custom date-fns format strings (default: "yyyy-MM-dd HH:mm:ss" ). | "2023-06-26 09:00:00" |
variables.customVar | Variable customVar | A custom defined variable. Custom variables defined at global.variables to better manage recurring substitution values. | "Custom value" |
Thread Placeholder
These placeholder are valid during processing a GMail thread and matching messages + attachments.
Key | Title | Description | Example |
---|---|---|---|
thread.firstMessageSubject | Thread Subject | The subject of the first message in the thread. See GmailThread.getFirstMessageSubject() reference docs. | "Message Subject 1" |
thread.hasStarredMessages | Starred Messages | true if the thread has any starred messages. See GmailThread.hasStarredMessages() reference docs. | "false" |
thread.id | Thread ID | The ID of the thread. See GmailThread.getId() reference docs. | "threadId123" |
thread.index | Thread Index | The index number (0-based) of the thread. | "0" |
thread.isImportant | Important Thread | true if the thread is marked as important. See GmailThread.isImportant() reference docs. | "false" |
thread.isInChats | Chat Thread | true if the thread is labeled a chat. See GmailThread.isInChats() reference docs. | "false" |
thread.isInInbox | Inbox Thread | true if the thread is in the inbox. See GmailThread.isInInbox() reference docs. | "true" |
thread.isInPriorityInbox | Priority Inbox Thread | true if the thread is in the priority inbox. See GmailThread.isInPriorityInbox() reference docs. | "false" |
thread.isInSpam | Spam Thread | true if the thread is marked as spam. See GmailThread.isInSpam() reference docs. | "false" |
thread.isInTrash | Trash Thread | true if the thread is marked as spam. See GmailThread.isInTrash() reference docs. | "false" |
thread.isUnread | Unread Thread | true if the thread has any unread messages. See GmailThread.isUnread() reference docs. | "true" |
thread.labels | Thread Labels | The user-created labels on the thread. See GmailThread.getLabels() reference docs. | "" |
thread.lastMessageDate | Thread Date | The date of the thread's most recent message. See GmailThread.getLastMessageDate() reference docs. Use "${<key>:date::<format>}" to format the date/time using a custom date-fns format strings (default: "yyyy-MM-dd HH:mm:ss" ). | "2019-05-02 07:15:28" |
thread.matched | thread Regex Matches | The overall matching result for all conditions in the match config. | "true" |
thread.messageCount | Thread Message Count | The number of messages in the thread. See GmailThread.getMessageCount() reference docs. | "2" |
thread.permalink | Thread Permalink | The permalink for the thread. See GmailThread.getPermalink() reference docs. | "some-permalink-url" |
thread.url | Thread URL | The URL of the thread. | "https://mail.google.com/mail/u/... |
threadConfig.index | Thread Config Index | The index number (0-based) of the thead config. | "0" |
Message Placeholder
These placeholder are valid during processing a GMail message and matching attachments.
Key | Title | Description | Example |
---|---|---|---|
message.bcc | Message BCC | The comma-separated recipients bcc'd on the message. See GmailMessage.getBcc() reference docs. | "message-bcc@example.com" |
message.body | Message Body | The body of the message. See GmailMessage.getBody() reference docs. | "<p>Message body with contained ... |
message.body.match.1 | message.body Regex Match Group 1 | The matching regex group number as defined in the match config (e.g.: "(?<url>https://raw\\.githubusercontent\\.com/ahochsteger/gmail-processor/main/src/e2e-test/files/(?<filename>[0-9A-Za-z_-]+\\.txt))" ). | "https://raw.githubusercontent.c... |
message.body.match.2 | message.body Regex Match Group 2 | The matching regex group number as defined in the match config (e.g.: "(?<url>https://raw\\.githubusercontent\\.com/ahochsteger/gmail-processor/main/src/e2e-test/files/(?<filename>[0-9A-Za-z_-]+\\.txt))" ). | "plain-text-from-repo.txt" |
message.body.match.filename | message.body Regex Match Group filename | The matching named regex group name as defined in the match config (e.g.: "(?<url>https://raw\\.githubusercontent\\.com/ahochsteger/gmail-processor/main/src/e2e-test/files/(?<filename>[0-9A-Za-z_-]+\\.txt))" ). | "plain-text-from-repo.txt" |
message.body.match.url | message.body Regex Match Group url | The matching named regex group name as defined in the match config (e.g.: "(?<url>https://raw\\.githubusercontent\\.com/ahochsteger/gmail-processor/main/src/e2e-test/files/(?<filename>[0-9A-Za-z_-]+\\.txt))" ). | "https://raw.githubusercontent.c... |
message.cc | Message CC | The comma-separated recipients cc'd on the message. See GmailMessage.getCc() reference docs. | "message-cc@example.com" |
message.date | Message Date | The date and time of the message. See GmailMessage.getDate() reference docs. Use "${<key>:date::<format>}" to format the date/time using a custom date-fns format strings (default: "yyyy-MM-dd HH:mm:ss" ). | "2019-05-02 07:15:28" |
message.from | Sender | The sender of the message. See GmailMessage.getFrom() reference docs. | "message-from@example.com" |
message.from.domain | Sender Domain | The sender domain of the message. See GmailMessage.getFrom() reference docs. | "example.com" |
message.from.match.1 | message.from Regex Match Group 1 | The matching regex group number as defined in the match config (e.g.: "(.+)@example.com" ). | "message-from" |
message.id | Message ID | The ID of the message. See GmailMessage.getId() reference docs. | "message-id" |
message.index | Message Index | The index number (0-based) of the message. | "0" |
message.isDraft | Draft Message | true if the message is a draft. See GmailMessage.isDraft() reference docs. | "false" |
message.isInChats | Chat Message | true if the message is a chat. See GmailMessage.isInChats() reference docs. | "false" |
message.isInInbox | Inbox Message | true if the message is in the inbox. See GmailMessage.isInInbox() reference docs. | "true" |
message.isInPriorityInbox | Priority Inbox Message | true if if the message is in the priority inbox. See GmailMessage.isInPriorityInbox() reference docs. | "false" |
message.isInTrash | Trash Message | true if the message is in the trash. See GmailMessage.isInTrash() reference docs. | "false" |
message.isStarred | Starred Message | true if the message is starred. See GmailMessage.isStarred() reference docs. | "false" |
message.isUnread | Unread Message | true if the message is unread. See GmailMessage.isUnread() reference docs. | "true" |
message.matched | message Regex Matches | The overall matching result for all conditions in the match config. | "true" |
message.plainBody | Message Plain Body | The plain body of the message. See GmailMessage.getPlainBody() reference docs. | "" |
message.rawHeaders | Message Raw Headers | The raw headers of the message. See GmailMessage.getRawContent() reference docs. | "Date: Thu, 02 May 2019 07:15:28... |
message.replyTo | Message Reply To | The reply-to address of the message (usually the sender). See GmailMessage.getReplyTo() reference docs. | "message-reply-to@example.com" |
message.subject | Message Subject | The subject of the message. See GmailMessage.getSubject() reference docs. | "Message Subject 1" |
message.subject.match.1 | message.subject Regex Match Group 1 | The matching regex group number as defined in the match config (e.g.: "Message (?<myMatchGroup>.*)" ). | "Subject 1" |
message.subject.match.myMatchGroup | message.subject Regex Match Group myMatchGroup | The matching named regex group name as defined in the match config (e.g.: "Message (?<myMatchGroup>.*)" ). | "Subject 1" |
message.to | Message To | The comma-separated recipients of the message. See GmailMessage.getTo() reference docs. | "message-to@example.com" |
message.url | Message URL | The URL of the message. | "https://mail.google.com/mail/u/... |
messageConfig.index | Message Config Index | The index number (0-based) of the message config. | "0" |
Attachment Placeholder
These placeholder are valid during processing a GMail attachment.
Key | Title | Description | Example |
---|---|---|---|
attachment.contentType | Attachment Content Type | The content type of the attachment. See GmailAttachment.getContentType() reference docs. | "application/pdf" |
attachment.contentType.match.1 | attachment.contentType Regex Match Group 1 | The matching regex group number as defined in the match config (e.g.: "application/(?<appType>.*)" ). | "pdf" |
attachment.contentType.match.appType | attachment.contentType Regex Match Group appType | The matching named regex group name as defined in the match config (e.g.: "application/(?<appType>.*)" ). | "pdf" |
attachment.hash | Attachment Hash | The SHA1 content hash for the attachment. See GmailAttachment.getHash() reference docs. | "aa0b8cc192a5d8d5b5d8ecda24fd096... |
attachment.index | Attachment Index | The index number (0-based) of the attachment. | "0" |
attachment.isGoogleType | Google Type Attachment | true if this attachment is a Google Workspace file (Sheets, Docs, etc.). See GmailAttachment.isGoogleType() reference docs. | "false" |
attachment.matched | attachment Regex Matches | The overall matching result for all conditions in the match config. | "true" |
attachment.name | Attachment Name | The name of the attachment. See GmailAttachment.getName() reference docs. | "attachment1.pdf" |
attachment.name.match.1 | attachment.name Regex Match Group 1 | The matching regex group number as defined in the match config (e.g.: "attachment(?<attNr>[0-9]+)\\.pdf" ). | "1" |
attachment.name.match.attNr | attachment.name Regex Match Group attNr | The matching named regex group name as defined in the match config (e.g.: "attachment(?<attNr>[0-9]+)\\.pdf" ). | "1" |
attachment.size | Attachment Size | The size of the attachment. See GmailAttachment.getSize() reference docs. | "18" |
attachmentConfig.index | Attachment Config Index | The index number (0-based) of the attachment config. | "0" |
Action Placeholder
These placeholder are valid after certain actions have been executed.
Key | Title | Description | Example |
---|---|---|---|
attachment.docsFile.stored.downloadUrl | Stored Download URL | The download URL of the stored OCR docs file (using action attachment.extractText ) | "" |
attachment.docsFile.stored.id | Stored ID | The ID of the stored OCR docs file (using action attachment.extractText ) | "created-docs-file-id" |
attachment.docsFile.stored.location | Stored Location | The location of the stored OCR docs file (using action attachment.extractText ) | "created-docs-file" |
attachment.docsFile.stored.url | Stored URL | The URL of the stored OCR docs file (using action attachment.extractText ) | "" |
attachment.extracted | Extracted Text | The extracted text from the attachment (using action attachment.extractText ) | "...\nInvoice date: 2024-03-13\n... |
attachment.extracted.match.1 | attachment.extracted Regex Match Group 1 | The matching regex group number as defined in the match config (e.g.: "Invoice date:\\s*(?<invoiceDate>[0-9-]+)\\s*Invoice number:\\s*(?<invoiceNumber>[0-9]+)" ). | "2024-03-13" |
attachment.extracted.match.2 | attachment.extracted Regex Match Group 2 | The matching regex group number as defined in the match config (e.g.: "Invoice date:\\s*(?<invoiceDate>[0-9-]+)\\s*Invoice number:\\s*(?<invoiceNumber>[0-9]+)" ). | "12345678" |
attachment.extracted.match.invoiceDate | attachment.extracted Regex Match Group invoiceDate | The matching named regex group name as defined in the match config (e.g.: "Invoice date:\\s*(?<invoiceDate>[0-9-]+)\\s*Invoice number:\\s*(?<invoiceNumber>[0-9]+)" ). | "2024-03-13" |
attachment.extracted.match.invoiceNumber | attachment.extracted Regex Match Group invoiceNumber | The matching named regex group name as defined in the match config (e.g.: "Invoice date:\\s*(?<invoiceDate>[0-9-]+)\\s*Invoice number:\\s*(?<invoiceNumber>[0-9]+)" ). | "12345678" |
Date Expressions
These are the supported date expressions that can be used in date
substitutions like {{message.date|offsetDate('lastDayOfMonth-2d')|formatDate('yyyy-MM-dd HH:mm:ss')}}
.