PeerSender icon

PeerSender

Peer sender node

Overview

The PeerSender node is designed to send data to a peer system using two distinct modes: "plugin" and "template". It allows users to configure the sending method, specify the target group, and customize the message content or template used for transmission. This node is useful in scenarios where integration with external peer services is required, such as sending notifications, commands, or structured messages to another system that supports plugins or templates.

Practical examples include:

  • Sending a text message or button interaction via a plugin mode to a peer service.
  • Dispatching a predefined message format using a template identified by a template ID.
  • Dynamically including additional JSON body content in the request when needed.

Properties

Name Meaning
Group Identifier of the target peer group to which the message will be sent.
Send Mode The mode of sending the message; options are "Plugin" (sending via plugin) or "Template" (using a template).
Plugins Specifies which plugin to use when Send Mode is "Plugin"; currently supports "Text".
Text Type When using the "Text" plugin, defines the type of text message: "Text" or "Button".
Text Title For "Button" type text, this is the title or label shown on the button.
Text Message For "Button" type text, this is the message content sent when the button is pressed.
Use Config Boolean indicating whether the request includes a plugin ID configuration.
Text Format Plugin identifier string used when "Use Config" is true for the "Text" plugin.
Template ID Identifier of the template to use when Send Mode is "Template".
Send Body Boolean indicating whether to include a custom JSON body in the request.
Body JSON string representing the body content to send if "Send Body" is true.

Output

The node outputs an array of JSON objects corresponding to the response data received from the peer API after sending the request. Each output item contains the raw response data returned by the external peer service.

If the node sends binary data, it is not indicated in the source code, so the output is purely JSON-based.

Dependencies

  • Requires an external peer API service accessible via HTTP(S).
  • Needs an API authentication token or key configured in the node credentials (referred generically as "an API key credential").
  • Uses the Axios HTTP client library internally to perform requests.
  • The node expects the peer API domain URL to be provided through credentials.

Troubleshooting

  • Invalid send mode error: If the "Send Mode" property is set to a value other than "plugin" or "template", the node throws an error indicating the mode is invalid. Ensure the property is correctly set.
  • JSON parsing errors: When "Send Body" is enabled, the "Body" property must contain valid JSON. Malformed JSON will cause the node to fail. Validate JSON syntax before execution.
  • API request failures: Network issues, incorrect API domain, or invalid credentials can cause request errors. The node surfaces these errors with details about the base URL, endpoint URL, and HTTP method used. Verify connectivity and credential correctness.
  • Missing required properties: The "Group" property is mandatory. Omitting it may lead to unexpected behavior or API errors.

Links and References

Discussion