Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Sites → Create Site

AI-generated

Overview

This node integrates with the Appwrite API to manage various resources, including Sites. Specifically, the 'Create Site' operation allows users to create a new site within the Appwrite platform by specifying details such as site ID, name, framework, build runtime, and additional options. This is useful for automating site creation workflows, managing multiple sites programmatically, or integrating site management into larger automation processes.

Use Case Examples

  1. Automatically create a new site in Appwrite when a new project is initiated.
  2. Set up multiple sites with different frameworks and build runtimes in a batch process.
  3. Enable or disable sites and configure build commands dynamically based on external triggers.

Properties

Name Meaning
Site ID The unique identifier for the site. Can be generated automatically using unique().
Name The name of the site to be created.
Framework The framework identifier used for the site, such as next, react, vue, or svelte.
Build Runtime The runtime environment used to build the site, e.g., Static, Node.js 22, or Flutter 3.29.
Options Additional optional settings for the site, including enabling the site, logging, timeout, install and build commands, output directory, and adapter type.

Output

JSON

  • siteId - The unique identifier of the created site.
  • name - The name of the created site.
  • framework - The framework used by the site.
  • buildRuntime - The runtime environment used to build the site.
  • options
    • enabled - Whether the site is enabled.
    • logging - Whether logging is enabled for the site.
    • timeout - Request timeout setting in seconds.
    • installCommand - Command used to install dependencies.
    • buildCommand - Command used to build the site.
    • outputDirectory - Directory containing the build output.
    • adapter - Rendering mode of the site.

Dependencies

  • Appwrite API key credential

Troubleshooting

  • Ensure the Appwrite API credentials (endpoint, project ID, API key) are correctly configured to avoid authentication errors.
  • Verify that the site ID is unique to prevent conflicts when creating a new site.
  • Check that required fields such as 'Name', 'Framework', and 'Build Runtime' are provided to avoid validation errors.
  • If the node fails with timeout errors, consider increasing the timeout setting in the options.
  • Review the install and build commands for correctness to ensure the site builds successfully.

Links

Discussion