Skip to content
Chatbotscape

Chatbot Script Generator

Most chatbot scripts are written as if the conversation goes to plan. Pick a use case and a channel below and this generator writes the whole thing instead: the opener, the menu, the read-back and the close, plus the sixteen or so states nobody drafts until support starts forwarding screenshots. Every line is written to the field caps your channel publishes, and anything that breaches one is flagged before you paste it into a builder.

Generate a complete chatbot script

Pick a use case and a channel. You get every state a live bot needs, written to that channel's published field caps, with the failure paths included rather than left for later. Runs in your browser: no AI, no account, nothing you type leaves the page.

Body 1024 chars · labels 20 chars · 3 reply buttons · 24-hour session window

The human route

How many times the bot tries again before it stops. Three distinct rungs is the pattern we recommend: narrow the ask, change the mechanism, then stop.

Everything is computed in your browser from fixed rules. Nothing you type is uploaded, stored, or logged, and reloading clears it.

24

States

75%

Failure handling

25

Messages

34

Buttons

What the script is made of

Happy path 6Recovery 12Boundary 6

75% of this script handles a conversation that is not going to plan. 8 of the 24 states are the ones a first draft usually contains; the other 16 are the ones live traffic finds.

Check · The data-question state ships with placeholder wording that describes a common setup, not yours.

Rewrite it against what your platform actually stores and retains before this script goes live.

Show
  1. Opener

    Happy pathgreeting

    Fires when: First message of a new conversation.

    Hi, I am Ada, the automated assistant at Northwind. I can help with a few things right away, and I will fetch a person for anything I cannot handle.148
    Track an order14Returns7Something else14
    waits for typed input

    Then: Tap routes to the matching state. Typed input goes to intent matching.

    One line on what the bot is and one route out. Do not open with a question the menu is about to answer.

  2. Bot disclosure

    Boundarybot-disclosure

    Fires when: Customer asks "am I talking to a person?" at any point.

    I am Ada, an automated assistant. I am not a person. Say agent at any point and I will pass you to the team.108
    Talk to a person16Carry on8

    Then: Returns to the state the customer was in.

    Answer plainly. Hedging here is the single fastest way to lose the conversation, and some jurisdictions require the disclosure on request.

  3. Main menu

    Happy pathmenu

    Fires when: After the opener, or whenever the customer asks what the bot can do.

    What do you need? Pick one, or type it in your own words.57
    Track an order14Returns7Something else14
    waits for typed input

    Then: Routes to the capture state for the chosen path.

    Cover why most people arrive, not your org chart. WhatsApp shows at most 3 reply buttons.

  4. Collection turn

    Happy pathcapture

    Fires when: Customer picked a path and the bot needs one fact to continue.

    Tell me what is going wrong in a sentence or two and I will route it.69
    waits for typed input

    Then: Valid answer goes to the read-back. Anything else goes to rung 1.

    One ask per message. Two questions in one bubble gets you an answer to the second and silence on the first.

  5. Read-back

    Happy pathconfirm

    Fires when: Immediately before anything irreversible: a booking, a charge, an address change.

    So that is {{issue_summary}} on account {{account_id}}. Have I got that right?78
    Yes, that is right18Change something16

    Then: Yes goes to the close. Change returns to the collection turn.

    Echo the specifics, not a summary. This line stays literal even on a generative bot: a model that rephrases a commitment has changed it.

  6. Close

    Happy pathclose

    Fires when: The task is done.

    Your ticket is {{ticket_id}}. You will get an email at {{customer_email}} when it moves.88
    Anything else? Say agent if you would rather talk to someone.61
    All done8One more thing14

    Then: All done goes to the satisfaction check. One more thing returns to the menu.

    Give a reference the customer can keep. A close without one generates the next contact.

  7. Satisfaction check

    Happy pathcsat

    Fires when: After a successful close, once per conversation.

    Did I sort that out for you?28
    Yes3No2

    Then: No routes to handoff where it exists, otherwise to the out-of-scope state.

    Ask once. Asking after a failed conversation collects a score for the escalation, not for the bot.

  8. Failure ladder, rung 1

    Recoveryfallback-1

    Fires when: Intent match failed for the first time in this state.

    I did not catch that. One line is enough, for example: the app logs me out every time I open it.96
    waits for typed input

    Then: Another miss goes to rung 2.

    Restate the ask more narrowly and add the format. Do not repeat the original question word for word.

  9. Failure ladder, rung 2

    Recoveryfallback-2

    Fires when: Intent match failed for the second time in this state.

    Sorry about that, still not with you. Let me change tack: pick the closest option below and I will work from there.115
    Track an order14Returns7Something else14
    waits for typed input

    Then: Another miss goes to rung 3.

    Change the mechanism, not the wording. Stop asking for typed input and offer taps.

  10. Failure ladder, rung 3

    Recoveryfallback-3

    Fires when: Intent match failed for the third time in this state.

    I am not getting this right. Let me get someone. Passing you to the team now with everything from this chat.108

    Then: Goes to the handoff queue state.

    Stop. A ladder without an end is why people leave at the second miss rather than the first.

  11. Format rejected

    Recoveryinvalid-format

    Fires when: The bot understood the intent but the value failed validation: a date in the past, a malformed reference, an email with no @.

    That one did not validate. One line is enough, for example: the app logs me out every time I open it.101
    Talk to a person16
    waits for typed input

    Then: Valid answer continues. Another miss goes to rung 1.

    Different from not understanding, and it needs different copy. Say what was wrong with the value, not that you did not understand.

  12. Silence nudge

    Recoverytimeout-nudge

    Fires when: No reply for a set interval while the bot is waiting on an answer.

    Still there? I will keep this open for a while in case you want to pick it up.78
    Carry on8Start over10

    Then: No reply ends the session quietly. A reply resumes where it stopped.

    One nudge, then stop. A second nudge reads as pestering, and on a messaging channel it costs you a notification.

  13. Asked again

    Recoveryrepeat-question

    Fires when: The customer asks something the bot has already answered in this conversation.

    I gave you an answer that did not land. Rather than repeat it, let me get a person.83
    Yes please10Try again9

    Then: Routes to handoff or back to the collection turn.

    Repeating the same answer is the most reliable way to turn a neutral conversation into a complaint.

  14. Out of scope

    Recoveryout-of-scope

    Fires when: A question the bot is not built for, matched confidently as out of scope.

    That is outside what I can do. I can pass you to someone who handles it.72
    Talk to a person16Back to menu12

    Then: Routes to handoff or the menu.

    Name the boundary. A bot that says nothing useful and offers no route is worse than no bot.

  15. Frustration detected

    Recoveryfrustration

    Fires when: Strong negative sentiment, repeated capitals, or an explicit complaint.

    This has not gone well and I am not going to make you repeat it again. Getting you a person now.96

    Then: Skips the rest of the ladder and goes straight to handoff or a flagged park.

    Cut the ladder short. Do not apologize twice and do not ask the customer to rephrase.

  16. System error

    Recoverytechnical-error

    Fires when: A lookup, payment, or CRM call failed or timed out.

    Something on our side is not responding, so I cannot check that right now. I can pass you to the team, or you can try again in a few minutes.141
    Talk to a person16Try again9

    Then: Retry re-runs the lookup once. A second failure routes to handoff or a park.

    Say it is your side. Customers retype working input for a long time when the copy implies they got it wrong.

  17. Human requested

    Recoveryagent-requested

    Fires when: The customer asks for a person at any point, including in the first message.

    Of course. The team is here Mon to Fri, 9am to 6pm. Putting you in the queue and passing on everything from this chat.118

    Then: Goes to the queue state.

    Available from every state, not just the end. Never gate this behind the bot trying once more.

  18. In the queue

    Recoveryhandoff-wait

    Fires when: The conversation is queued and waiting for a person.

    You are in the queue. Roughly {{wait_estimate}} right now. I will stay out of the way until someone picks it up.112
    Leave a message15
    waits for typed input

    Then: An agent joins, or the customer leaves a message.

    Give a real estimate or none at all. An invented one produces a second contact when it slips.

  19. Out of hours

    Boundaryafter-hours

    Fires when: A person is asked for outside Mon to Fri, 9am to 6pm.

    The team is offline right now. They are back Mon to Fri, 9am to 6pm. Leave the details in one message and it will be first in the queue.136
    Leave a message15Keep using the bot18
    waits for typed input

    Then: Message is queued for the next working period.

    Say when, not just no. The promise here is the one your team is most likely to break, so check it against the rota.

  20. Nobody free

    Recoveryno-agent

    Fires when: In hours, but the queue is over its threshold or every agent is busy.

    Everyone is on another chat at the moment. I can take a message and someone will come back to you, or you can hold.115
    Leave a message15Hold4
    waits for typed input

    Then: Message is queued, or the customer stays in the queue.

    In-hours unavailability needs its own copy. Reusing the out-of-hours line tells the customer you are closed when you are not.

  21. Data question

    Boundaryprivacy

    Fires when: Customer asks what happens to what they type, or "are you recording this?"

    This chat is stored with your Northwind record so the team can see the history. {{privacy_policy_url}} has the detail, and you can ask for a copy or a deletion at any time.172
    Back to menu12

    Then: Returns to the previous state.

    Edit this to match what you actually do before you ship it. This is the one line on the page you must not paste unchanged.

  22. Abusive input

    Boundaryabuse

    Fires when: Slurs, threats, or sustained abuse.

    I am going to stop here. If you still need help, {{support_email}} reaches the team.84

    Then: Ends the automated conversation and flags it.

    Routing abuse to a person by default sends it at an agent. Flag it and let a supervisor decide.

  23. Opt-out

    Boundaryopt-out

    Fires when: Customer sends STOP, UNSUBSCRIBE, or asks to stop being messaged.

    Done. You will not get any more messages from Northwind here. Send START if you change your mind.97

    Then: Suppresses the contact and ends the conversation.

    Must actually suppress, not just reply. On a messaging channel this is a compliance path, not a courtesy.

  24. Session window closed

    Boundarysession-expired

    Fires when: The customer went quiet and the 24-hour service window has closed.

    Picking up where we left off on {{last_topic}}. Reply here and we can carry on.79
    Carry on8Start over10
    waits for typed input

    Then: A reply opens a fresh service window and resumes the flow.

    On WhatsApp this message has to go out as an approved template, not as free text, because the 24-hour window has closed. Write it as a template and get it approved before you need it.

Merge fields your platform has to supply

{{account_id}}{{customer_email}}{{issue_summary}}{{last_topic}}{{privacy_policy_url}}{{support_email}}{{ticket_id}}{{wait_estimate}}

The table export is one row per string with a character count, which is the shape a script master copy should live in outside your builder. It pastes straight into a spreadsheet.

This is a first draft, not a finished bot. The generator follows fixed rules and knows nothing about your product, your refund policy, or what your team can actually promise. Read every line, rewrite the data-question state to match what you really store, and check the opening hours against the rota before any of it goes live.

Embed this generator on your site (free)

<iframe
  src="https://chatbotscape.com/embed/tools/chatbot-script-generator/"
  width="100%" height="1600" style="border:0"
  title="Chatbot Script Generator by Chatbotscape"
  loading="lazy">
</iframe>

Three quarters of a working script is failure handling

Run the defaults above and the generator emits 24 states for a WhatsApp support bot. Six of them are the happy path: greet, offer a menu, collect one fact, read it back, close, ask whether it landed. Twelve are recovery, meaning the customer said something the bot could not use. Six are boundary states, meaning the conversation went somewhere the bot has to answer honestly rather than helpfully. Failure handling is 75% of the pack.

That figure moves with the setup, and the range is narrow. Across every combination the generator can produce, 300 of them, the packs run from 18 to 27 states and the failure share sits between 61.9% and 76.0%. Appointment booking is the lowest because a calendar adds happy-path states rather than recovery ones. Order status is the highest, because a reference number can be malformed, valid but unknown, or right but attached to nothing yet, and each of those needs different copy.

One thing that share is not: a claim about your traffic. Most conversations still take the happy path, and on a well-scoped bot most of them should. What is unevenly distributed is the writing. Six states carry the outcome and eighteen carry everything else, and a script review that spends its time on the greeting is spending it on a quarter of the problem.

What a complete script contains

Our guide to chatbot scripts sets out the seven blocks every script needs, and this tool is the executable version of that argument. The generator fills all seven, then adds the states that sit outside the blocks entirely: the ones about being a bot, about data, about abuse, and about what happens when a messaging window closes.

ClassWhat it coversDefault support pack
Happy pathOpener, menu, collection turn, read-back, close, satisfaction check6 states
RecoveryFailure ladder, format rejection, silence, repeat question, out of scope, frustration, system error, queue states12 states
BoundaryBot disclosure, data question, abuse, opt-out, out of hours, session window closed6 states

Eight of those 24 are marked as states a first draft usually contains. That marker is an editorial judgment drawn from reading published script templates and the flows we open during platform reviews, not a measurement of anybody's repository, and the tool labels it as a count rather than a benchmark. Treat it as a provocation: the sixteen you were not planning to write are the ones that decide whether the bot is tolerable at eleven at night.

The failure ladder, and why it has three rungs

The slider above sets how many times the bot tries again before it stops. Set it to three and you get three distinct rungs, which is the pattern to copy.

First miss. Restate the ask more narrowly and give the format. The customer usually knows the answer and does not know what shape you want it in.

Second miss. Change the mechanism rather than the wording. Stop asking for typed input, offer the menu, and let a tap do what a sentence could not. Our quick reply entry covers when a tap beats a text box, and quick reply versus button covers which control to reach for.

Third miss. Stop trying. Hand over, carry the transcript across, and say so. A ladder with no end is why people leave at the second failure rather than the first.

Set the slider lower and the generator does two things. It shortens the ladder, and it adds a terminal state so the bot still has somewhere to land, because a ladder without an end loops. It also raises a check telling you the ladder is short. The mechanism underneath all of this is dialogue management, and the miss counter is the part builders implement least consistently. What belongs in the script is the copy, and the copy has to differ per rung or the ladder does nothing.

The caps the copy is written to

Every line the generator produces is measured, and the character count sits next to it in the preview. This is the part that gets discovered during implementation, usually after the copy has been signed off. Change the channel and watch the numbers move.

ChannelBodyLabelOptions per messageSession window
WhatsApp (reply buttons)1,02420324 hours
Facebook Messenger2,000201324 hours
Instagram DM1,000201324 hours
Telegram4,096328None
Website widget600246None

Two of those rows need a footnote, and the tool prints both. The website widget has no vendor-imposed cap at all: 600 characters and six options are an editorial reading limit, because a widget that accepts a thousand characters will still lose the reader at four hundred. Telegram's 4,096 is a real platform limit; the button numbers in that row are ours.

The WhatsApp row deserves a second footnote because the same API publishes three different sets of numbers and picking the wrong one costs you a rewrite. A reply-button message caps the body at 1,024 with up to three buttons at 20 characters. A list message on the same API allows 4,096 in the body but caps at ten rows of 24 characters across all sections combined, so a menu that will not fit as buttons may still fit as a list. A message template, the kind you need to reopen a closed window, allows 25 characters on a quick-reply button. The generator lints against 20 because a script runs inside the session, where the tightest of the three applies. Meta also specifies that labels within one message must be unique, so two buttons cannot both read "More info", and the tool treats a repeat as a blocker rather than a style note. Our WhatsApp Business API entry covers the surfaces themselves.

The lint is not decorative. Writing this tool, the check caught three of our own generated labels over the 20-character limit before the page existed: a queue option at 23 characters, an out-of-hours option at 21, and a sales fallback at 22. All three read fine in a document and none of them would have rendered.

The states nobody drafts

Some of what the generator adds is obvious once it is on the page and invisible before. Four are worth calling out.

Format rejected is not the same as not understood. A malformed order number and an unparseable sentence need different copy, because in the first case the customer got the intent right and in the second they did not. Merging the two sends people back to retype input that was nearly correct. This is the state where slot filling gets its reputation.

In-hours unavailability needs its own line. The queue is empty at midnight and full at two in the afternoon, and both produce a customer who cannot reach anybody. Reusing the out-of-hours copy tells someone you are closed while your team is at their desks. Our handoff rules entry covers the thresholds that decide which one fires.

The session window is a state, not a setting. On WhatsApp, Messenger and Instagram the conversation closes after 24 hours of silence and reopening it takes an approved template rather than free text. That means the re-engagement line has to be written and submitted in advance. Our template approval predictor checks that line against the rejection triggers before you submit it, and session context covers what the bot should still remember when the window reopens.

Abuse should not route to a person by default. The reflex is to escalate anything hostile, which means the automation forwards abuse at an agent. The generated state ends the conversation and flags it, leaving a supervisor to decide. That is a policy position and you may hold a different one, which is why the copy is short and easy to replace.

Why we built it this way

The prompt came out of template libraries. Across the builders we open for Chatbotscape reviews, the shipped script templates are almost entirely happy path: a greeting, a menu, a capture, a close, and a single fallback line that says some version of "sorry, I did not get that" forever. The libraries are not wrong so much as incomplete, and they are incomplete in a way that flatters the demo. A happy-path script builds a bot that works in a walkthrough and disintegrates in week two.

The design decision that follows is why the copy here is deterministic rather than generated by a model. A script is a document a team argues with. If the tool produced different wording on every run you could not tell your edits from its variance, and the second draft would be a fresh negotiation rather than a diff. Fixed templates give you the same starting point every time, which makes the version-control habit our script guide recommends possible at all. That is also why one of the exports is a table with one row per string and its character count: a master copy outside the builder is the only thing that survives six months of small fixes.

Where this sits next to our other script tools

Three tools touch bot copy and they do different jobs. This one starts from nothing and gives you a full pack for a use case and a channel. The email to chatbot script converter starts from copy you already have, stripping email scaffolding out of a canned reply and re-cutting it into chat bubbles. The conversation flow simulator takes the branches you have written and lets you walk them, which is how you find out that two menu options match the same phrasing.

The order that works: generate the pack here, replace the parts that describe your business, run any customer-facing copy you inherited through the converter so it stops sounding like email, then walk the result in the simulator before you build a single node. Once it is live, the QA testing protocol turns the same states into a regression set.

What the generator will not do for you

It does not know your refund policy, your delivery estimates, or what your team can promise on a Friday night, and it does not pretend to. Three things need your attention before any of this ships.

The data-question state ships with wording that describes a common setup rather than yours, and the tool raises a check saying so on every run. It is the one line on this page you must not paste unchanged, because getting it wrong is a statement about your processing rather than a clumsy sentence.

The opening hours are a promise. Customers test it before they test anything else, and the always-open option raises a check for exactly that reason. If the rota does not cover the night, say the hours and let the out-of-hours state carry the real answer.

The tone control changes a handful of openers and apologies. It is not a personality, and it will not make a script sound like your brand. Small talk is deliberately absent for the same reason: answering "how are you" is fine, and building a personality module is a project that is rarely why anyone opened the chat.

Limitations worth stating

The channel caps are read from vendor documentation on the last-verified date at the top of this page, not probed against a live API. Platforms change limits, and a cap that moves between refreshes will be wrong here until the next one. Where a number decides something expensive, check it against the vendor docs on the day.

The copy is English and the caps are counted in characters, which means a translated script can breach a limit that was comfortable in the original. Twenty characters is generous in English and tight in German. Our multilingual guide covers what else changes, and the short version is that translation is authoring rather than conversion.

The failure share is a property of the generated pack, not a finding about scripts in general. We built the state list, so the 75% is a consequence of our editorial judgment about what a production bot needs. A team that disagrees about, say, whether abuse deserves its own state will get a different number, and that disagreement is worth having.

Nothing here is a compliance review. Bot disclosure requirements, data-handling wording and opt-out obligations vary by jurisdiction and by what you are actually doing with the transcript. Have someone qualified read the boundary states before launch.

Related Chatbotscape tools and resources

Some review links below go to platforms we may earn a commission from. That relationship does not affect scores, rankings, or what this generator produces. See our affiliate disclosure for how it works.

FAQ

What is a chatbot script?

The written copy a bot says, organized by the state it says it in. A script is not a flowchart and not a prompt. It is the set of strings a customer will read, with a note against each one saying when it fires and what happens next. On a rules-based bot the string is the output. On a generative bot most strings become a specification, though the read-back, the prices, and the legal lines stay literal. Our prompt engineering guide covers that translation.

How many states does a chatbot script need?

This generator emits between 18 and 27 depending on the combination you pick, and the count is driven by what your setup actually has rather than by a target. A channel with a session window adds a state. A bot with no route to a person loses three and gains one. Booking adds the two states a calendar needs. The number that matters is not the total but the split: on the default support script, 6 of 24 states are the happy path.

Why is most of the generated script about things going wrong?

Because the conversation has one way to succeed and many ways to stall. The default support pack is 75% recovery and boundary states. That is a share of the writing, not a share of your traffic: most conversations still take the happy path. It is the writing that is unevenly distributed, and it is the writing teams budget nothing for.

What should a chatbot say when it does not understand?

Three different things, in order. First miss: restate the ask more narrowly and give the format, so the customer knows what shape of answer works. Second miss: change the mechanism, usually by stopping the typed input and offering buttons. Third miss: stop, and hand over. Saying the same line three times tells the customer that nothing they do will change the outcome. Where the ladder should end is a policy question, covered in our escalation playbook.

How long can a WhatsApp chatbot message be?

1,024 characters in the body of a reply-button interactive message, which is the surface a session script uses most. A list message on the same API allows 4,096 in the body but caps at 10 rows of 24 characters each. Button labels are capped at 20 characters and must differ from each other within one message. The generator lints against the reply-button numbers because they are the tightest.

Does this tool use AI to write the copy?

No. Every line comes from a fixed template that varies by use case, channel, tone, and whether a person is reachable. That is deliberate: a generated script is meant to be read, edited, and argued with, and a deterministic one gives you the same starting point every time so you can tell what you changed.

Can I use the generated script as it is?

No, and one state will tell you so. The data-question copy describes a common setup rather than yours and has to be rewritten before launch. The opening hours have to be checked against the rota, because that is the promise customers test first. Everything else is a draft to argue with, not copy to paste.

Does the generator send my data anywhere?

No. Everything runs in your browser. Nothing you type is uploaded, stored, or logged, and reloading the page clears it.

Can I embed this generator on my site?

Yes, free. Copy the iframe snippet from the embed section above. The embed strips Chatbotscape navigation and keeps the generator plus attribution.

Sources and basis

  • WhatsApp field caps.Body, button label, button count, list row and section limits are Meta's published values for Cloud API interactive messages, collected for our chatbot scripts guide and re-checked for this tool on 25 August 2026. The 24-hour customer service window and the template requirement for reopening it come from the same documentation set.
  • Messenger and Instagram quick replies.The 20-character label and 13-reply limits are Meta's published send-API values. Checked 25 August 2026.
  • Telegram message length. 4,096 characters is the documented Bot API message limit. The button numbers in that row are an editorial reading limit and the tool says so.
  • Website widget numbers are ours. No vendor enforces a cap there. 600 characters and six options are an editorial reading limit derived from the same reasoning as the rest of the table, and the tool labels them as such rather than presenting them as a platform rule.
  • The state list is editorial. Which states a production bot needs, and which of them a first draft usually contains, is our judgment from platform review work and published template libraries. It is not a survey, and the 75% figure is a property of that judgment rather than a finding about scripts in general.
  • No customer deployment data. Every figure on this page is computed by the generator itself from its own output. Nothing here reports measured results from a live bot.
  • Figures reproduced from the shipped engine. The 24-state default pack, the 6/12/6 split, the 18 to 27 range and the 61.9% to 76.0% failure-share range are printed by the same code that runs above, checked across all 300 input combinations before publication.