Overview
This node allows sending a direct message to a specified Twitter user. It is useful for automating communication, customer support, or notifications via Twitter direct messages. For example, a business can automatically send order updates or personalized messages to customers through Twitter DMs.
Use Case Examples
- Send a welcome message to a new follower by specifying their user ID and message text.
- Send a direct message with an image attachment to a user by providing the user ID, message text, and binary attachment data.
Properties
| Name | Meaning |
|---|---|
| User ID | The ID of the user who should receive the direct message. |
| Text | The text content of the direct message. It supports URL encoding and can be up to 10,000 characters long. |
| Attachment | Optional binary data to be added as an attachment to the direct message, such as an image or media file. |
Output
JSON
event- The event object representing the created direct message returned from the Twitter API.
Dependencies
- Requires Twitter API credentials with OAuth1 authentication to send direct messages.
Troubleshooting
- Common issues include invalid or missing user ID, exceeding the maximum text length, or providing an invalid attachment format.
- Error messages may indicate authentication failures, invalid parameters, or API rate limits. Ensure valid Twitter OAuth credentials and correct input values to resolve these errors.
Links
- Twitter API - Create a new Direct Message event - Official Twitter API documentation for sending direct messages.