Picture a visitor landing on your site in the middle of the night, looking for how to install a template or what a service costs. Nobody answers, so they leave. Tooliqo Chatbot fixes exactly that: an AI assistant built into your Blogger template that reads your posts and answers visitors around the clock, in their own language and dialect, pointing them to the right page or to your services.
This guide explains how the chatbot works, then takes you through the installation, from creating your AI key to the first “Hello”, with every template setting and a complete troubleshooting table. You don't need a server of your own or a monthly subscription, and everything you'll handle is copy and paste.
Prefer a guided installation?
The chatbot setup guide takes you through every Cloudflare and Blogger screen one stage at a time, with illustrated screens and your settings lines written for you, in six languages.
What the Tooliqo chatbot does
- Answers from your content first. It searches your posts before replying, builds its answers on your own tutorials, and links visitors to the relevant posts.
- Speaks your visitor's language. It replies in whatever language and dialect the visitor writes in: English, French, Spanish, Arabic or any other.
- Sales mode. When it's on, the chatbot gently steers conversations toward your services, offers and payment page.
- Hand-off to a human. Link a WhatsApp number, and it passes the visitor to a member of your team when needed.
- Ready links for frequent questions. Your services page, quote page, licence activation portal and free edition are always one link away.
- Opens from any button. Besides the floating bubble, any button you place in a post or page can open the chat.
- Your key stays safe. The AI key never appears in your page code or in the visitor's browser.
- Switchable provider. Move between DeepSeek, Gemini and OpenAI without editing any code.
How it works: three parts
Knowing this structure avoids half of all installation mistakes, because you'll always know where to look.
- The interface, inside your template: the chat bubble, its window and its settings are built into the template file. This is what visitors see, and you configure it from a widget in Layout.
- The brain, a Cloudflare Worker: a small, free server that receives the question, searches your blog's post feed, builds the instructions, calls the AI provider and sends the answer back. Your API key is stored here, and only here.
- The AI provider: the model that writes the reply. DeepSeek by default, switchable to Gemini or OpenAI.
Why a Worker instead of calling the AI from the template?
If the template called the provider directly, your key would have to sit in the page code, and anyone opening the developer tools could copy it and spend your credit. With a Worker, the browser only ever talks to the Worker, and only the Worker knows the key.
No server to run or pay for
Cloudflare's free Workers plan allows 100,000 requests a day, more than enough for most sites.
Before you start
- A Blogger blog running a Tooliqo template that includes the chatbot.
- A free Cloudflare account at dash.cloudflare.com.
- A DeepSeek account with an API key and a little credit, at platform.deepseek.com.
- The
worker.jsfile supplied with your template. - About twenty minutes, on a computer.
First time with Cloudflare? The setup guide starts by checking that your template has the chatbot widget, then walks you through each screen.
Open the guideInstall the chatbot in six steps
About 20 minutes from start to finish.
Create a DeepSeek API key and add credit
- Go to platform.deepseek.com and create an account.
- In the side menu, choose API keys, then Create new API key.
- Give the key a name you'll recognize, such as
tooliqo-chatbot. - Copy the key immediately (it starts with
sk-) and store it somewhere safe: it won't be shown again. - Credit: if you see
Topped-up balance: $0.00and have no free credit, open Top up and add the smallest amount offered. $2 to $5 lasts a long time.
A built-in spending cap
DeepSeek works on prepaid credit, so a surprise bill is impossible: the most you can ever spend is the credit you added.
What does it actually cost?
DeepSeek's budget model is
deepseek-flash. It costs $0.15 per million input tokens and $0.60 per million output tokens off-peak, and twice that during peak hours (01:00–04:00 and 06:00–10:00 UTC, Monday to Friday). Here is a rough estimate for one message, in which the Worker sends excerpts from your posts along with the question:Item Off-peak Peak Input: instructions, post excerpts and question (about 3,000 tokens) $0.00045 $0.0009 Output: the chatbot's answer (about 400 tokens) $0.00024 $0.00048 Total per message about $0.0007 about $0.0014 Messages per dollar about 1,400 about 700 In other words, $5 of credit covers thousands of messages, and a mid-sized site spends between a few cents and a few dollars a month. Real figures depend on the length of your posts and answers, and prices change, so check DeepSeek's pricing page before you budget.
Create the Worker on Cloudflare and paste worker.js
Workers & Pages › Create › Create Worker
- Sign in at dash.cloudflare.com.
- In the side menu, choose Workers & Pages.
- Click Create, then Create Worker.
- Keep the default Hello World template.
- Give the Worker a clear name in lowercase letters and hyphens, such as
tooliqo-chatbot. The name becomes part of its address. - Click Deploy to publish this first version.
- Once it's deployed, click Edit code.
- Select all the code in the editor and delete it. Then open
worker.json your computer, copy its entire contents and paste them in. - Click Deploy again.
Paste the whole file
Make sure you copied
worker.jsfrom the first line to the last. A single missing line at the end is enough for Cloudflare to reject the deployment, or for the Worker to behave strangely.Setup guideCloudflare is where most people get stuck. The setup guide shows each of these screens as an illustration, with numbered markers that match the instructions.
Add the two variables and the secret
This is where the most common mistake happens. The Worker needs three separate entries, each with its own name and value, not one value that bundles them together.
Worker › Settings › Variables and Secrets › Add
- On the Worker's page, open the Settings tab.
- Scroll down to Variables and Secrets.
- Click Add and create the first row, then repeat for each row below:
Type Variable name Value Text PROVIDERdeepseekText BLOG_URLYour full site address, such as https://www.your-site.comSecret DEEPSEEK_API_KEYYour full sk-…key- Click Deploy after saving: changes don't reach the live Worker until you deploy them.
- Open the Deployments tab and check that a new deployment appears with the current time.
Golden rules for this step
- In each row, the name and the value go in separate fields. Don't type
PROVIDER: deepseekinto a single field. - Text and Secret are the field type, not the name. You type the name yourself.
- Type names exactly, in capitals with underscores and no spaces:
DEEPSEEK_API_KEYis correct;deepseek keyandDEEPSEEK_KEYare not. - Always add the key as a Secret: Cloudflare encrypts it and never shows it again, not even to you.
BLOG_URLis the site whose posts the Worker searches. Write it withhttps://and without a trailing slash.
Copy the Worker's address
In the Overview tab, you'll find the Worker's address in this form:
https://tooliqo-chatbot.your-account.workers.dev
Copy it in full.
“Method not allowed” is good news
If you open the address in your browser, you'll see
Method not allowed. That's normal: the Worker is alive, but it only accepts POST requests from your template, not ordinary visits.Connect the chatbot in Blogger's Layout
Blogger › Layout › Chatbot (AI assistant settings) › ✎
- Make sure the template published on your blog is a Tooliqo version that includes the chatbot.
- In Blogger, open Layout.
- Find the widget named Chatbot (AI assistant settings). In the Arabic edition of the template it's called روبوت الدردشة (اعداد الذكاء الاصطناعي).
- Replace its content with this minimum setup, using your own Worker address:
enabled: on endpoint: https://tooliqo-chatbot.your-account.workers.dev provider: deepseek model: deepseek-flash
Then click Save.
Golden rules for this step
- The
endpointline must start withhttps://. Without it, the address is treated as a page of your own site, and the request never reaches Cloudflare. - The address must match exactly what you copied from Cloudflare, with no space at the end.
- Each setting goes on its own line, as
key: value, with a space after the colon. - If the Worker isn't ready yet, write
enabled: off, so visitors never meet an assistant that doesn't reply.
Setup guideLet the setup guide write these lines for you, including the optional sales-mode lines, ready to copy.
Test the chatbot
- Open your site and press Ctrl + Shift + R (Cmd + Shift + R on a Mac) for a full refresh that bypasses the cache.
- The chat bubble appears at the bottom of the screen.
- Type “Hello”: the chatbot should reply in English.
- Ask about a topic covered in one of your posts, and check that the answer draws on it.
- Try it on your phone as well, since that's where most of your visitors are.
You're live
If these checks pass, your chatbot is up and running.
Every chatbot setting in Layout
The minimum setup is enough to make the chatbot work. The widget accepts more keys that turn it from a general answering machine into a real sales and support assistant:
| Key | What it does |
|---|---|
enabled | Turns the chatbot on or off: on or off (true and false also work). |
endpoint | Your Worker's address. # means it isn't set. |
provider | The provider in use: deepseek, gemini or openai. It must match the PROVIDER variable in Cloudflare. |
model | The model name. Leave it empty to use the Worker's default, or write a name explicitly. |
sales | on turns on sales mode, so the chatbot steers conversations toward your services and offers. |
stores | The address of your services page or shop. |
payments | The address of your quote or payment page. |
whatsapp | A WhatsApp number or link for handing a visitor over to your team. # turns it off. |
kb | The knowledge base: the domain the chatbot draws its answers from. |
license | The address of the licence activation portal, used in licence-related replies. |
free | The address of the free edition, for visitors interested in it. |
A complete example:
enabled: on endpoint: https://tooliqo-chatbot.your-account.workers.dev provider: deepseek model: deepseek-flash sales: on stores: /p/services.html payments: /p/get-price-quote.html whatsapp: # kb: www.your-site.com license: tooliqo-portal.pages.dev/ free: /2026/09/free-biz-pro.html
Open the chat from any button
The floating bubble isn't the only way in. Any button or link with the data-tlq-chat attribute opens the chat window directly, which is handy at the end of posts, on your services page or next to your prices:
<button data-tlq-chat="1" type="button">Chat with us</button>Add it in HTML view inside any post or page, or in an HTML widget in Layout.
Switch AI provider without touching code
- In Cloudflare, change the
PROVIDERvariable to the provider you want. - Add a secret holding that provider's key, using the right name from the table below, and delete any old, empty secret.
- Click Deploy.
- In Layout, change the
providerline to match, edit themodelline or leave it empty, then save.
| Provider | PROVIDER value | Secret name | Where to get the key |
|---|---|---|---|
| DeepSeek | deepseek | DEEPSEEK_API_KEY | platform.deepseek.com |
| Gemini | gemini | GEMINI_API_KEY | aistudio.google.com (starts with AIza) |
| OpenAI | openai | OPENAI_API_KEY | platform.openai.com |
The setup guide covers the key-creation screens for all three providers, with their costs and trade-offs side by side.
Which provider for a commercial site?
- DeepSeek: the cleanest choice for a commercial site, with very low prices, prepaid credit and no special restrictions on commercial use.
- Gemini: has a free tier with no card, handy for testing, but free-tier data may be used to improve Google's models, and its terms require the paid plan when you serve users in Europe. Read the Gemini API terms before relying on it.
- OpenAI: high quality at higher prices, and it requires paid credit.
DeepSeek model names: use deepseek-flash
DeepSeek renamed its models twice in 2026. The old names deepseek-chat and deepseek-reasoner were retired on 24 July 2026. Then, in September 2026, V4.1 Flash replaced V4 Flash, and the official names are now:
deepseek-flash: fast and economical, the best fit for a chatbot.deepseek-v4-pro: stronger at reasoning, at a higher cost.
Write the model name explicitly
The previous name deepseek-v4-flash is still accepted for now and routed to the new model, but it's a temporary alias. Write model: deepseek-flash in Layout rather than leaving it empty, especially if your worker.js is an older copy whose default is a retired name. If a test returns an error saying the model doesn't exist, this is the reason.
Troubleshooting
Before guessing, find the real cause with a direct test of your Worker:
- Open your Worker's address in your browser.
- Press F12 and open the Console tab.
- If the browser refuses to paste, type
allow pastingand press Enter. - Paste the code below with your own address, then press Enter:
fetch("https://tooliqo-chatbot.your-account.workers.dev",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:[{role:"user",content:"Hello"}],provider:"deepseek",model:"deepseek-flash"})}).then(r=>r.text()).then(t=>console.log("BODY>>>",t));The text that appears after BODY>>> points straight at the problem:
| Symptom or result | Cause | Fix |
|---|---|---|
| The bubble doesn't appear at all | The published template doesn't include the chatbot, enabled: off is set, or the page is cached | Check the template and enabled: on, then press Ctrl + Shift + R |
| 500 with “is not set on the Worker” | The key is missing, the variables are merged into one, or Deploy wasn't clicked | Create the three separate entries with their exact names, then Deploy (step 3) |
502 with 401 in detail | The key is invalid or was copied incompletely | Create a new key, add it as a secret, then Deploy |
| 502 with 402 or “Insufficient Balance” | Your DeepSeek balance is zero | Add a little credit at platform.deepseek.com |
| 502 saying the model doesn't exist | An old or misspelled model name | Write model: deepseek-flash in Layout (model names) |
FAILED: Failed to fetch | The endpoint line lacks https://, or the address is wrong | Add https://, match the address exactly, then save (step 5) |
| F12 won't open on your site | The template's copy protection is on | Turn it off temporarily from the “Copy protection” widget, test, then turn it back on |
| 405 “Method not allowed” on the Worker's address | Completely normal | Nothing to fix: it confirms the Worker is alive |
Status codes from this Worker: 500 = missing key, 502 = the provider call failed (details in the detail field), 405 = an ordinary visit (healthy), 400 = invalid request.
Still stuck? Go back through the setup guide: it confirms each stage with you, and its test stage includes this console check, ready to use.
Open the guideSecurity for production
- Never put the key in Layout or in the template. Its only home is a secret inside the Worker.
- Restrict the Worker to your domain (CORS). In
worker.js, theALLOWED_ORIGINvariable is set to"*", which accepts requests from any site. Before going live, set it to your own domain, such as"https://www.your-site.com", so no other site can use your Worker and drain your credit. - Top up in small amounts and keep an eye on usage in your DeepSeek dashboard, rather than adding a large sum at once.
- If the key leaks, delete it in the provider's dashboard right away, create a new one, update the secret in Cloudflare, then Deploy.
The chatbot on a multilingual site
If your site uses the Tooliqo language system (one blog per language), repeat step 5 in the Layout of each language blog. For the Worker, you have two options:
- One Worker for every blog: simpler to manage, and the chatbot still replies in each visitor's language, but it only searches the posts of the site set in
BLOG_URL. - One Worker per language: create a second Worker, such as
tooliqo-chatbot-ar, and set itsBLOG_URLto that language's blog, so each audience gets answers from its own posts.
Either way, make sure the endpoint line on every blog starts with https://.
Frequently asked questions
Do I need to know how to code?
No. You copy one file into Cloudflare, fill in three fields, and type a few lines into a Layout widget.
Is Cloudflare Workers really free?
Yes. The free plan allows 100,000 requests a day, more than most sites need. Your only cost is the AI provider's usage.
Does the chatbot know my site's content automatically?
Yes. With every question, the Worker searches the post feed of the site set in BLOG_URL, so each new post you publish becomes part of its knowledge with no extra setup.
What if a visitor asks about something that isn't in my posts?
It answers from its general knowledge, while your content keeps priority whenever it covers the question.
Can I pause the chatbot?
Yes. Write enabled: off in the Layout widget and save: the bubble disappears, and none of your settings are lost.
Can visitors see my key?
No. The browser only talks to the Worker, and the key is stored inside it as an encrypted secret.
Is there a step-by-step version of this guide?
Yes. The chatbot setup guide takes you through each stage with illustrated screens and writes your settings lines for you, in six languages. It saves your progress in your browser, but never your AI key.
Quick checklist
- Your DeepSeek key (
sk-…) is ready, and the account has credit. - The Worker is deployed on Cloudflare with the full
worker.jscode. - Three separate entries exist:
PROVIDER,BLOG_URLandDEEPSEEK_API_KEY(as a secret), followed by a Deploy. - The Worker's address is copied, starting with
https://. - The Layout widget has
enabled: on,endpoint,provider: deepseekandmodel: deepseek-flash, and it's saved. ALLOWED_ORIGINis restricted to your domain before going live.- After a full refresh, “Hello” and a question about your posts both get correct replies.
Your site now has an assistant that works day and night, knows your posts, speaks your visitors' language and leads them to what they're looking for. For more tutorials on Tooliqo templates and tools, visit Tooliqo.co.
Install it with the guide at your side
Open the chatbot setup guide in a new tab and follow it next to Cloudflare and Blogger. Your progress is saved in your browser; your AI key never is.
