Coolify icon

Coolify

Interact with Coolify API

Overview

This node integrates with the Coolify API to manage various resources, including databases. Specifically, for the Database - Create operation, it allows users to create a new database instance of a specified type (e.g., MongoDB, MySQL, PostgreSQL, Redis) within the Coolify platform. This is useful in automation workflows where infrastructure setup or database provisioning needs to be automated, such as setting up development environments, deploying applications with required databases, or managing cloud resources programmatically.

Practical examples:

  • Automatically creating a PostgreSQL database when deploying a new application.
  • Provisioning a Redis cache instance as part of a CI/CD pipeline.
  • Creating a MySQL database with specific version and port settings for testing purposes.

Properties

Name Meaning
Database Type The type of database to create. Options: MongoDB, MySQL, PostgreSQL, Redis
Name The name of the database to be created
Additional Fields Optional extra parameters for the database creation:
- Version: Version string of the database
- Port: Numeric port number for the database
- Password: Password for accessing the database (secured input)

Output

The node outputs an array of JSON objects representing the created database(s). Each object contains details returned by the Coolify API about the newly created database resource, such as its ID, name, type, version, port, and other metadata.

If the node supports binary data output (not indicated explicitly here), it would typically represent files or attachments related to the resource, but this node primarily deals with JSON data describing database resources.

Dependencies

  • Requires access to the Coolify API via an API key credential configured in n8n.
  • The node depends on the coolifyApiRequest helper function to communicate with the Coolify REST API endpoints.
  • No additional external services are required beyond the Coolify platform.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Specifying unsupported database types or invalid parameters may result in API errors.
    • Network connectivity problems can prevent communication with the Coolify API.
  • Error messages:

    • "The resource \"database\" is not implemented!": Indicates the node does not support the requested resource; likely a misconfiguration.
    • "The operation \"create\" is not implemented!": Means the requested operation is unavailable for the resource.
    • API errors from Coolify (e.g., validation errors) will be propagated; check that all required fields are correctly set.
  • Resolutions:

    • Ensure the API key credential is valid and has sufficient permissions.
    • Verify all required properties, especially the database name and type, are provided.
    • Check network connectivity and Coolify service status.

Links and References

Discussion