Know when you need a Cloud function
Keep layout, form behavior, and result display on the page (the frontend). Ask for a Cloud function when the app needs to:- Send an email or notification through an outside service.
- Call a third-party API that needs a private credential.
- Check a request or make a protected data change on the server.
Keep secrets out of the page. Store API keys in secret storage, never in frontend code, browser requests, screenshots, or visible errors. Name the service and secret the function should use. Don’t move a key into the page to fix a failed request.
Describe the flow you want
Tell Enter what should happen, not how to set up sign-in checks. Cover four parts.
Copy and adapt this example:

Describe input, access, success, and failure in project chat.
Test the complete flow
- Submit valid input and confirm the page shows success.
- Confirm the real result happened, such as an email arriving or data being updated.
- Submit invalid or incomplete input. The page should show a useful error with no keys or internal details.
Troubleshooting
The function exists but the page does nothing
The function exists but the page does nothing
A function that exists doesn’t prove the page calls it or the service accepts its request. Ask Enter for the complete user flow.
A test fails
A test fails
Tell Enter what you did, what you expected, what happened, and the error on the page.
An authentication error appears
An authentication error appears
Don’t switch off authentication checks. Ask Enter to review how the page calls the function and fix it safely.
Common questions
When does my app need a Cloud function?
When does my app need a Cloud function?
Use a Cloud function when your app must handle a private credential, validate a request, or make a protected data change on the server. Keep layout, form behavior, and result display in the frontend.
Where should a Cloud function get private credentials?
Where should a Cloud function get private credentials?
Save each credential in Cloud Secrets and refer to it by name. Never place the value in frontend code, browser requests, project chat, screenshots, or visible errors.
Keep going
Next: Add and protect Cloud secrets
Your function needs its private key saved safely.
Your function needs its private key saved safely.
Connect Stripe for app payments
Take payments with a Stripe checkout.
Create, manage, and delete an Enter Cloud instance
Open and manage your Cloud instance.
