
I'm working on a custom function in Appwrite, but I'm facing an issue where some environment variables are not passing through correctly.
Mising Variables: APPWRITE_FUNCTION_EVENT: undefined APPWRITE_FUNCTION_EVENT_DATA: undefined Parsed Event Data: {} Database ID: undefined Collection ID: undefined Document ID: undefined
This occurs whether I trigger the function manually or through a client using: databases . * . collections . * . documents . * . create
What I’ve Tried: Checked that all environment variables are correctly defined in the function settings. Verified that they are accessible within other parts of the Appwrite project. Manually triggered the function to see if the issue persists outside of client-side triggers. Examined logs for any errors or missing data. Observations: Some environment variables are available, but others are missing or undefined. This issue occurs regardless of the trigger method. The function is running in Node.js 22.9.0, and I’m using Appwrite 1.6.1.
Attached is the log file and my script. Any help is much appreciated!

Native logs detected. Use context.log() or context.error() for better experience. Starting audio analysis trigger function... All Environment Variables: APPWRITE_API_KEY: [DEFINED-ANONYMIZED] APPWRITE_VCS_ROOT_DIRECTORY: APPWRITE_VCS_REPOSITORY_ID: 922324856 APPWRITE_FUNCTION_RUNTIME_NAME: Node.js NODE_VERSION: 22.9.0 HOSTNAME: b658da0aaa4c28060e1cfe4992945025 APPWRITE_VERSION: 1.6.1 YARN_VERSION: 1.22.22 APPWRITE_VCS_REPOSITORY_BRANCH_URL: [DEFINED-ANONYMIZED] APPWRITE_VCS_COMMIT_HASH: af7d242a2276fe21293d7afdffe29ff5354e91e1 SHLVL: 5 APPWRITE_AUDIO_COLLECTION_ID: 679286ca00381c6ed109 HOME: /root OLDPWD: /usr/local/server APPWRITE_FUNCTION_CPUS: 1 APPWRITE_VCS_COMMIT_AUTHOR_URL: [DEFINED-ANONYMIZED] OPEN_RUNTIMES_ENV: production APPWRITE_FUNCTION_MEMORY: 512 OPEN_RUNTIMES_HEADERS: {} CYANITE_API_KEY: [DEFINED-ANONYMIZED] OPEN_RUNTIMES_CPUS: 1 APPWRITE_DEPLOYMENT_TYPE: vcs OPEN_RUNTIMES_MEMORY: 512 APPWRITE_VCS_REPOSITORY_BRANCH: main APPWRITE_VCS_COMMIT_AUTHOR_NAME: [DEFINED-ANONYMIZED] APPWRITE_DB_ID: 679286550029ad300dcd PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin APPWRITE_VCS_REPOSITORY_OWNER: [DEFINED-ANONYMIZED] APPWRITE_FUNCTION_NAME: Cyanite_api_request APPWRITE_REGION: fra APPWRITE_ENDPOINT: [DEFINED-ANONYMIZED] APPWRITE_VCS_REPOSITORY_URL: [DEFINED-ANONYMIZED] INERNAL_EXECUTOR_HOSTNAME: exc1 OPEN_RUNTIMES_ENTRYPOINT: src/main.js APPWRITE_FUNCTION_RUNTIME_VERSION: 22 APPWRITE_FUNCTION_ID: 6795663c00271b1663c3 APPWRITE_FUNCTION_API_ENDPOINT: [DEFINED-ANONYMIZED] APPWRITE_VCS_REPOSITORY_NAME: Cyanite_api_request PWD: /usr/local/server APPWRITE_VCS_COMMIT_URL: [DEFINED-ANONYMIZED] OPEN_RUNTIMES_HOSTNAME: exc1 APPWRITE_FUNCTION_DEPLOYMENT: 679767b345af6f175f01 APPWRITE_VCS_COMMIT_MESSAGE: debug main

APPWRITE_FUNCTION_PROJECT_ID: 679283e8000cb489b808 OPEN_RUNTIMES_SECRET: [DEFINED-ANONYMIZED] CYANITE_WEBHOOK_SECRET: [DEFINED-ANONYMIZED] APPWRITE_FUNCTION_EVENT: undefined APPWRITE_FUNCTION_EVENT_DATA: undefined Parsed Event Data: {} Database ID: undefined Collection ID: undefined Document ID: undefined Missing event data; no document created.

The main.js file


Updated version
Recommended threads
- Email Verification Email
Hi everyone, I’m currently experiencing an issue with the email verification functionality. When I trigger the verification, the request returns a valid respon...
- Appwrite Cloud Custom Domains Issue
I’m trying to configure my custom domain api.kondri.lt (CNAME pointing to appwrite.network., also tried fra.cloud.appwrite.io with no luck ) but encountering a ...
- Internal curl errors has occurred within...
