Actions252
- Api Keys Actions
- Attachments Actions
- Blocklists Actions
- Calendar Channel Event Associations Actions
- Find Many Calendar Channel Event Associations
- Create One Calendar Channel Event Association
- Create Many Calendar Channel Event Associations
- Find One Calendar Channel Event Association
- Delete One Calendar Channel Event Association
- Update One Calendar Channel Event Association
- Find Calendar Channel Event Association Duplicates
- Companies Actions
- Calendar Channels Actions
- Calendar Event Participants Actions
- Calendar Events Actions
- Connected Accounts Actions
- Favorite Folders Actions
- Favorites Actions
- Message Channel Message Associations Actions
- Find Many Message Channel Message Associations
- Create One Message Channel Message Association
- Create Many Message Channel Message Associations
- Find One Message Channel Message Association
- Delete One Message Channel Message Association
- Update One Message Channel Message Association
- Find Message Channel Message Association Duplicates
- Message Channels Actions
- Message Folders Actions
- View Fields Actions
- Message Participants Actions
- Messages Actions
- Message Threads Actions
- Notes Actions
- Note Targets Actions
- Opportunities Actions
- People Actions
- Tasks Actions
- Task Targets Actions
- Timeline Activities Actions
- View Filter Groups Actions
- View Filters Actions
- View Groups Actions
- Views Actions
- View Sorts Actions
- Webhooks Actions
- Workflow Automated Triggers Actions
- Workflow Runs Actions
- Workflows Actions
- Workflow Versions Actions
- Workspace Members Actions
Overview
This node operation allows users to create multiple API keys in bulk via the Twenty API. It is useful when you need to programmatically generate several API keys at once, for example, when onboarding multiple applications or services that require individual authentication tokens. This can streamline workflows where managing many API keys manually would be cumbersome.
Practical examples include:
- Automatically provisioning API keys for new users or clients.
- Generating a batch of keys for different environments (development, staging, production).
- Integrating with CI/CD pipelines that require temporary or rotating API keys.
Properties
| Name | Meaning |
|---|---|
| Depth | Determines how much related nested information is included in the response: - 0: Only the primary API key objects. - 1: Primary objects plus their directly related objects. - 2: Includes related objects of those related objects as well. |
| Body | JSON object representing the API key(s) to create. Typically includes fields like name (the name of the API key) and expiresAt (expiration timestamp). The body must be valid JSON describing one or more API keys. |
Output
The output contains a JSON field with the created API key objects. Depending on the depth parameter, this JSON may include nested related objects associated with each API key. The structure reflects the API's response, typically including details such as the key's ID, name, expiration date, and any related metadata.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the Twenty API service.
- Needs an API authentication token or API key credential configured in n8n to authorize requests.
- The node uses the base URL and headers set from the credentials, expecting JSON content type.
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 authorization failures. Verify that the API key credential is correctly set up.
- Depth Parameter Misuse: Setting an unsupported depth value might result in unexpected responses or errors. Use only 0, 1, or 2 as specified.
- API Limits or Quotas: Creating many API keys at once might hit rate limits imposed by the API provider. Check API documentation for limits and handle retries accordingly.
Links and References
- Twenty API Documentation (for detailed API key creation and management)
- n8n Documentation (for general usage of HTTP Request nodes and JSON handling)