Skip to content
All docs

AI site builders

Credential: Webhook + one prompt

A site made with an AI site builder has no blog API for BirchSeek to write to. The webhook connector gives it one: BirchSeek sends each published article to an endpoint on your site, and your site stores it and shows it. You do not write the endpoint. You paste one prompt in the builder, and the builder writes it.

The prompt is the same for each builder. It tells the builder to make:

  • a POST endpoint that checks the BirchSeek signature,
  • a posts table, with insert or update by the article id,
  • a server-rendered blog list and article pages,
  • the title, meta description, canonical, Open Graph and Twitter tags,
  • the article’s JSON-LD, and
  • the sitemap entries.

A site with no backend at all, or a builder that cannot run server code, can use the hosted blog on a subdomain such as blog.example.com.

The steps for each builder

  1. In BirchSeek, open Connectors → Webhook. Click Copy instructions for AI.
  2. Paste the prompt in the builder (see your builder below) and let it build.
  3. Put the endpoint URL that the builder made in Endpoint URL. Click Send test event. Before you save, the endpoint answers 401, because the secret does not exist yet. A 404 or a timeout means the URL is wrong or the endpoint is not deployed.
  4. Click Save and send a test. BirchSeek shows the signing secret one time. Add it to the builder as the secret BIRCHSEEK_WEBHOOK_SECRET (see your builder below), and publish the site again if the builder needs that.
  5. Click Send a test on the connector. The endpoint must answer 200.
  6. Publish an article to the webhook connector and open /blog on your site.

The prompt

This is the text that Copy instructions for AI copies.

Add a blog to this site. BirchSeek sends each article to the site through a webhook.

1. Endpoint
- Make a public POST endpoint at /api/birchseek-webhook on HTTPS.
- Read the raw request body as bytes. Check the signature (step 2) before you parse the JSON. If the check fails, answer 401.
- Answer with a 2xx status in 30 seconds or less. Do slow work after you answer.
- The header X-BirchSeek-Delivery-Id is the same on each retry. Keep the IDs you processed. For a known ID, answer 200 and change nothing.
- The header X-BirchSeek-Event is "article.published" or "ping". For "ping", answer 200 and do nothing.
- A body with "test": true is a test event. Answer 200 and do not show it on the site.

2. Signature
- The secret is in the environment variable BIRCHSEEK_WEBHOOK_SECRET. Do not put it in the code.
- The header X-BirchSeek-Signature has the form t=<unix seconds>,v1=<hex>. It can have more than one v1 value.
- If the difference between now and t is more than 300 seconds, reject the request.
- Expected value: hex of HMAC-SHA256 with the secret as key, over the bytes of t, then ".", then the raw body.
- Compare each v1 value with the expected value in constant time. Accept the request if one is equal.

3. Payload (JSON)
{
  "event": "article.published",
  "test": true (only on test events),
  "site": { "id": "uuid", "url": "https://..." } or null,
  "article": {
    "id": "uuid, the same for each update of the article",
    "slug": "url-slug",
    "title": "Title",
    "html": "the article body as HTML",
    "markdown": "the same body as Markdown",
    "excerpt": "a short teaser for list pages, or null",
    "meta": { "title": "SEO title", "description": "meta description" },
    "keyword": "primary keyword or null",
    "locale": "en-US or null",
    "tags": ["tag"],
    "author": "name (can be absent)",
    "publish_date": "YYYY-MM-DD",
    "published_at": "ISO 8601 time or null",
    "updated_date": "YYYY-MM-DD (can be absent)",
    "featured_image": { "url": "...", "alt": "...", "width": 1600, "height": 900 } or null,
    "images": [ in-article images, already in the body ],
    "video": { "video_id": "...", "title": "...", "url": "...", "embed_url": "..." } or null,
    "faq": [ { "question": "...", "answer": "..." } ],
    "citations": [ the sources of the claims ],
    "schema": { JSON-LD object } (can be absent)
  }
}
Ignore fields that you do not know. BirchSeek can add fields.

4. Storage
- Make a posts table: id (the article id, primary key), slug (unique), title, html, excerpt, meta_title, meta_description, featured_image_url, featured_image_alt, tags, author, published_at, updated_at, schema (JSON).
- Insert or update by article.id. A republish sends the same id with new content. Keep the first published_at.

5. Pages
- /blog: a server-rendered list of the posts, newest first, with title, excerpt, featured image and date.
- /blog/[slug]: a server-rendered page, or a static page that you build again after each webhook. Show the title as the H1, the featured image, the HTML body, the date and the author.
- If the HTML starts with the title as an H1, do not show the title two times.
- In the head: the title tag from meta.title, the meta description, a canonical URL, Open Graph tags (og:title, og:description, og:image, og:type article, og:url) and Twitter card tags.
- Put article.schema in a script tag with type application/ld+json. Write each "<" in it as \u003c.
- Add each post URL to sitemap.xml with its last update date.
- Give the HTML body styles for headings, lists, tables, blockquotes, code and images.

6. Test
- Add BIRCHSEEK_WEBHOOK_SECRET to the environment.
- In BirchSeek, open the webhook connector and click "Send test event". Before you save, the endpoint answers 401, because the secret does not exist yet.
- Save. BirchSeek shows the secret one time. Put it in BIRCHSEEK_WEBHOOK_SECRET, then click "Send a test". The endpoint must answer 200.

Lovable

  • Paste the prompt: in the project chat.
  • The endpoint: Lovable makes it as an Edge Function on its built-in backend. Use the function URL that Lovable shows (under Cloud → Edge functions) as the endpoint URL, not /api/birchseek-webhook.
  • The secret: Cloud → Secrets → Add secret, name BIRCHSEEK_WEBHOOK_SECRET. Do not paste the secret in the chat.
  • Pages: Lovable makes single-page React apps, so a crawler sees the article text only after JavaScript runs. Ask Lovable to prerender the blog pages, or use the hosted blog for pages that search engines read directly.

Bolt.new

  • Paste the prompt: in the project chat. A project on Next.js or Astro gives server-rendered pages.
  • The secret: on Bolt Cloud, open the database icon, then Secrets, and create BIRCHSEEK_WEBHOOK_SECRET. Server functions read it with no redeploy. On another host, set it in that host’s environment variables.

Replit

  • Paste the prompt: in the Agent chat.
  • The secret: the Secrets tool (lock icon) → New Secret, key BIRCHSEEK_WEBHOOK_SECRET. Secrets do not go to the published app by themselves: add it again in the Publishing pane, then publish.
  • The endpoint URL: the published app’s URL plus /api/birchseek-webhook.

Rocket.new

  • Paste the prompt: in the chat editor.
  • The secret: add BIRCHSEEK_WEBHOOK_SECRET in the environment settings (task name → Settings → Environment). Set it on the Production tab too, then launch the app again. If Rocket makes the endpoint as a Supabase Edge Function, it asks for the secret in a secure popup.

Base44

  • Paste the prompt: in the app chat. The endpoint is a backend function, which needs a Builder plan or higher.
  • The secret: Dashboard → Secrets → Add Secret, name BIRCHSEEK_WEBHOOK_SECRET. Publish the app again so the live app gets it.
  • The endpoint URL: the URL of the backend function that Base44 shows.

v0

  • Paste the prompt: in the v0 chat. v0 makes a Next.js app: the endpoint is a route handler at app/api/birchseek-webhook/route.ts, and the pages are server components.
  • The secret: the Vars button in the chat sidebar, for each environment that you use (the preview uses Development). After you deploy, check the Vercel project: Settings → Environment Variables, and deploy again after a change.

Next.js

Use the prompt with your coding assistant, or build it from the webhook reference:

  • The endpoint: app/api/birchseek-webhook/route.ts. Read the body with await request.text() before you parse it, so the signature check gets the raw bytes. Use the Node.js signature sample from the webhook reference.
  • The pages: app/blog/page.tsx and app/blog/[slug]/page.tsx with generateMetadata for the title, description, canonical and Open Graph tags, and app/sitemap.ts for the sitemap. After each delivery, call revalidatePath("/blog") and revalidatePath("/blog/" + slug).
  • The secret: BIRCHSEEK_WEBHOOK_SECRET in .env.local, and in your host’s environment variables.

Troubleshooting

  • 401 after you saved - the secret in the builder is not the one BirchSeek showed, or the endpoint checks a parsed and re-serialized body. The check must use the raw bytes.
  • 404 - the endpoint URL is wrong, or the site was not published after the builder made the endpoint.
  • The article does not show - the event arrived (check the builder’s logs), but the page reads from a different table, or the page is static and was not built again.
  • A test article shows on the site - the endpoint does not skip events with "test": true. Delete the sample post and ask the builder to skip them.