Skip to main content

String Function Expressions

This example shows how to use string functions within expressions.

The following string functions are supported:

👉 Edit this example in the playground.

{
"description": "This example demonstrates how to use string function expressions in the configuration.",
"global": {
"thread": {
"match": {
"query": "-in:trash -in:drafts -in:spam from:{{user.email}} to:{{user.email}} after:{{date.now|formatDate('yyyy-MM-dd')}} is:unread subject:\"[GmailProcessor-Test] stringFnExpressions\""
}
}
},
"settings": {
"markProcessedMethod": "mark-read",
"logSensitiveRedactionMode": "none"
},
"threads": [
{
"match": {
"query": ""
},
"messages": [
{
"actions": [
{
"name": "global.log",
"args": {
"message": "Removing '[]' from subject: {{message.subject|replaceAll('[\\[\\]]', '')}}"
}
}
]
}
]
}
]
}

Source: stringFnExpressions.ts | PRs: #556 | Discussions: #549