Actions3
- Task Run Actions
Overview
This node allows you to run predefined tasks on the Webagent platform. It is useful for automating interactions with web-based agents that perform specific workflows or data processing tasks. For example, you can trigger a task to scrape data from a website, process input prompts, or execute complex multi-step operations remotely.
The node supports overriding default parameters such as the prompt text, response format, initial URL, authentication context, and session timeout, giving flexibility to customize each task run dynamically.
Typical use cases include:
- Running a web scraping or automation task with a custom prompt.
- Changing the response format to JSON for easier downstream processing.
- Specifying a different authentication context or starting URL per execution.
- Waiting for the task to complete before continuing the workflow.
Properties
| Name | Meaning |
|---|---|
| Task Name or ID | Select a predefined task by name or specify its ID. |
| Override Prompt | Boolean flag to override the default prompt of the task. |
| Prompt | The custom prompt text to run the task with (required if overriding). |
| Override Response Format | Boolean flag to override the default response format of the task. |
| Response Format | Choose the response format: "Text" or "JSON". |
| JSON Schema | JSON schema defining the expected structure of the JSON response (used if response format is JSON). |
| Override Initial URL | Boolean flag to override the default initial URL used by the task. |
| Initial URL | Custom initial URL to start the task with (required if overriding). |
| Override Auth Context | Boolean flag to override the default authentication context. |
| Auth Context Name or ID | Select an authentication context by name or specify its ID (required if overriding). |
| Override Session Timeout | Boolean flag to override the default session timeout. |
| Session Timeout | Timeout in seconds for the task session (required if overriding). |
| Wait for Completion | Whether to wait for the task to finish before returning results (default true). |
Output
The node outputs the result of running the specified task. The output is available in the json field of the returned items.
- If the response format is Text, the output will be a plain text string representing the task's result.
- If the response format is JSON, the output will be a JSON object conforming to the provided JSON schema.
- The node does not explicitly handle binary data output.
Dependencies
- Requires an API key credential to authenticate with the Webagent cloud API.
- The node communicates with the Webagent API at
https://api.webagent.cloud. - The user must have predefined tasks and authentication contexts configured in their Webagent account.
- The node uses helper methods to load available tasks and auth contexts dynamically.
Troubleshooting
Common issues:
- Selecting a non-existent task or auth context ID may cause errors.
- Providing an invalid JSON schema when overriding the response format could lead to parsing failures.
- Network or authentication errors if the API key is missing or invalid.
- Setting a very short session timeout might cause premature termination of the task.
Error messages:
- Authentication failures: Check that the API key credential is correctly set up.
- Task not found: Verify the task ID or name exists in your Webagent account.
- Invalid JSON schema: Ensure the JSON schema syntax is correct and matches the expected response.
- Timeout errors: Increase the session timeout value.
Links and References
- Webagent API Documentation (general reference)
- n8n Expressions Documentation (for using expressions in property fields)