Actions9
Overview
The "Send Notice" operation of the Hanna Bot node allows users to send an IRC notice message to a specified target, which can be either an IRC channel (e.g., #general) or an individual username. Notices in IRC are typically used for sending messages that are less intrusive than regular chat messages, often for alerts or informational purposes.
This operation is beneficial in scenarios where you want to notify users or channels without engaging in normal conversation flow, such as sending automated alerts, reminders, or system messages. For example, a bot could send a notice to a channel about upcoming maintenance or notify a user privately about an event.
Properties
| Name | Meaning |
|---|---|
| Target | The IRC channel (e.g., #general) or username to which the notice will be sent. |
| Message | The content of the notice message to send. This can include AI-generated or custom text. |
Output
The output JSON object contains the following fields:
success: Boolean indicating if the notice was sent successfully.operation: The string"notice"indicating the performed operation.response: The raw response from the Hanna Bot API parsed as JSON.timestamp: ISO timestamp when the operation was executed.target: The target channel or username to which the notice was sent.message: The actual message content that was sent.
No binary data is output by this operation.
Example output snippet:
{
"success": true,
"operation": "notice",
"response": { /* API response details */ },
"timestamp": "2024-06-01T12:00:00.000Z",
"target": "#general",
"message": "Scheduled maintenance starts at midnight."
}
Dependencies
- Requires an API key credential for authenticating with the Hanna Bot REST API.
- The node makes HTTP requests to the Hanna Bot API endpoint configured via credentials.
- No additional external dependencies are required beyond the Hanna Bot API access.
Troubleshooting
Common Issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect target format (e.g., missing
#for channels) may result in errors or messages not being delivered. - Network connectivity issues can prevent communication with the Hanna Bot API.
Error Messages:
"Invalid operation: notice"— indicates the operation parameter was not set correctly; ensure "Send Notice" is selected.- Authentication errors usually mention unauthorized access; verify the API token and URL.
- If the API returns an error, it will be included in the
errorfield of the output JSON whensuccessis false.
Resolution Tips:
- Double-check the API credentials and their permissions.
- Confirm the target string is valid and exists on the IRC network.
- Ensure the Hanna Bot service is running and accessible at the configured API URL.
Links and References
- IRC Notice Command Explanation
- Hanna Bot official documentation (refer to your Hanna Bot API docs for detailed endpoints and usage)