TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation allows creating multiple calendar channels in bulk. It is useful when you need to set up several calendar channels at once, for example, when initializing a new calendar system or syncing multiple calendars from an external source. The operation supports specifying detailed synchronization and visibility settings for each channel.

Practical examples include:

  • Bulk creation of calendar channels for different teams or departments within an organization.
  • Setting up calendar channels with specific sync statuses and visibility rules automatically.
  • Automating the onboarding process where many calendar channels must be created with consistent policies.

Properties

Name Meaning
Depth Determines how much related nested data to include in the response:
- 0: Only primary calendar channel information.
- 1: Primary object plus directly related objects.
- 2: Primary object, its related objects, and their related objects.
Body JSON object representing the calendar channels to create. Typical fields include:
- syncStatus: Status of synchronization (e.g., "ONGOING").
- syncStage: Current stage of sync (e.g., "FULL_CALENDAR_EVENT_LIST_FETCH_PENDING").
- visibility: Visibility level of the calendar channel (e.g., "METADATA").
- contactAutoCreationPolicy: Policy for auto-creating contacts (e.g., "AS_PARTICIPANT_AND_ORGANIZER").

Output

The output contains a JSON structure representing the created calendar channels along with any requested nested related objects depending on the Depth parameter. This includes details about the calendar channels themselves and optionally their related entities such as events or participants.

If binary data were involved (not indicated here), it would typically represent attachments or media related to calendar events, but this operation focuses on JSON data only.

Dependencies

  • Requires an API key credential for authenticating requests to the external calendar service.
  • The node uses a base URL configured via credentials to connect to the calendar API.
  • The operation sends HTTP requests with JSON bodies and expects JSON responses.

Troubleshooting

  • Invalid JSON in Body: If the JSON provided in the Body property is malformed, the request will fail. Ensure the JSON syntax is correct.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key or token is correctly configured.
  • Permission Issues: Insufficient permissions for creating calendar channels may result in authorization errors. Check user roles and API scopes.
  • Depth Parameter Misuse: Using a depth value higher than supported by the API might cause unexpected results or errors. Use values 0, 1, or 2 as documented.
  • API Rate Limits: Creating many calendar channels at once might hit rate limits. Consider batching requests or adding delays if errors occur.

Links and References

  • Refer to the external calendar API documentation for detailed descriptions of the syncStatus, syncStage, visibility, and contactAutoCreationPolicy fields.
  • Consult n8n documentation on how to configure API credentials and use JSON input properties effectively.

Discussion