Actions2
- Bot Actions
- SDK Actions
Overview
The "Bot - Send Message" operation allows sending messages to a specified chat room. It supports sending either plain text messages or file attachments with captions. This node is useful for automating communication in chat rooms, such as sending notifications, alerts, or media files programmatically.
Practical examples:
- Sending a text alert to a team chat room when a new support ticket is created.
- Uploading an image or document to a project discussion room with a descriptive caption.
Properties
| Name | Meaning |
|---|---|
| Type | The type of message to send. Options: "Text" for plain text messages, "Attachment" for sending a file attachment with a caption. |
| Room ID | The identifier of the chat room where the message will be sent. |
| Message | The text content of the message to send (used for both text and attachment types). |
| Attachment Url | The URL of the file attachment to send (required if Type is "Attachment"). |
| Caption | The caption text accompanying the attachment (required if Type is "Attachment"). |
Output
The node outputs JSON data representing the result of the send message operation. This typically includes confirmation details such as message ID, status, timestamps, or any response returned by the messaging service API.
If the message includes a file attachment, the output may also reflect metadata about the uploaded file.
Dependencies
- Requires access to the messaging platform's API that manages chat rooms and messages.
- Needs appropriate API authentication credentials configured in n8n to authorize sending messages.
- Internet connectivity to reach the attachment URL if sending files.
Troubleshooting
- Missing or invalid Room ID: Ensure the Room ID is correct and accessible by the bot.
- Invalid attachment URL: Verify the URL is publicly accessible and points to a valid file.
- Authentication errors: Check that the API credentials are correctly set up and have permissions to send messages.
- Required fields missing: Make sure all required properties for the selected message type are provided.
- Network issues: Confirm network connectivity to the messaging API and attachment URLs.
Links and References
- Refer to your messaging platform’s API documentation for details on message sending endpoints and required parameters.
- n8n documentation on creating and configuring API credentials for external services.