One Build prompt — your AI Studio app serves its own SEO blog.
A Google AI Studio Build app pairs a React front end with an Express server in a Cloud Run container. DraftSEO’s prompt keeps the whole blog on the server side: a signed POST /api/draftseo-webhook route, posts and image bytes in your database, and /blog pages that Express returns as finished HTML — so crawlers read every article without executing React.
| What AI Studio builds | Express webhook route + posts in your database — registered ahead of express.json and the single-page fallback |
|---|---|
| SEO | Complete HTML from Express — title, meta description and canonical link on every /blog page |
| Images | Bytes stored in the database — nothing written to disk, where files vanish |
| Where it must run | Published to Cloud Run — the preview inside AI Studio is not public |
| Signing secret | Settings → Secrets, then publish again — read on the server; its value never goes into the chat |
| Custom variables | Sometimes dropped on publish — some users have seen it; if deliveries 401, check the Cloud Run service |
Who does what
Paste the prompt into the Build chat, publish to Cloud Run, then add the signing secret under Settings → Secrets and publish again. Once the signed test shows green, each article reaches your app without you.
A 401 after publishing? Check the variable on Cloud Run.
Setup
Copy the prompt from the Google AI Studio tile.
~30 seconds
The agent registers the webhook route before express.json and the single-page fallback, stores posts and image bytes in the database, and has Express render /blog as HTML.
~a few minutes
Publish the app, register its run.app or ai.studio URL ending in /api/draftseo-webhook, then save the signing secret under Settings → Secrets and publish once more.
~a few minutes
Send the test from DraftSEO and wait for green. Still getting 401 after publishing? Confirm DRAFTSEO_WEBHOOK_SECRET is set on the app’s Cloud Run service.
~1 minute
Each new article then lands in your Cloud Run app on its schedule, as a page crawlers can read.
Ongoing · zero clicks
FAQ
It doesn’t rely on one. The prompt has the Build agent add a POST /api/draftseo-webhook route to your app’s Express server, keep posts in the project’s database (Cloud SQL or Firestore), and answer posts.list so new articles can link to older ones. DraftSEO signs every article with your secret and sends it to that route once the app is published.
The articles. React routes reach search engines as an empty page, so the prompt has Express return /blog and /blog/:slug as complete HTML strings — title, meta description, canonical link and article body — registered before the single-page-app fallback.
The preview inside AI Studio is not public, so DraftSEO’s deliveries cannot reach it. Publish the app to Cloud Run first, then register its run.app or ai.studio address with /api/draftseo-webhook on the end.
First, that DRAFTSEO_WEBHOOK_SECRET is saved under Settings → Secrets and that you published again after adding it. If both are true and the 401s continue, open the app’s Cloud Run service and confirm the variable is set there — some users have seen publishing drop custom variables. One 401 is expected, though: DraftSEO’s connection check sends a deliberately invalid signature, and your receiver must reject it.
A file the app writes to disk vanishes, and Starter Tier projects have no Cloud Storage to hold it. So the server downloads each image when an article arrives, saves the bytes in the database and serves them from /images/:id — the published article points at your app’s own image URLs, not DraftSEO’s CDN.
No card required. Your Cloud Run app renders every article DraftSEO delivers.