Overview
The A2A Callback node is designed to send results back to an A2A Server for synchronous processing within an n8n workflow. It supports sending success, error, or fully custom results via HTTP POST requests to a callback URL provided by the A2A Server node earlier in the workflow.
This node is useful when you want to notify an external system (the A2A Server) about the outcome of a workflow task, including detailed data such as input, processed data, and metadata. For example, after completing a data transformation or automation step, you can use this node to report success with optional details or report errors with codes and messages.
Practical scenarios include:
- Reporting successful completion of a task with optional inclusion of original input and processed data.
- Sending error information back to the server if the workflow encounters issues.
- Sending custom status and result data for advanced use cases requiring full control over the callback payload.
Properties
| Name | Meaning |
|---|---|
| Operation | The type of result to send: "Send Success Result", "Send Error Result", or "Send Custom Result". |
| Result Message | Success message included in the result (used only for "Send Success Result" operation). Default: "Task completed successfully by workflow". |
| Include Input Data | Whether to include the original input data in the success result. Boolean (true/false). |
| Include Processed Data | Whether to include the processed workflow data in the success result. Boolean (true/false). |
| Error Message | Error message to send to the A2A Server (used only for "Send Error Result" operation). Default: "An error occurred during workflow processing". |
| Error Code | Error code identifying the type of error (used only for "Send Error Result" operation). Default: "WORKFLOW_ERROR". |
| Custom Status | Custom status to send in the callback (used only for "Send Custom Result" operation). Options: "Completed", "Failed", "Partial". |
| Custom Result Data | Custom JSON data to send in the callback (used only for "Send Custom Result" operation). Default example: {"processed": true, "message": "Custom processing complete"}. |
| Callback URL Expression | An n8n expression to dynamically obtain the callback URL from the A2A Server node's output. This is required and typically references the callback URL field in the previous node's JSON data. |
| Advanced Options | Collection of additional options: |
| - Callback URL Field | Field name containing the callback URL in the input JSON. Default: "a2a_callback_url". |
| - Task ID Field | Field name containing the task ID in the input JSON. Default: "task_id". |
| - Session ID Field | Field name containing the session ID in the input JSON. Default: "session_id". |
| - Timeout (seconds) | Timeout for the HTTP callback request in seconds. Default: 10 seconds. |
| - Include Workflow Metadata | Whether to include workflow execution metadata in the callback payload. Boolean (true/false). Default: true. |
Output
The node outputs the original input JSON extended with fields indicating the result of the callback attempt:
a2a_callback_success(boolean): Indicates if the callback HTTP request was successful.a2a_callback_status(number): HTTP status code returned by the callback endpoint.a2a_callback_response(object): Parsed JSON response from the callback endpoint.a2a_callback_sent_at(ISO timestamp): Timestamp when the callback was sent.operation(string): The operation performed ("success", "error", or "custom").callback_url(string): The URL to which the callback was sent.- If the callback failed:
a2a_callback_error(string): Error message describing the failure.error_timestamp(ISO timestamp): Timestamp when the error occurred.
The node does not output binary data.
Dependencies
- Requires an HTTP endpoint (callback URL) provided by the A2A Server node or equivalent upstream node in the workflow.
- Uses standard HTTP POST requests with JSON payloads.
- No external API keys or credentials are required by this node itself, but the callback URL must be accessible and valid.
- The callback URL is typically obtained via an n8n expression referencing a prior node's output.
Troubleshooting
Callback URL Not Found:
If the callback URL cannot be found in the specified expression or fallback locations, the node throws an error listing all checked locations.
Resolution: Verify the node name used in the expression matches exactly the upstream node providing the callback URL. Check that the callback URL exists in one of the expected JSON fields.Invalid JSON in Custom Result:
When using the "Send Custom Result" operation, if the custom JSON is malformed, the node throws an error.
Resolution: Ensure the custom JSON string is valid JSON.HTTP Request Failures:
If the callback HTTP request fails (non-2xx status), the node marks the callback as unsuccessful and includes the HTTP status and error message in the output.
Resolution: Check network connectivity, callback URL correctness, and server availability.Expression Evaluation Errors:
Errors evaluating the callback URL expression usually indicate incorrect node names or syntax in the expression.
Resolution: Double-check the expression syntax and node names. Use debug mode to inspect available node names and data.
Links and References
- n8n Expressions Documentation
- n8n Node Development Guide
- Fetch API MDN Reference (used internally for HTTP requests)