A2A Callback icon

A2A Callback

Send results back to A2A Server for sync processing

Overview

The A2A Callback node is designed to send results back to an A2A Server for synchronous processing within a workflow. It supports sending success, error, or fully custom results via HTTP POST requests to a callback URL provided by the A2A Server. This node is useful in scenarios where workflows are integrated with external systems that require status updates or results to be reported back asynchronously, such as task automation platforms, agent-based systems, or orchestrated multi-step processes.

Practical examples:

  • Reporting successful completion of a task processed by the workflow.
  • Sending detailed error information when a workflow encounters issues.
  • Returning custom structured data to the A2A Server for advanced handling or logging.

Properties

Name Meaning
Operation The type of result to send back: "Send Success Result", "Send Error Result", or "Send Custom Result".
Result Message (Success operation) Message describing the successful completion of the task.
Include Input Data (Success operation) Whether to include the original input data in the success result.
Include Processed Data (Success operation) Whether to include the processed workflow data in the success result.
Error Message (Error operation) The error message text to send back to the A2A Server.
Error Code (Error operation) A code identifying the type of error encountered.
Custom Status (Custom operation) Status to send with the custom result; options are "Completed", "Failed", or "Partial".
Custom Result Data (Custom operation) JSON string representing the full custom result data to send.
Callback URL Expression n8n expression used to dynamically obtain the callback URL from previous nodes' output. This URL is where the result will be sent.
Advanced Options Collection of optional settings:
- Callback URL Field Field name in the input JSON containing the callback URL (default: a2a_callback_url).
- Task ID Field Field name containing the task ID (default: task_id).
- Session ID Field Field name containing the session ID (default: session_id).
- Timeout (seconds) Timeout duration for the HTTP callback request (default: 10 seconds).
- Include Workflow Metadata Whether to include metadata about the workflow execution in the callback payload (default: true).

Output

The node outputs an array of items corresponding to each input item, each containing:

  • The original input JSON extended with fields indicating the callback result:
    • a2a_callback_success: Boolean indicating if the callback HTTP request succeeded.
    • a2a_callback_status: HTTP status code returned by the callback server.
    • a2a_callback_response: Parsed JSON response from the callback server.
    • a2a_callback_sent_at: Timestamp when the callback was sent.
    • operation: The operation performed (success, error, or custom).
    • callback_url: The URL to which the callback was sent.
    • If failed:
      • a2a_callback_error: Error message describing the failure.
      • error_timestamp: Timestamp of the error occurrence.

This output allows downstream nodes or users to verify whether the callback was successfully delivered and inspect any responses or errors.

Dependencies

  • Requires network access to the callback URL provided by the A2A Server.
  • No explicit external credentials are required by this node itself, but the callback URL must be accessible and valid.
  • Uses standard HTTP POST requests with JSON payloads.
  • The node expects the callback URL to be available either via the configured expression or fallback locations in the input data.
  • The node uses a timeout setting for the HTTP request, configurable via properties.

Troubleshooting

  • Callback URL not found:
    If the callback URL cannot be resolved from the expression or fallback fields, the node throws an error listing all checked locations.
    Resolution: Verify the node name used in the expression matches exactly the node providing the callback URL. Check the input data structure for the expected fields.

  • Invalid JSON in custom result:
    When using the custom operation, if the JSON string for the custom result is malformed, the node throws an error.
    Resolution: Ensure the JSON is valid and properly formatted.

  • HTTP request failures:
    If the callback POST request fails (non-2xx status), the node marks the output item with failure details including HTTP status and error message.
    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, try alternative expressions suggested in the error message.

Links and References

Discussion