TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation allows users to create multiple messages at once through a messaging channel such as email or chat. It is useful in scenarios where batch message creation is needed, for example, sending notifications to multiple recipients, importing message logs, or automating bulk communication workflows.

By specifying the message content and the desired depth of related object inclusion, users can control how much additional contextual data is returned with each created message.

Properties

Name Meaning
Depth Determines the level of nested related objects to include in the response:
- 0: Returns only the primary message information.
- 1: Returns the primary message plus its directly related objects.
- 2: Returns the primary message, its directly related objects, and their related objects.
Body The actual message content to be sent or received through the messaging channel. This should be provided as a JSON object representing the message details (e.g., text, sender, recipient, timestamp).

Output

The output contains a JSON field representing the created messages. Each entry corresponds to a message created according to the input body. Depending on the Depth property, the output may also include nested related objects associated with each message, providing richer context about the message relationships.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential to authenticate requests to the external messaging service.
  • The base URL for the API is configured via credentials.
  • The node sends HTTP requests with JSON payloads and expects JSON responses.

Troubleshooting

  • Invalid JSON in Body: If the Body property contains malformed JSON, the request will fail. Ensure the JSON is valid and correctly formatted.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key or token is correctly set up in the node credentials.
  • Depth Value Issues: Providing a depth value outside the allowed range (0, 1, 2) may result in unexpected responses or errors. Use only the specified options.
  • API Rate Limits: Creating many messages at once might hit rate limits imposed by the external service. Consider batching requests or adding delays if errors occur.

Links and References

  • Refer to the external messaging service API documentation for detailed schema of message objects and supported operations.
  • JSON formatting tools can help validate the Body input before use.

Discussion