TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node interacts with the "Favorites" resource of an API, specifically allowing users to create multiple favorite items in one operation. It is useful when you want to batch-create favorites that can be accessed conveniently from a left menu or similar UI element. For example, if you have a list of frequently accessed items or bookmarks, this node lets you add them all at once rather than individually.

Properties

Name Meaning
Depth Determines how much related nested data is included in the response:
- 0: Only the primary favorite objects.
- 1: Primary favorites plus their directly related objects.
- 2: Includes related objects of those related objects as well.
Body JSON object representing the favorite(s) to create. This should contain the details of the favorites you want to add.

Output

The output contains a JSON structure representing the created favorite items. The depth property controls how much related nested information is included in each favorite's data. The node does not explicitly mention binary data output, so it primarily outputs JSON data describing the newly created favorites and their related objects depending on the depth level.

Dependencies

  • Requires an API key credential for authentication to the target service.
  • The base URL for the API is configured via credentials.
  • The node uses standard HTTP headers for JSON content type and accepts JSON responses.

Troubleshooting

  • Invalid JSON in Body: If the JSON provided in the Body property is malformed, the node will fail to parse it. Ensure the JSON is valid.
  • Authentication Errors: Missing or incorrect API credentials will cause authentication failures. Verify that the API key or token is correctly set up.
  • Depth Value Issues: Providing a depth value outside the allowed range (0, 1, 2) may result in unexpected responses or errors.
  • API Limitations: Creating many favorites at once might hit API rate limits or payload size restrictions. Consider batching requests if errors occur.

Links and References

  • No direct external links were found in the source code.
  • Refer to the API documentation of the Favorites resource for detailed schema and usage examples.

Discussion