TiDB Cloud icon

TiDB Cloud

Use TiDB Cloud

Overview

The "Create Serverless Cluster" operation of the TiDB Cloud n8n node allows users to programmatically create a new TiDB Serverless cluster within a specified project and region. This is particularly useful for automating database infrastructure provisioning as part of CI/CD pipelines, onboarding flows, or self-service developer environments.

Practical examples:

  • Automatically spin up a new TiDB Serverless cluster when a new project is created in your organization.
  • Integrate with DevOps workflows to provision test databases on demand.
  • Enable self-service database creation for development teams via an internal portal powered by n8n.

Properties

Name Type Meaning
Project Resource Locator The target TiDB Cloud project where the new serverless cluster will be created. You can select from a list of available projects.
Cluster Name String The name for the new cluster. Must be 4-64 characters, using only numbers, letters, and hyphens; the first and last character must be a letter or number.
Region Options The cloud region where the cluster will be deployed. Choices include Frankfurt (eu-central-1), N.Virginia (us-east-1), Oregon (us-west-2), Singapore (ap-southeast-1), and Tokyo (ap-northeast-1).
Password String (Password) The password to set for the new cluster. This will be used for authentication to the database.

Output

The node outputs a JSON object indicating the result of the cluster creation attempt:

{
  "result": "Success" | "Failure",
  "message": "Success to create TiDB Cloud Serverless Tier Cluster" | "<error message>"
}
  • result: Indicates whether the operation was successful ("Success") or failed ("Failure").
  • message: Provides a success confirmation or details about the error encountered.

Dependencies

  • External Service: Requires access to the TiDB Cloud API.
  • Credentials: You must configure the tiDBCloudApi credential in n8n with appropriate API keys or tokens.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common Issues:

  • Invalid Input: If the cluster name does not meet the requirements (length, allowed characters), the operation may fail.
  • Authentication Errors: Missing or incorrect TiDB Cloud API credentials will prevent cluster creation.
  • API Limitations: Exceeding resource quotas or rate limits on TiDB Cloud may cause failures.

Error Messages:

  • "result": "Failure", "message": "<error message>": The message field will contain the specific reason for failure, such as invalid parameters or authentication errors.
  • "The operation \"<operation>\" is not supported!": This appears if an unsupported operation is selected.

How to resolve:

  • Double-check all input fields, especially the cluster name and password.
  • Ensure your TiDB Cloud credentials are valid and have sufficient permissions.
  • Review the error message for actionable details.

Links and References

Discussion