Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Sites → Create Variable
AI-generatedOverview
This node interacts with the Appwrite API to manage site variables. Specifically, the 'Create Variable' operation under the 'Sites' resource allows users to create a new variable for a specified site. This is useful for managing configuration or environment variables within a site hosted on Appwrite. For example, users can create variables to store API keys, feature flags, or other settings that the site can reference dynamically.
Use Case Examples
- Creating a new environment variable for a site to store an API key securely.
- Adding a feature flag variable to enable or disable features on a site without redeploying.
Properties
| Name | Meaning |
|---|---|
| Site ID | The ID of the site where the variable will be created. |
| Variable ID | The unique identifier for the variable. Can be auto-generated using unique(). |
| Key | The key name of the variable, used to reference it within the site. |
| Value | The value assigned to the variable. |
| Is Secret | Indicates whether the variable is a secret and should be encrypted. |
Output
JSON
variableId- The unique ID of the created variable.key- The key name of the created variable.value- The value assigned to the created variable.isSecret- Boolean indicating if the variable is secret (encrypted).
Dependencies
- Appwrite API key credential with endpoint, project ID, and API key
Troubleshooting
- Ensure the Site ID is correct and the site exists in Appwrite to avoid 'Unknown resource' errors.
- If the variable ID is not unique, the API may reject the creation request; use unique() to generate a unique ID.
- Check API key permissions to ensure the node has rights to create variables on the specified site.
Links
- Appwrite Sites API - Create Variable - Official documentation for creating variables in Appwrite Sites resource.