Skip to main content

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 (includes message and attachment context).
  • message.*: Run in the context of a message (includes attachment 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

ArgumentsTypeDescription
docsFileLocationstringThe 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)
extractstringA 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}}.
languagestringHints 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.

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
toMimeTypestringConvert 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).

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
passwordstringThe password to be used for PDF decryption.
toMimeTypestringConvert 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.

ArgumentsTypeDescription
levelLogLevelThe level of the log message (default: info). See Enum Type LogLevel for valid values.
locationstringThe location of the log message
messagestringThe 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.

ArgumentsTypeDescription
levelLogLevelThe level of the log message (default: info). See Enum Type LogLevel for valid values.
locationstringThe location of the log message
messagestringThe message to be logged.

global.sheetLog​

Create a log entry in the log spreadsheet.

ArgumentsTypeDescription
levelLogLevelThe level of the log message (default: info). See Enum Type LogLevel for valid values.
locationstringThe location of the log message
messagestringThe message to be logged.

Message Actions​

message.exportAsHtml​

Export a message as HTML document and store it to a GDrive location.

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
embedAttachmentsbooleanEmbed attachments (default: true)
embedAvatarbooleanEmbed an avatar (from Gravatar) of the sender (default: true)
embedInlineImagesbooleanEmbed inline images (default: true)
embedRemoteImagesbooleanEmbed remote images (default: true)
fromMessageIdstringThe message ID to start the export from (for thread exports).
includeAttachmentsbooleanInclude attachments (default: true)
includeHeaderbooleanInclude the message header (default: true)
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
toMimeTypestringConvert 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
widthnumberThe width (in px) of the message (default: 700)

message.exportAsPdf​

Export a message as PDF document and store it to a GDrive location.

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
embedAttachmentsbooleanEmbed attachments (default: true)
embedAvatarbooleanEmbed an avatar (from Gravatar) of the sender (default: true)
embedInlineImagesbooleanEmbed inline images (default: true)
embedRemoteImagesbooleanEmbed remote images (default: true)
fromMessageIdstringThe message ID to start the export from (for thread exports).
includeAttachmentsbooleanInclude attachments (default: true)
includeHeaderbooleanInclude the message header (default: true)
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
toMimeTypestringConvert 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
widthnumberThe width (in px) of the message (default: 700)

message.forward​

Forwards this message.

ArgumentsTypeDescription
tostringThe 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.

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
headersRecord<string,string>Optional headers to include in the request.
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
toMimeTypestringConvert 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
urlstringThe URL to download the content from.
Supports placeholder substitution.

message.storePDF​

Generate a PDF document from the message and store it to GDrive.
DEPRECATED: Use message.exportAsPdf instead.

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
skipHeaderbooleanSkip the header if true.
toMimeTypestringConvert 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.

ArgumentsTypeDescription
namestringThe name of the label.

thread.exportAsHtml​

Export a thread as HTML document and store it to a GDrive location.

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
embedAttachmentsbooleanEmbed attachments (default: true)
embedAvatarbooleanEmbed an avatar (from Gravatar) of the sender (default: true)
embedInlineImagesbooleanEmbed inline images (default: true)
embedRemoteImagesbooleanEmbed remote images (default: true)
fromMessageIdstringThe message ID to start the export from (for thread exports).
includeAttachmentsbooleanInclude attachments (default: true)
includeHeaderbooleanInclude the message header (default: true)
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
toMimeTypestringConvert 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
widthnumberThe width (in px) of the message (default: 700)

thread.exportAsPdf​

Export a thread as PDF document and store it to a GDrive location.

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
embedAttachmentsbooleanEmbed attachments (default: true)
embedAvatarbooleanEmbed an avatar (from Gravatar) of the sender (default: true)
embedInlineImagesbooleanEmbed inline images (default: true)
embedRemoteImagesbooleanEmbed remote images (default: true)
fromMessageIdstringThe message ID to start the export from (for thread exports).
includeAttachmentsbooleanInclude attachments (default: true)
includeHeaderbooleanInclude the message header (default: true)
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
toMimeTypestringConvert 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
widthnumberThe 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.

ArgumentsTypeDescription
namestringThe name of the label.

thread.storePDF​

Generate a PDF document for the whole thread and store it to GDrive.
DEPRECATED: Use thread.exportAsPdf instead.

ArgumentsTypeDescription
conflictStrategyConflictStrategyThe strategy to be used in case a file already exists at the desired location. See Enum Type ConflictStrategy for valid values.
descriptionstringThe description to be attached to the Google Drive file.
Supports placeholder substitution.
incrementPrefixstringThe prefix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: _ for file_1.txt, ( for file (1).txt
Default: (
incrementStartnumberThe starting number to be used for the increment number in case of ConflictStrategy.INCREMENT.
Default: 1
incrementSuffixstringThe suffix to be used for the increment number in case of ConflictStrategy.INCREMENT.
Typical naming conventions: empty string for file_1.txt, ) for file (1).txt
Default: )
locationstringThe 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.
skipHeaderbooleanSkip the header if true.
toMimeTypestringConvert 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