ahochsteger / gmail-processor

Gmail Processor is an open-source project that automates the processing of Gmail messages and attachments using Google Apps Script and execute actions (e.g. store attachments in a GDrive folder, log information in a spreadsheet) depending on matching criteria.

Home Page:http://ahochsteger.github.io/gmail-processor/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid argument: label

MikeDabrowski opened this issue · comments

Describe the bug

I was trying to replace labels of some emails and process the attachments. RemoveLabel action throws an error Invalid argument: label.
I tried to debug it by putting the latest code in new file but then I got different error 'Drive not defined'.

To Reproduce

Steps to reproduce the behavior:
Here is my config:

var FromLabels = {
      "match": {
        "query": "label:accounting-process"
      },
      "actions": [
        { "name": "thread.markRead" },        
        { "name": "thread.removeLabel", "args": {"name": "accounting-process"}},
        { "name": "thread.addLabel", "args": {"name": "accounting-autoinvoice"}}
      ],
      "attachments": [
        {
          "match": {
            "name": "^.*\\.pdf$"
          },
          "actions": [
            {
              "name": "attachment.store",
              "args": {
                "location": "company-docs/${message.date:format:yyyy}/${message.date:format:M}/${attachment.name}",
                "conflictStrategy": "skip"
              }
            }
          ]
        }
      ]
};
var config = {
  "description": "Automatic handling of incoming invoices",
  "settings": {
    "markProcessedMethod": "custom",
    "markProcessedLabel": "GmailProcessor/processed"
  },
  global: {
    thread: {
      match: {
        query: "has:attachment newer_than:7d",
      }
    },
  },
  "threads": [
    FromLabels,
  ]
}

And my labels are:
image

Full Error log

"error": {
    "message": "Invalid argument: label",
    "stack": "Exception: Invalid argument: label\n    at GmailAdapter.threadRemoveLabel (GmailProcessorLib:1066:27)\n    at removeLabel (GmailProcessorLib:615:47)\n    at descriptor.value (GmailProcessorLib:4406:35)\n    at ActionRegistry.executeAction (GmailProcessorLib:222:20)\n    at GmailProcessorLib:3641:60\n    at Array.forEach (<anonymous>)\n    at GmailProcessorLib:3638:18\n    at Array.forEach (<anonymous>)\n    at ThreadProcessor.executeActions (GmailProcessorLib:3634:28)\n    at ThreadProcessor.processEntity (GmailProcessorLib:4212:23)"
  }

Expected behavior

removing the label

Initially I was using the v20 of the script and the labels were working only with a -. Today while trying to add new feature I updated to v23. The labels broke. This was not in the release notes Im afraid.

Past v23 nested labels are working like this: "query": "label:accounting/process"

Nested labels are separated by / and spaces turn into - - Might be worth adding this to the docs.

(Leaving open to get noticed, feel free to close later)

@MikeDabrowski that's interesting since I don't see any changes from v20 (2.5.0) to v23 (2.7.0) that might affect how labels are processed.
In the Google Apps Script Release Notes there are changes to the handling of labels that date back to January 2023, but that is too old for your issue.
BTW, nested labels have always been separated by /, this was even the case in the predecessor gmail2gdrive.
If you can give me more details (e.g. logs + config for old and new behavior) we might be able to track the issue down that may have caused the behavioral change.

@ahochsteger
I took the code from my first post, removed 'has:attachment' because it is not relevant and run the script v20 in safe-mode. In dry-run it does not modify the labels so the error didn't pop up. It doesn't work in v23 as well.

Here is the complete log (urls hidden)

9:26:46 AM	Notice	Execution started
9:26:47 AM	Info	[2024-03-19T08:26:47.674Z] INFO: Processing of GmailProcessor config started ...
9:26:47 AM	Info	[2024-03-19T08:26:47.679Z] INFO: Setting up action registry ...
9:26:47 AM	Info	[2024-03-19T08:26:47.718Z] DEBUG: ProcessingContext: {
  "config": {
    "description": "Automatic handling of incoming invoices",
    "global": {
      "attachment": {
        "actions": [],
        "description": "",
        "match": {
          "contentType": ".*",
          "includeAttachments": true,
          "includeInlineImages": true,
          "largerThan": -1,
          "name": "(.*)",
          "smallerThan": -1
        },
        "name": ""
      },
      "message": {
        "actions": [],
        "description": "",
        "attachments": [],
        "match": {
          "body": ".*",
          "from": ".*",
          "is": [],
          "newerThan": "",
          "olderThan": "",
          "plainBody": ".*",
          "subject": ".*",
          "to": ".*"
        },
        "name": ""
      },
      "thread": {
        "actions": [],
        "description": "",
        "messages": [],
        "attachments": [],
        "match": {
          "firstMessageSubject": ".*",
          "labels": ".*",
          "maxMessageCount": -1,
          "minMessageCount": 1,
          "query": "newer_than:7d"
        },
        "name": ""
      },
      "variables": []
    },
    "threads": [
      {
        "actions": [
          {
            "description": "",
            "name": "thread.markRead",
            "processingStage": "post-main"
          },
          {
            "description": "",
            "name": "thread.removeLabel",
            "processingStage": "post-main",
            "args": {
              "name": "accounting-process"
            }
          },
          {
            "description": "",
            "name": "thread.addLabel",
            "processingStage": "post-main",
            "args": {
              "name": "accounting-autoinvoice"
            }
          }
        ],
        "description": "",
        "messages": [
          {
            "actions": [],
            "description": "",
            "attachments": [
              {
                "actions": [
                  {
                    "description": "",
                    "name": "attachment.store",
                    "processingStage": "post-main",
                    "args": {
                      "location": "company-docs/${message.date:format:yyyy}/${message.date:format:M}/${attachment.name}",
                      "conflictStrategy": "skip"
                    }
                  }
                ],
                "description": "",
                "match": {
                  "contentType": ".*",
                  "includeAttachments": true,
                  "includeInlineImages": true,
                  "largerThan": -1,
                  "name": "^.*\\.pdf$",
                  "smallerThan": -1
                },
                "name": ""
              }
            ],
            "match": {
              "body": ".*",
              "from": ".*",
              "is": [],
              "newerThan": "",
              "olderThan": "",
              "plainBody": ".*",
              "subject": ".*",
              "to": ".*"
            },
            "name": ""
          }
        ],
        "attachments": [],
        "match": {
          "firstMessageSubject": ".*",
          "labels": ".*",
          "maxMessageCount": -1,
          "minMessageCount": 1,
          "query": "label:accounting-process"
        },
        "name": ""
      }
    ],
    "settings": {
      "logSheetLocation": "",
      "maxBatchSize": 10,
      "maxRuntime": 280,
      "markProcessedLabel": "GmailProcessor/processed",
      "markProcessedMethod": "custom",
      "sleepTimeThreads": 100,
      "sleepTimeMessages": 0,
      "sleepTimeAttachments": 0,
      "timezone": "default"
    }
  }
} debug
9:26:47 AM	Info	[2024-03-19T08:26:47.720Z] INFO: Processing of thread config index '0' started ...
9:26:47 AM	Info	[2024-03-19T08:26:47.722Z] DEBUG: Built GMail search query: newer_than:7d label:accounting-process
9:26:47 AM	Info	[2024-03-19T08:26:47.723Z] INFO: GMail search query: newer_than:7d label:accounting-process
9:26:47 AM	Info	[2024-03-19T08:26:47.850Z] INFO: -> got 1 threads
9:26:48 AM	Info	[2024-03-19T08:26:48.014Z] DEBUG: Testing regex matches for key prefix thread ...
9:26:48 AM	Info	[2024-03-19T08:26:48.015Z] DEBUG: Testing regex match for firstMessageSubject ...
9:26:48 AM	Info	[2024-03-19T08:26:48.017Z] DEBUG: ... matches
9:26:48 AM	Info	[2024-03-19T08:26:48.018Z] DEBUG: Testing regex match for labels ...
9:26:48 AM	Info	[2024-03-19T08:26:48.020Z] DEBUG: ... matches
9:26:48 AM	Info	[2024-03-19T08:26:48.020Z] DEBUG: ... result for thread.matched: true
9:26:48 AM	Info	[2024-03-19T08:26:48.022Z] INFO: Processing of thread id 18e55ced2f1eec5e (subject:'Security alert') started ...
9:26:48 AM	Info	[2024-03-19T08:26:48.023Z] INFO: Processing of message config '' started ...
9:26:48 AM	Info	[2024-03-19T08:26:48.105Z] DEBUG: Testing regex matches for key prefix message ...
9:26:48 AM	Info	[2024-03-19T08:26:48.106Z] DEBUG: Testing regex match for body ...
9:26:48 AM	Info	[2024-03-19T08:26:48.108Z] DEBUG: ... matches
9:26:48 AM	Info	[2024-03-19T08:26:48.109Z] DEBUG: Testing regex match for from ...
9:26:48 AM	Info	[2024-03-19T08:26:48.110Z] DEBUG: ... matches
9:26:48 AM	Info	[2024-03-19T08:26:48.111Z] DEBUG: Testing regex match for plainBody ...
9:26:48 AM	Info	[2024-03-19T08:26:48.112Z] DEBUG: ... matches
9:26:48 AM	Info	[2024-03-19T08:26:48.113Z] DEBUG: Testing regex match for subject ...
9:26:48 AM	Info	[2024-03-19T08:26:48.114Z] DEBUG: ... matches
9:26:48 AM	Info	[2024-03-19T08:26:48.115Z] DEBUG: Testing regex match for to ...
9:26:48 AM	Info	[2024-03-19T08:26:48.116Z] DEBUG: ... matches
9:26:48 AM	Info	[2024-03-19T08:26:48.116Z] DEBUG: ... result for message.matched: true
9:26:48 AM	Info	[2024-03-19T08:26:48.118Z] INFO: Processing of message id 1...e (date:'2024-03-19T08:23:20.000Z',  subject:'Security alert', from:Google <no-reply@accounts.google.com>) started ...
9:26:48 AM	Info	[2024-03-19T08:26:48.119Z] INFO: Processing of attachment config '' started ...
9:26:48 AM	Info	[2024-03-19T08:26:48.120Z] INFO: Processing of attachment config '' finished.
9:26:48 AM	Info	[2024-03-19T08:26:48.121Z] INFO: Processing of message id 1...e finished.
9:26:48 AM	Info	[2024-03-19T08:26:48.122Z] INFO: Processing of message config '' finished.
9:26:48 AM	Info	[2024-03-19T08:26:48.123Z] INFO: Executing action 'thread.markRead' with args: undefined
9:26:48 AM	Info	[2024-03-19T08:26:48.123Z] DEBUG: Calling method 'markRead' ...
9:26:48 AM	Info	[2024-03-19T08:26:48.125Z] INFO: Marking thread 'Security alert' as read ...
9:26:48 AM	Info	[2024-03-19T08:26:48.272Z] INFO: Action result: {"ok":true,"thread":{}}
9:26:48 AM	Info	[2024-03-19T08:26:48.273Z] INFO: Executing action 'thread.removeLabel' with args: {"name":"accounting-process"}
9:26:48 AM	Info	[2024-03-19T08:26:48.274Z] DEBUG: Calling method 'removeLabel' ...
9:26:48 AM	Info	[2024-03-19T08:26:48.349Z] INFO: Removing label 'accounting-process' from thread 'Security alert' ...
9:26:48 AM	Error	[2024-03-19T08:26:48.352Z] ERROR: Action thread.removeLabel caused an error: {"name":"Exception"}
9:26:48 AM	Info	[2024-03-19T08:26:48.353Z] INFO: Action result: {"ok":false,"error":{"name":"Exception"}}
9:26:49 AM	Error	
Error: Error in action 'thread.removeLabel': Exception: Invalid argument: label
Processing Trace:
{
  "traces": {
    "thread": {
      "configIndex": 0,
      "index": 0,
      "match": {
        "firstMessageSubject": ".*",
        "labels": ".*",
        "maxMessageCount": -1,
        "minMessageCount": 1,
        "query": "label:accounting-process"
      },
      "object": {
        "id": "1...e",
        "firstMessageSubject": "Security alert",
        "lastMessageDate": "2024-03-19T08:23:20.000Z",
        "messageCount": 1,
        "permalink": "https://mail.google.com/mail..."
      }
    }
  },
  "action": {
    "description": "",
    "name": "thread.removeLabel",
    "processingStage": "post-main",
    "args": {
      "name": "accounting-process"
    }
  },
  "data": {
    "timer.startTime": "2024-03-19T08:26:47.718Z",
    "thread.index": 0,
    "threadConfig.index": 0,
    "thread.matched": true
  },
  "error": {
    "message": "Invalid argument: label",
    "stack": "Exception: Invalid argument: label\n    at GmailAdapter.threadRemoveLabel (GmailProcessorLib:1038:27)\n    at removeLabel (GmailProcessorLib:607:47)\n    at descriptor.value (GmailProcessorLib:4249:35)\n    at ActionRegistry.executeAction (GmailProcessorLib:220:20)\n    at GmailProcessorLib:3607:60\n    at Array.forEach (<anonymous>)\n    at GmailProcessorLib:3604:18\n    at Array.forEach (<anonymous>)\n    at ThreadProcessor.executeActions (GmailProcessorLib:3600:28)\n    at ThreadProcessor.processEntity (GmailProcessorLib:4174:23)"
  }
}
handleActionResult	@ GmailProcessorLib.gs:3594
(anonymous)	@ GmailProcessorLib.gs:3615
(anonymous)	@ GmailProcessorLib.gs:3604
executeActions	@ GmailProcessorLib.gs:3600
processEntity	@ GmailProcessorLib.gs:4174
processConfigs	@ GmailProcessorLib.gs:4156
run	@ GmailProcessorLib.gs:3788
runWithJson	@ GmailProcessorLib.gs:3808

The script indeed starts working when I change - in label name to /.

So finally - it would be a good idea to mention about nested labels separator in the docs or improve the error message.

@MikeDabrowski it took me a while to get the end-to-end testing framework done to create test cases that can be run directly in GoogleAppsScript.
I created one to specifically test the action thread.removeLabel and took the exact same label names that cause your execution to fail but I'm still not able to reproduce the issue.
May I ask you to run this test against the beta distribution of GmailProcessor (ID: 1yhOQyl_xWtnGJn_bzlL7oA4d_q5KoMyZyWIqXDJX1SY7bi22_lpjMiQK, version: HEAD, library name: GmailProcessorLib) and show me the full output?
Here's the code for the end-to-end test:

function testActionThreadRemoveLabel() {
  const info = {
    name: "testActionThreadRemoveLabel",
    title: "thread.removeLabel",
    description:
      "Demonstrates the usage of the action `thread.removeLabel` and is used to test a possible behavioral change for label names (e.g. `-` vs. `/`).",
    tags: ["docs", "features", "actions"],
    issues: ["303"],
  }
  const initConfig = {
    mails: [{ subject: info.name }],
  }
  const runConfig = {
    global: {
      thread: {
        match: {
          query:
            "from:${user.email} to:${user.email} after:${date.now:date::yyyy-MM-dd}",
        },
      },
    },
    settings: {
      markProcessedMethod: GmailProcessorLib.MarkProcessedMethod.CUSTOM,
    },
    threads: [
      {
        match: {
          query: "subject:([GmailProcessor-Test] ".concat(info.name, ")"),
        },
        actions: [
          {
            name: "thread.addLabel",
            processingStage: GmailProcessorLib.ProcessingStage.PRE_MAIN,
            args: {
              name: "accounting-process",
            },
          },
          {
            name: "thread.markRead",
            processingStage: GmailProcessorLib.ProcessingStage.POST_MAIN,
          },
          {
            name: "thread.removeLabel",
            processingStage: GmailProcessorLib.ProcessingStage.POST_MAIN,
            args: {
              name: "accounting-process",
            },
          },
          {
            name: "thread.addLabel",
            processingStage: GmailProcessorLib.ProcessingStage.POST_MAIN,
            args: {
              name: "accounting-autoinvoice",
            },
          },
        ],
      },
    ],
  }
  const tests = [
    {
      message: "No failures",
      assertions: [
        {
          message: "Processing status should be OK",
          assertFn: function (_testConfig, procResult) {
            return procResult.status === GmailProcessorLib.ProcessingStatus.OK
          },
        },
        {
          message: "At least one thread should have been processed",
          assertFn: (_testConfig, procResult) =>
            procResult.processedThreads >= 1,
        },
        {
          message: "Expected number of actions should have been executed",
          assertFn: (_testConfig, procResult) =>
            procResult.executedActions.length ===
            procResult.processedThreads * 4,
        },
      ],
    },
  ]
  const testConfig = {
    info: info,
    initConfig: initConfig,
    runConfig: runConfig,
    tests: tests,
  }
  return GmailProcessorLib.E2E.runTests(
    testConfig,
    false,
    GmailProcessorLib.RunMode.DANGEROUS,
  )
}

@ahochsteger Sure.

I can't pick HEAD - the version picker is a dropdown. I opened appscript.js settings and put HEAD there but then during execution it complained NOTFOUND. So I put 125 there and here is the log.

8:21:48 AM	Notice	Execution started
8:21:50 AM	Error	
TypeError: Cannot read properties of undefined (reading 'run')
./build/lib/index.js	@ GmailProcessorLib.gs:3514
__webpack_require__	@ GmailProcessorLib.gs:90421
(anonymous)	@ GmailProcessorLib.gs:90485
(anonymous)	@ GmailProcessorLib.gs:90488

And here is the appscript.js for reference

{
  "timeZone": "Europe/Warsaw",
  "dependencies": {
    "libraries": [
      {
        "userSymbol": "GmailProcessorLibBeta",
        "version": "125",
        "libraryId": "1yhOQyl_xWtnGJn_bzlL7oA4d_q5KoMyZyWIqXDJX1SY7bi22_lpjMiQK"
      }
    ]
  },
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8"
}

I copy pasted your whole function to a blank code.gs file.

@MikeDabrowski thanks for trying!
You can put version "0" into appsscript.js to reference the latest (HEAD) version.

The error you get is caused by a mismatch of the userSymbol in appsscript.js (GmailProcessorLibBeta vs GmailProcessorLib).
Either remove Beta from appsscript.js or change the testing code to use GmailProcessorLibBeta instead.

In the meantime the new end-to-end test functionality is already released and the example actionThreadRemoveLabel.js tests your use case.
As you can see below in the logs I do not get the error you are seeing.
I'll close the issue for now but feel free to reopen it with additional information - esp. the log output of the test run.

9:55:56 PM	Notice	Execution started
9:55:58 PM	Info	[2024-04-24T19:55:58.564Z] INFO: E2E.runTests(): Initializing test data ...
9:55:58 PM	Info	[2024-04-24T19:55:58.703Z] DEBUG: E2E.runTests(): Waiting 5000ms for emails to be sent ...
9:56:03 PM	Info	[2024-04-24T19:56:03.706Z] DEBUG: E2E.runTests(): Finished waiting.
9:56:03 PM	Info	[2024-04-24T19:56:03.709Z] INFO: E2E.runTests(): Executing GmailProcessor.runWithJson ...
9:56:03 PM	Info	[2024-04-24T19:56:03.716Z] INFO: Processing of GmailProcessor config started ...
9:56:03 PM	Info	[2024-04-24T19:56:03.718Z] INFO: Setting up action registry ...
9:56:03 PM	Info	[2024-04-24T19:56:03.764Z] DEBUG: ProcessingContext: {
  "config": {
    "description": "Demonstrates the usage of the action `thread.removeLabel` and is used to test a possible behavioral change for label names (e.g. `-` vs. `/`).",
    "global": {
      "attachment": {
        "actions": [],
        "description": "",
        "match": {
          "contentType": ".*",
          "includeAttachments": true,
          "includeInlineImages": true,
          "largerThan": -1,
          "name": "(.*)",
          "smallerThan": -1
        },
        "name": ""
      },
      "message": {
        "actions": [],
        "description": "",
        "attachments": [],
        "match": {
          "body": ".*",
          "from": ".*",
          "is": [],
          "newerThan": "",
          "olderThan": "",
          "plainBody": ".*",
          "subject": ".*",
          "to": ".*"
        },
        "name": ""
      },
      "thread": {
        "actions": [],
        "description": "",
        "messages": [],
        "attachments": [],
        "match": {
          "firstMessageSubject": ".*",
          "labels": ".*",
          "maxMessageCount": -1,
          "minMessageCount": 1,
          "query": "from:${user.email} to:${user.email} after:${date.now:date::yyyy-MM-dd}"
        },
        "name": ""
      },
      "variables": []
    },
    "threads": [
      {
        "actions": [
          {
            "description": "",
            "name": "thread.addLabel",
            "processingStage": "pre-main",
            "args": {
              "name": "accounting-process"
            }
          },
          {
            "description": "",
            "name": "thread.markRead",
            "processingStage": "post-main"
          },
          {
            "description": "",
            "name": "thread.removeLabel",
            "processingStage": "post-main",
            "args": {
              "name": "accounting-process"
            }
          },
          {
            "description": "",
            "name": "thread.addLabel",
            "processingStage": "post-main",
            "args": {
              "name": "accounting-autoinvoice"
            }
          }
        ],
        "description": "",
        "messages": [],
        "attachments": [],
        "match": {
          "firstMessageSubject": ".*",
          "labels": ".*",
          "maxMessageCount": -1,
          "minMessageCount": 1,
          "query": "subject:([GmailProcessor-Test] actionThreadRemoveLabel)"
        },
        "name": ""
      }
    ],
    "settings": {
      "defaultTimestampFormat": "yyyy-MM-dd HH:mm:ss",
      "defaultArrayJoinSeparator": ",",
      "logSheetLocation": "",
      "maxBatchSize": 10,
      "maxRuntime": 280,
      "markProcessedLabel": "",
      "markProcessedMethod": "custom",
      "sleepTimeThreads": 100,
      "sleepTimeMessages": 0,
      "sleepTimeAttachments": 0,
      "timezone": "default"
    }
  }
} debug
9:56:03 PM	Info	[2024-04-24T19:56:03.768Z] INFO: Processing of thread config index '0' started ...
9:56:03 PM	Info	[2024-04-24T19:56:03.782Z] DEBUG: Built GMail search query: from:.....@gmail.com to:.....@gmail.com after:2024-04-24 subject:([GmailProcessor-Test] actionThreadRemoveLabel)
9:56:03 PM	Info	[2024-04-24T19:56:03.784Z] INFO: GMail search query: from:.....@gmail.com to:.....@gmail.com after:2024-04-24 subject:([GmailProcessor-Test] actionThreadRemoveLabel)
9:56:03 PM	Info	[2024-04-24T19:56:03.966Z] INFO: -> got 1 threads
9:56:04 PM	Info	[2024-04-24T19:56:04.315Z] DEBUG: Testing regex matches for key prefix thread ...
9:56:04 PM	Info	[2024-04-24T19:56:04.316Z] DEBUG: Testing regex match for firstMessageSubject ...
9:56:04 PM	Info	[2024-04-24T19:56:04.320Z] DEBUG: ... matches
9:56:04 PM	Info	[2024-04-24T19:56:04.323Z] DEBUG: Testing regex match for labels ...
9:56:04 PM	Info	[2024-04-24T19:56:04.329Z] DEBUG: ... matches
9:56:04 PM	Info	[2024-04-24T19:56:04.331Z] DEBUG: ... result for thread.matched: true
9:56:04 PM	Info	[2024-04-24T19:56:04.333Z] INFO: Processing of thread id 18f11ade08fd53fb (subject:'[GmailProcessor-Test] actionThreadRemoveLabel') started ...
9:56:04 PM	Info	[2024-04-24T19:56:04.336Z] INFO: Executing action 'thread.addLabel' with args: {"name":"accounting-process"}
9:56:04 PM	Info	[2024-04-24T19:56:04.338Z] DEBUG: Calling method 'addLabel' ...
9:56:04 PM	Info	[2024-04-24T19:56:04.342Z] INFO: Adding label 'accounting-process' to thread '[GmailProcessor-Test] actionThreadRemoveLabel' ...
9:56:04 PM	Info	[2024-04-24T19:56:04.494Z] INFO: Action result: {"ok":true,"thread":{}}
9:56:04 PM	Info	[2024-04-24T19:56:04.498Z] INFO: Executing action 'thread.markRead' with args: undefined
9:56:04 PM	Info	[2024-04-24T19:56:04.500Z] DEBUG: Calling method 'markRead' ...
9:56:04 PM	Info	[2024-04-24T19:56:04.563Z] INFO: Marking thread '[GmailProcessor-Test] actionThreadRemoveLabel' as read ...
9:56:04 PM	Info	[2024-04-24T19:56:04.711Z] INFO: Action result: {"ok":true,"thread":{}}
9:56:04 PM	Info	[2024-04-24T19:56:04.713Z] INFO: Executing action 'thread.removeLabel' with args: {"name":"accounting-process"}
9:56:04 PM	Info	[2024-04-24T19:56:04.715Z] DEBUG: Calling method 'removeLabel' ...
9:56:04 PM	Info	[2024-04-24T19:56:04.771Z] INFO: Removing label 'accounting-process' from thread '[GmailProcessor-Test] actionThreadRemoveLabel' ...
9:56:04 PM	Info	[2024-04-24T19:56:04.922Z] INFO: Action result: {"ok":true,"thread":{}}
9:56:04 PM	Info	[2024-04-24T19:56:04.925Z] INFO: Executing action 'thread.addLabel' with args: {"name":"accounting-autoinvoice"}
9:56:04 PM	Info	[2024-04-24T19:56:04.928Z] DEBUG: Calling method 'addLabel' ...
9:56:04 PM	Info	[2024-04-24T19:56:04.968Z] INFO: Adding label 'accounting-autoinvoice' to thread '[GmailProcessor-Test] actionThreadRemoveLabel' ...
9:56:05 PM	Info	[2024-04-24T19:56:05.083Z] INFO: Action result: {"ok":true,"thread":{}}
9:56:05 PM	Info	[2024-04-24T19:56:05.086Z] INFO: Processing of thread id 18f11ade08fd53fb finished.
9:56:05 PM	Info	[2024-04-24T19:56:05.088Z] INFO: Processing of thread config index '0' finished.
9:56:05 PM	Info	[2024-04-24T19:56:05.089Z] INFO: Processing of GmailProcessor config finished.
9:56:05 PM	Info	[2024-04-24T19:56:05.091Z] INFO: Processing summary:
9:56:05 PM	Info	[2024-04-24T19:56:05.092Z] INFO:  - Processed thread configs: 1
9:56:05 PM	Info	[2024-04-24T19:56:05.093Z] INFO:  - Processed threads: 1
9:56:05 PM	Info	[2024-04-24T19:56:05.094Z] INFO:  - Processed message configs: 0
9:56:05 PM	Info	[2024-04-24T19:56:05.096Z] INFO:  - Processed messages: 0
9:56:05 PM	Info	[2024-04-24T19:56:05.097Z] INFO:  - Processed attachment configs: 0
9:56:05 PM	Info	[2024-04-24T19:56:05.098Z] INFO:  - Processed attachments: 0
9:56:05 PM	Info	[2024-04-24T19:56:05.099Z] INFO:  - Executed actions: 4
9:56:05 PM	Info	[2024-04-24T19:56:05.101Z] INFO:  - Result status: ok
9:56:05 PM	Info	[2024-04-24T19:56:05.102Z] INFO: E2E.runTests(): Testing assertions ...
9:56:05 PM	Info	[2024-04-24T19:56:05.104Z] INFO: E2E.runTest(): Running test 'No failures' ...
9:56:05 PM	Info	[2024-04-24T19:56:05.106Z] INFO: ✅ Success: Processing status should be OK
9:56:05 PM	Info	[2024-04-24T19:56:05.107Z] INFO: ✅ Success: At least one thread should have been processed
9:56:05 PM	Info	[2024-04-24T19:56:05.109Z] INFO: ✅ Success: Expected number of actions should have been executed
9:56:05 PM	Info	[2024-04-24T19:56:05.111Z] INFO: E2E.runTest(): Finished.
9:56:05 PM	Info	[2024-04-24T19:56:05.113Z] INFO: E2E.runTests(): Finished.
9:56:05 PM	Notice	Execution completed