节点 / builtin / trigger
Error Trigger
Run the flow when a workflow fails.
此内容尚不支持你的语言。
Start a workflow when another workflow fails, with the details of what went wrong.
What it does
Section titled “What it does”When a watched workflow fails, a new run starts from the Error Trigger. It receives the failed workflow, the node that failed, the error message and the input that node was given, so the next steps can alert you, log the problem or clean up.
Only runs that start on their own report their failures: Schedule, Page Load, Navigation, Element Change, Context Menu, Hotkey and Browser Startup, all started by the browser extension. A run you start yourself from the designer or the workflow list shows its error to you directly and does not fire an Error Trigger, so a half-built workflow does not flood you with alerts.
A few more rules:
- A failure that a Try / Catch node handled is not a failed run, so it does not reach the Error Trigger.
- A run started by an Error Trigger never reports its own failure, so a broken alert workflow cannot keep alerting about itself.
- Only your own activated workflows listen. An Error Trigger inside a workflow you installed from the marketplace does not run.
When to use it
Section titled “When to use it”- One alert workflow that watches All workflows and sends you a message whenever anything fails.
- A per-workflow fallback with This workflow: the failure starts a separate branch of the same workflow.
- Keeping a log of failures in a sheet or a Data Store.
To recover inside the run and keep going, use Try / Catch instead.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Watch | Choice | Which workflows this trigger listens to. Options: This workflow, Selected workflows, All workflows. 默认值:This workflow |
| Workflows | Workflow picker | The workflows to watch. |
- This workflow watches the workflow the trigger is in. It keeps pointing at the right workflow after you duplicate or import it.
- Selected workflows watches the ones you pick in Workflows. The list is ignored with the other two options.
- All workflows watches every workflow, including the one it is in.
Outputs
Section titled “Outputs”-
Output
Each output item has these fields:
| Field | 类型 | What it holds |
|---|---|---|
| workflowId | Text | |
| workflowName | Text | |
| nodeId | Text | |
| nodeLabel | Text | |
| message | Text | What the failing node said |
| input | Any | The input the failing node was given |
| failedAt | Text | |
| triggerType | Always "errorTrigger" | |
| triggeredAt | Text |
{ "workflowId": "…", "workflowName": "…", "nodeId": "…", "nodeLabel": "…", "message": "…", "input": null, "failedAt": "…", "triggerType": "errorTrigger", "triggeredAt": "…"}workflowName and nodeLabel are the names you see in the app, so they read well in a message. input is left out when the failing node had no input. When you test the trigger yourself in the designer, only triggerType and triggeredAt are set.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”Get a desktop alert whenever any workflow fails:
- Create a new workflow and add Error Trigger with Watch set to All workflows.
- Add Browser Notification with Title
{{ $input.workflowName }} failedand Message{{ $input.nodeLabel }}: {{ $input.message }}. - Activate the workflow.
Common issues
Section titled “Common issues”- A workflow failed but the Error Trigger did not run. The failed run was started by hand, or a Try / Catch handled the error. Only runs started on their own by the extension report failures.
- Nothing runs even for scheduled failures. The workflow with the Error Trigger is not activated, or Watch does not include the failed workflow. With Selected workflows, check the list in Workflows.
- The fields are empty. You ran the trigger yourself to test it. Real values only arrive when a watched workflow fails.
- Failures are not reported in the web app. The runs that report failures are started by the browser extension. Install it and activate your workflows there.
Related nodes
Section titled “Related nodes”- Try / Catch: handle a failure inside the run and continue.
- Stop and Error: fail a run on purpose, with your own message.
- Browser Notification: alert yourself when something fails.
See also Error handling.