Twenty icon

Twenty

Interact with the Twenty API

Batch → Create Companies

AI-generated

Overview

This node interacts with the Twenty API to create multiple company records in a batch operation. It is useful for scenarios where you need to efficiently add or update many company records at once, such as importing company data from another system or syncing bulk updates. The node supports controlling the depth of related records included in the response and offers an upsert strategy to either skip existing records or update them if they match.

Use Case Examples

  1. Importing a list of companies from a CSV file by converting it to JSON and sending it as a batch to create new company records.
  2. Updating existing company records or adding new ones in bulk by using the upsert strategy to avoid duplicates.

Properties

Name Meaning
Base URL The base URL for the Twenty workspace REST API, including the /rest suffix.
Records (JSON) A raw JSON array containing the company records to send in the batch request. If left empty, the node uses incoming item data.
Depth Controls whether related records are expanded in the response. Options are 'Primary Record Only' or 'Include Direct Relations'.
Upsert Strategy Determines how existing records are handled when matching criteria is met. Options are 'Create Only' to skip existing matches or 'Create or Update' to upsert records.
Request Options Additional request settings such as batching controls, SSL certificate validation, proxy configuration, and request timeout.

Output

JSON

  • data - The response data from the Twenty API containing the created or updated company records, optionally including related records based on the depth setting.

Dependencies

  • Requires an API key credential for authenticating with the Twenty API.

Troubleshooting

  • Ensure the Base URL is correctly set to your Twenty workspace REST API endpoint including the /rest suffix.
  • If using the upsert strategy, verify that the matching criteria for existing records is correctly defined to avoid unintended skips or updates.
  • When batching is enabled, monitor batch size and interval settings to avoid rate limiting or timeouts.
  • If SSL certificate validation errors occur, consider enabling the option to ignore SSL issues, but be aware of the security implications.
  • Check proxy settings if requests fail to reach the API due to network restrictions.

Discussion