Actions9
Overview
This node integrates with the Hanna IRC Bot via its REST API to perform various IRC-related operations. It allows users to send messages or notices, join or leave channels, change the bot's nickname, retrieve information about users, channels, and the server, and execute raw IRC commands. The "Part Channel" operation specifically enables the bot to leave an IRC channel optionally providing a reason.
Common scenarios include automating IRC communications, managing channel memberships, monitoring user or server status, and sending custom IRC commands programmatically within n8n workflows.
Practical example: Automatically parting a channel after completing a task, optionally specifying a reason for leaving, or sending a notice message to alert users in a channel.
Properties
| Name | Meaning |
|---|---|
| Target | IRC channel (e.g., #general) or username to target. Used as the destination for messages, notices, joining, or parting channels. |
| Reason | Optional text describing the reason for leaving the channel. Only applicable when performing the "Part Channel" operation. |
Output
The node outputs a JSON object containing:
success: Boolean indicating if the operation was successful.operation: The performed operation name (e.g., "part").response: The parsed response from the Hanna Bot API.timestamp: ISO string timestamp of when the operation was executed.- Additional fields depending on the operation:
- For "part": includes
channel(the channel parted) and optionalreason.
- For "part": includes
No binary data output is produced by this node.
Example output snippet for "Part Channel":
{
"success": true,
"operation": "part",
"response": { /* API response details */ },
"timestamp": "2024-06-01T12:00:00.000Z",
"channel": "#general",
"reason": "Optional reason for leaving"
}
Dependencies
- Requires an API key credential for authenticating with the Hanna IRC Bot REST API.
- The node expects the Hanna Bot API URL and token to be configured in the credentials.
- No other external dependencies are required.
Troubleshooting
- Invalid Operation Error: If an unsupported operation is selected, the node throws an error indicating "Invalid operation". Ensure the operation value matches one of the supported options.
- Authentication Failures: Errors related to authorization usually indicate missing or incorrect API credentials. Verify that the API token and URL are correctly set in the node credentials.
- Network or API Errors: Connection issues or unexpected API responses may cause failures. Check network connectivity and Hanna Bot API availability.
- Missing Required Parameters: Operations like "Part Channel" require the "Target" property; ensure all required inputs are provided.
- JSON Parsing Errors: If the API returns malformed JSON, the node may fail parsing the response. Confirm the Hanna Bot API is functioning correctly.
Links and References
- Hanna IRC Bot Official Documentation (for API details)
- IRC Protocol Basics (to understand IRC commands and channels)