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 |
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 |