{"record":{"id":"0f5344417e943d08","repo":"Foundry376/Mailspring","slug":"action-templatekey-is-not-a-supported-action","errorCode":null,"errorMessage":"${action.templateKey} is not a supported action.","messagePattern":"(.+?) is not a supported action\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/mail-rules-processor.ts","lineNumber":239,"sourceCode":"\n    const templateMap = this._getConditionTemplateMap();\n    return fn.call(rule.conditions, (condition) => {\n      const template = templateMap.get(condition.templateKey);\n      if (!template) {\n        console.warn(`Unknown mail rule condition template: ${condition.templateKey}`);\n        return false;\n      }\n      const value = template.valueForMessage(message);\n      return template.evaluate(condition, value);\n    });\n  }\n\n  async _applyRuleToMessage(rule: MailRule, message: Message, thread: Thread) {\n    try {\n      const actionPromises = rule.actions.map((action) => {\n        const actionFn = MailRulesActions[action.templateKey];\n        if (!actionFn) {\n          throw new Error(`${action.templateKey} is not a supported action.`);\n        }\n        return actionFn(message, thread, action.value);\n      });\n\n      const actionResults = await Promise.all<Task | undefined>(actionPromises);\n      const actionTasks = actionResults.filter((r) => r instanceof Task);\n\n      // mark that none of these tasks are undoable\n      actionTasks.forEach((t) => {\n        (t as any).canBeUndone = false;\n      });\n\n      const performLocalPromises = actionTasks.map((t) => TaskQueue.waitForPerformLocal(t));\n      Actions.queueTasks(actionTasks);\n      await performLocalPromises;\n    } catch (err) {\n      // Errors can occur if a mail rule specifies an invalid label or folder, etc.\n      // Disable the rule. Disable the mail rule so the failure is reflected in the","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/Foundry376/Mailspring/blob/648c685d602ece6bb00c22534b8734de6ac644b3/app/src/mail-rules-processor.ts#L221-L257","documentation":"Guard in _applyRuleToMessage: a rule action's templateKey is not present in the supported action template map (Actions loaded from the ActionTemplates registry). Occurs when a rule was created by an older/newer Mailspring version or a plugin that defined actions that no longer exist, or the stored rule data is corrupt.","triggerScenarios":"Thrown at app/src/mail-rules-processor.ts:239 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Open the rule in Preferences > Mail Rules and re-pick the action","Update Mailspring to a version that supports the action","Delete the obsolete rule; the error aborts processing of this message by the rule"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"648c685d602ece6bb00c22534b8734de6ac644b3","analyzedAt":"2026-09-03T02:00:24.311Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}