How to Add an AI Chatbot to Google Sites
A practical guide to adding an AI chatbot for Google Sites: embed options, the hosted chat-link workaround, and how to capture leads.
Google Sites is one of the easiest ways to put a clean, free website online — but the moment you try to add anything interactive, you hit its walls. If you have searched for how to add an AI chatbot for Google Sites and come away confused, you are not imagining it: Google Sites is deliberately locked down, and the usual "paste one script tag" instructions that work on WordPress or Shopify simply do not apply here. This guide explains exactly what Google Sites will and will not let you do, the realistic ways to get a working chatbot in front of your visitors, and how to capture leads even when the platform fights you.
Why Google Sites is different (and harder)
Most website builders give you a place to paste a <script> tag that loads a chat widget site-wide. Google Sites does not — the new Google Sites (sites.google.com) has no global "custom code" or "head/footer scripts" field at all. What it gives you instead is an Embed tool that drops content into a single box on a single page, and even that runs inside a sandboxed iframe with tight restrictions.
This matters because a normal chat widget wants to float in the bottom-right corner across every page, and inside a Google Sites embed iframe it usually cannot — the widget is trapped in the box you placed it in. So set expectations upfront:
- You cannot paste a script that puts a floating bubble on every page automatically.
- You can embed a chat window inside a fixed area on a page.
- You can link out to a full-screen hosted chat page that has no restrictions.
Understanding that trade-off saves a lot of frustration. The rest of this article is about choosing the right path.
Three ways to add an AI chatbot for Google Sites
There are three realistic ways to get a chatbot working, from most embedded to most external:
- Option 1 — Embed code (the `<> Embed` tool). Paste your chatbot's iframe or embed snippet into a box on the page. The chat lives inside that box. Best when you want the bot visible inline, e.g. on a "Contact" or "Help" page.
- Option 2 — Hosted chat link (the workaround). Skip embedding and link a button or menu item to a full-page hosted version of your bot. Best when you want the bot to behave normally with zero restrictions and do not mind it opening as its own page.
- Option 3 — A custom HTML iframe pointing at the bot's hosted page. A middle ground: embed the bot's full hosted URL as an iframe so the complete chat renders inside your Google Site.
Most people use Option 1 or Option 3 for an in-page experience and keep Option 2 as a reliable fallback. Here is how they compare:
| | Embed code (Opt 1) | Hosted link (Opt 2) | Hosted iframe (Opt 3) |
|---|---|---|---|
| Floating bubble on every page | No | No | No |
| Full chat experience | Partial | Yes | Yes |
| Works despite sandbox limits | Sometimes | Always | Usually |
| Setup difficulty | Easy | Easiest | Easy |
| Feels native to your site | Medium | Low | High |
Option 1: Embed your chatbot's code
This is the most direct route and works for most modern chatbot tools that provide an embed/iframe snippet.
- Build and train your bot first. Create the bot and feed it your content — your Google Site's pages, any PDFs, your FAQ — so it answers from your material, not generic guesses. With a tool like Alee, you point it at your site URL, it crawls the pages, and it builds a searchable knowledge base.
- Copy the embed snippet from your chatbot dashboard's Embed, Install, or Share section.
- Open your Google Site in edit mode and click where you want the chat to appear (a Contact or Help page works well).
- Insert the embed. In the right-hand Insert panel, click Embed (the
<>icon), choose the Embed code tab, paste your snippet, then click Next and Insert. - Resize the box so the chat has room — roughly 400px wide and 500–600px tall.
- Publish and test on the live URL, not the editor preview.
If the embed shows up blank or says "refused to connect," the chatbot's page is blocking iframing or the script needs capabilities the sandbox denies. That is your cue to use the hosted-link workaround below.
Option 2: The hosted chat link workaround
This is the most reliable method on Google Sites because it sidesteps the iframe sandbox entirely: instead of embedding the bot, you give it its own page and point a button at it. Most good chatbot platforms host a full-page, shareable version of every bot — a public URL — and you use that as your destination.
- Get your bot's hosted/share URL from the chatbot dashboard ("Share link" or "Public page").
- Add a button via the Insert panel, labelled something inviting like "Chat with us" or "Ask a question."
- Set the button link to your bot's hosted URL, opening in a new tab so visitors keep your site open behind it.
- Optionally add it to the navigation so the chat is reachable from every page — the closest you get to a site-wide presence on Google Sites.
- Publish and test by clicking the button on the live site.
The trade-off is that the chat opens as its own page rather than floating in a corner — but it works every time, on every device, with no sandbox surprises.
Option 3: Embed the hosted page as a full iframe
If you want the complete chat experience kept inside your site, embed the bot's hosted URL directly. Copy your bot's hosted/share URL (not the script snippet), then in Google Sites use Insert → Embed → By URL and paste it. If "By URL" only shows a small preview card, switch to the Embed code tab and use a simple iframe instead: <iframe src="YOUR_BOT_URL" width="100%" height="600"></iframe>. Resize, publish, and test on the live site. This renders the full bot inside a page on your Google Site — the best of both worlds when it works.
How to capture leads on Google Sites (the part most guides skip)
Here is the real reason most people add an AI chatbot for Google Sites: not just to answer questions, but to turn visitors into leads. Google Sites has famously weak form and lead tooling — the built-in forms route to Google Forms and feel clunky — so a chatbot is often the better lead-capture surface even on a Google Site.
A well-configured bot can ask for a name, email, or phone number right when interest is highest ("Want me to send you the price list?"), push that lead to a CRM, a Google Sheet, or your email via a webhook, and qualify lightly — budget, timeline, what they need — so the lead arrives with context, not as a cold email address.
For an India-based creator, coach, or D2C store, this is where it pays off: a visitor lands at 11 p.m., asks about your course fee or COD availability, gets an instant answer, and leaves their WhatsApp number — without you touching it. Because capture happens inside the chat, it works identically whether you used the embed, the hosted link, or the iframe method.
If you want the bot to answer only from your own content (so it never invents a price or a policy), choose a platform built on retrieval over your material rather than a generic script. That is the whole design of Alee: it crawls your Google Site and documents, answers only from what it found, and gives you a hosted page and embed code ready on day one. You can start free and have a trained bot in minutes; see the tutorials for a step-by-step.
Setup checklist
Run through this before you call it done:
- [ ] Bot trained on your real content (site pages, FAQ, PDFs) and tested with three real questions.
- [ ] Method chosen: embed code, hosted link, or hosted iframe.
- [ ] Embed box resized so the chat is usable, including on mobile.
- [ ] A "Chat" button or nav item added if you used the hosted-link route.
- [ ] Lead capture turned on, routed to your email / Sheet / CRM, and tested end to end.
- [ ] Site published and verified on the live URL — then checked on a phone, since Google Sites embeds can crop awkwardly on small screens.
A note on wanting a free chatbot for Google Sites
A lot of people specifically want a free option — reasonable, since Google Sites itself is free. Most serious tools, including Alee, offer a free tier (one bot, a monthly message limit) that is genuinely enough to test the waters or run a small site. Just be wary of "free" tools that are really lead-gen for an expensive plan, or that plaster their own branding over your chat. If branding matters, look for white-label options so the widget carries your name, not the vendor's. Compare the trade-offs in our pricing and Alee vs SiteGPT breakdowns.
Frequently asked questions
Can I add a floating chatbot bubble to every page of Google Sites?
Not with the standard approach — Google Sites has no global custom-code field, so you cannot load a site-wide floating widget the way you can on WordPress or Shopify. The closest equivalents are embedding the chat on key pages or adding a "Chat" button to your navigation that opens the bot's hosted page.
Why does my embedded chatbot show "refused to connect" on Google Sites?
That means the chatbot's page is blocking itself from loading inside Google Sites' sandboxed iframe, or the script needs permissions the sandbox denies. The fix is the hosted-link workaround: link a button to the bot's full hosted URL instead of embedding the script, which bypasses the restriction entirely.
Can a Google Sites chatbot capture leads?
Yes, and it is often the best lead tool on a Google Site. A chatbot can ask for a name, email, or phone number inside the conversation and push that lead to your CRM, a Google Sheet, or your inbox via a webhook — which works the same regardless of whether you embedded the bot or linked to its hosted page.
Ready to try it? [Start free](/signup) with Alee, point it at your Google Site, and have a trained chatbot answering visitors and capturing leads in minutes.
Build your own AI chatbot with Alee
Train it on your site, embed it anywhere, capture leads 24/7. Free to start.