personal project

Chatbot Funnel · AI Lead Generation Workflow

MakeMyBook Funnel — AI Book Idea Chatbot

I built a chatbot funnel that turns a few simple choices into book ideas someone could publish on Amazon KDP. The chat runs on Typebot, and a backend of five n8n workflows handles the AI ideas, changes, email delivery, and cover previews.

Note: Self-directed learning project — built from my own design after trying a sample funnel as a user. No real client was involved, and the payment step is a placeholder.

Typebot

n8n Cloud

Groq AI

Pollinations

Gmail

Webhooks

The Challenge

A job post for an AI & Automation VA described a sample funnel called /makemybook and listed the skills needed to recreate it: a Typebot chatbot flow, connecting tools with n8n or APIs, AI tools, and email automation. I went through the funnel myself as a user, from the greeting to the book covers at the end, and noted each step, each choice, and where a backend would be needed.

The goal was to help beginners who want to publish on Amazon KDP get a first book idea quickly, collect a lead (name and email), and guide them toward an optional paid extra: the final book cover. I had no professional automation experience and had never built a full flow in Typebot, so I built my own version to learn how the pieces connect, not only to read about them.

The Solution

I built a fixed-choice chatbot funnel, where the user taps buttons instead of typing freely, with a backend of five n8n workflows. Typebot is the waiter: it talks to the customer and writes down the answers. n8n is the kitchen manager: it receives the order through a webhook and decides what to do. Groq writes the book ideas, and Pollinations draws the covers.

How it works

  1. Intake - The bot welcomes the user, collects a name and email, then asks three questions: the book niche, the audience, and the tone.

  1. Idea generation - n8n asks Groq for three book ideas (title, theme, short story) and cleans the answer into safe one-line JSON.

  1. Pick and revise - The user picks one idea and can ask for a change, such as funnier, more serious, a new title, or a different theme. Only the picked idea changes.

  1. Email delivery - When the user is happy, the bot emails that one idea to their Gmail.

  1. Optional covers - The user chooses a style, sees three AI cover previews, picks one, and moves to a placeholder payment step before the cover is emailed. A user can also leave with just the idea.

The Results

✦ Chat layer split from the backend

Typebot handles the conversation and n8n handles AI, email and images, connected through five webhooks. Each side does only what it is good at.

✦ AI ideas that are safe to pass around

Groq returns three book ideas as JSON. A Code node cleans quotes and line breaks so the text never breaks the next request.

✦ Change loop that edits one idea only

Tested with Idea 2 and "Make it funnier": only that idea changed, and ideas 1 and 3 stayed the same.

✦ Designed for failure

Every workflow returns ok = yes or no. If a step fails, the user sees a friendly message with a "Try again" button instead of a broken chat.

✦ Three AI cover previews

The cover workflow builds three Pollinations image links with different seeds, so the previews look different. The covers load in the chat after switching to a keyed Pollinations account.

How It's Built

This section is for the technically curious. If you just care about the results, you've already seen them above.

Chat layer

Typebot, about 33 groups, fixed buttons, variables, and an error group with retry for every backend step

Backend

Five n8n Cloud workflows, each starting with a Webhook node and ending with a Respond to Webhook node

Connection

Typebot HTTP Request blocks send JSON to n8n webhooks; every reply carries an ok = yes/no field

AI layer

Groq API (openai/gpt-oss-120b) writes and revises the ideas as JSON; the HTTP node continues on error so a Groq failure does not crash the workflow

Covers

A Code node builds three Pollinations image links with different seeds; Pollinations draws each image when the link loads in the chat

Email

Gmail (OAuth inside n8n) sends the picked idea and the chosen cover as HTML emails

Hosting

n8n Cloud (14-day free trial), so the webhooks have a public address and no tunnel is needed

Key engineering decisions

Typebot for the chat, n8n for the backend

My first idea was to build everything in n8n with fixed paths, but there would be too many paths. Typebot is built for conversations with buttons, and n8n is built for connecting apps, so splitting them kept each side simple.

Clean AI output before it travels

If the AI ideas contained quotes or line breaks, the JSON Typebot sends to n8n could break. n8n now strips them and returns three one-line ideas, and free-text inputs for changes were replaced with buttons so the body can't be broken by what a user types.

Read the executions to find the real cause

The chat showed "My brain got stuck" even though n8n had worked. The Executions tab showed every request succeeded, so the problem was in Typebot: the answer was wrapped in a "data" object. Changing the "Save in variables" paths from ok to data.ok fixed it.

One idea at a time

At first a change request changed all three ideas, and the email sent all three. I added a "pick one idea" step, so revise, email and covers now work on that single idea. I also removed fake buttons, such as a "Maybe later" that still kept the chat going, so every choice is a real one.

Publishable key for cover images

Covers got stuck loading because the free anonymous Pollinations tier is rate-limited and the chat asks for three images at once. I made a free account and switched to a publishable (pk_) key. It sits inside the image link where users can see it, so a secret key would have been unsafe there.

What's Real and What's Not

This is a learning project, not a finished product. The main parts are real and tested: the Typebot to n8n connection, the AI ideas, the change loop, the error handling, and the cover links. The rest is honest placeholder.

Payment is a placeholder

The "I've paid" button does not check any payment. A real version needs Typebot's Stripe block, or a Stripe webhook that n8n checks before it sends the cover.

Covers have limits

Covers are made with no text, because AI image models often misspell titles. They are links that Pollinations draws, not images I store, and the free service has limits, so it works for a demo but not for many real users.

Still placeholders or missing

The YouTube videos, price and Stripe link are placeholders. There is no run logging or CRM yet, and the Typebot flow was tested in Test mode, not published to real users.

What I would improve next

Add a real Stripe payment that n8n confirms before sending the cover. Add the title as a text overlay and store the cover images. Log every run to Google Sheets or Airtable, add a central error workflow that alerts me, and send new leads to a CRM such as ActiveCampaign.

A Note from the Builder

This was my first Typebot project, and the first time I split a project into a chat layer and a backend layer.

I used Claude to help plan the design and draft the JSON and code. I set up the accounts and credentials myself, ran the tests, and reported the errors back so we could fix the real cause.

The most valuable part was fixing real problems: a placeholder address, a response path in Typebot, a rate limit, and a key that should not be visible. When "My brain got stuck" appeared, n8n was fine and the bug was in how Typebot saved the answer. Reading the Executions tab first saved me from rebuilding the wrong thing. I also learned to keep secrets in credentials, and that a key inside a public link must be a limited, publishable one.

Workflow Screenshots

Typebot funnel: the chat flow
Typebot funnel: the chat flow· 1 / 6

Create a free website with Framer, the website builder loved by startups, designers and agencies.