How to Develop a Chatbot in Articulate Storyline: 3 Ways
By Devlin Peck · Updated
Part of the Articulate Storyline & xAPI Development guide
There are three ways to develop a chatbot in Articulate Storyline: 1) simulate one with triggers, layers, and variables; 2) connect Storyline to an LLM like ChatGPT with JavaScript; or 3) build the chatbot on an external platform and embed it as a web object. The first path fits portfolio-builders and locked-down environments, the second fits developers who want full control, and the third fits anyone who wants real AI without writing or maintaining code.
This guide covers all three, including the part every other tutorial skips: how to get chatbot results into your LMS. If you are still learning Articulate Storyline from scratch, start with the full guide and come back once you are comfortable with triggers and variables.
Everything here works as of Storyline 360's August 2026 release.
Can Articulate Storyline create a chatbot?
Yes, but Storyline has no native chatbot component, so you either simulate one with built-in features or bring AI in from outside. Nothing on the Insert tab says "chatbot," and this catches a lot of people off guard given how much AI Articulate has been shipping lately.
Two Articulate features cause most of the confusion:
- AI Assistant in Storyline 360 helps you, the author. It generates quiz questions, copy, imagery, and voices while you build, as covered in Articulate's AI Assistant guide. Your learners never see it.
- AI Tutor is a learner-facing chatbot, but it exists only in Rise 360, per Articulate's AI Tutor documentation. There is no Storyline equivalent.
So if you want a chatbot your learners can talk to inside a Storyline course, you are building it one of these three ways:
| Approach | Real AI? | Coding required | Build time | Ongoing cost | LMS reporting | Best for |
|---|---|---|---|---|---|---|
| 1. Simulated chatbot (triggers and layers) | No, scripted responses | None | A few hours to a day | None | Standard Storyline tracking | Predictable Q&A, locked-down environments, portfolio trigger work |
| 2. DIY JavaScript + LLM API | Yes | JavaScript, API setup, ideally a middleware server | Days, plus ongoing maintenance | Pay per API token | Custom xAPI statements you write yourself | Developers who want full control over the code |
| 3. Embedded AI widget or simulation platform | Yes | None (a web object and a few triggers) | 30 to 60 minutes | Subscription or usage credits | Handled for you, passes through SCORM/xAPI | Teams that need reliable AI conversations without maintaining code |
Each row gets its own section below, so you can jump straight to the one that fits.
Option 1: How do you simulate a chatbot with triggers and layers?
You build a chat-style interface with a text-entry field, variables, and layers that show pre-written responses. No AI, no external calls, and it works in any LMS, including locked-down environments that block outside connections.
The build looks like this:
- Design the chat UI. A message panel, a text-entry field at the bottom, and a send button. Chat bubbles are just rounded rectangles. If learners will watch video responses inside the chat, you can also generate closed captions for those videos.
- Capture the learner's input. The text-entry field writes to a text variable. You can display it back in a chat bubble with a
%variable%reference so the conversation feels live. - Show responses on layers. Each pre-written bot reply lives on its own layer (or state), and triggers (with light JavaScript) decide which one appears based on what the learner typed or which button they clicked.
- Branch the conversation. Variables track where the learner is in the conversation so follow-up responses make sense.
Here is a full walkthrough of the visual design, triggers, layers, JavaScript touches, and troubleshooting from a blank slide:
The limits are what you would expect. The responses are scripted, so the bot only "understands" inputs you predicted. Type anything unexpected and you need a graceful fallback reply. This is not a weakness for every project, though. If the content is a predictable Q&A flow (think onboarding FAQs or a guided help menu), scripted responses are actually a feature: they never hallucinate, cost nothing to run, and never expire.
This is also a strong portfolio build, because it shows off trigger logic, variables, and layer management in one artifact. And if you want to track what learners actually type into your chatbot, you can capture learners' typed responses with xAPI and send them to an LRS.
For a more modern and future-proofed portfolio, though, Options 2 and 3 would be much more impressive to hiring managers.
Option 2: How do you connect Storyline to ChatGPT with JavaScript?
You capture the learner's message in a Storyline variable, send it to the OpenAI API with an Execute JavaScript trigger, and write the reply back into Storyline with SetVar. This is the route the Articulate community thread on integrating a chatbot into Storyline converges on, and it gives you a real AI conversation inside your course.
The pattern, at a conceptual level:
- Create text variables like
message,response, andchatHistory. - Bind a text-entry field to
messageand add a send button. - On the send button, run an Execute JavaScript trigger that reads
messagewithGetPlayer().GetVar(), appends it to the chat history, calls the OpenAI chat completions endpoint withfetch, and writes the reply back withSetVar(). - Display
%response%in a text box or scrolling panel, and use a system prompt (a "role" instruction) to keep the bot on topic.
Rather than duplicating code that already exists, I will point you to the strongest resources: Noraiz Malik's step-by-step AI chatbot tutorial includes a downloadable source file and the exact JavaScript triggers, and the open-source ChatGPT in Articulate Storyline 360 library on GitHub gives you a reusable script (note that I have not used or fully evaluated this code myself). You will need your own key from OpenAI's API keys page. I also have a video tutorial on adding ChatGPT to Storyline that shows a quick front-end setup, which is great for prototypes and portfolio demos but not for production, for the reason below.
Why you should never ship your API key in a published course
Published Storyline output is readable client-side. Anyone can open your course's files in the browser's developer tools, find the key, and use it to run up charges on your account. This is why the community consensus, and the warning in Noraiz's own tutorial, is to route calls through a middleware server: a small backend that holds your key privately, receives the learner's message from Storyline, calls the LLM, and returns the reply. Storyline only ever talks to your server.
A downside here, though, is that your org would need to approve the server that you are adopting for middleware, or you'd need to use an already-approved server (because with servers come security overhead).
Go in with clear eyes on the ongoing costs, too. You pay per token, so costs scale with usage. Models get deprecated, so a course that works today can break next year. Keeping the bot on-topic takes real prompt engineering. And you own all of the maintenance. If you enjoy this kind of work, Option 2 is genuinely fun, and it pairs well with the JavaScript foundation in my full guide to JavaScript and xAPI in Storyline. If you do not, Option 3 exists for you.
Option 3: How do you embed an AI chatbot in Storyline without coding?
You build the chatbot or conversation simulation on an external platform, then drop it into Storyline as a web object. No API keys, middleware, or JavaScript to maintain, and reporting is handled for you.
Which platform depends on what the chatbot is for:
For knowledge Q&A, where learners ask questions and get answers, Cluelabs' AI chatbot widget builds Q&A bots grounded in documents or question-and-answer pairs you provide, powered by ChatGPT or Gemini, with Storyline templates to speed up integration. devlin.ai also has an AI Coach feature that you can embed in a course.
For conversation practice, where learners talk to an AI character and get scored on how they handle it, this is what I primarily build devlin.ai for (disclosure: it is my company). You describe the scenario in plain English and get a working simulation, AI evaluation scores the learner's performance against your own rubric, and you get full transcripts and scores that report back to the course.
The piece that matters most for Storyline developers is the variable bridge. A devlin.ai sim can update Storyline variables directly, things like score, pass/fail, and even character mood, so your course can react to the conversation as it happens. Once the sim can write to Storyline variables, your triggers can do anything with them.
Describe a conversation your learners need to practice and try the simulation that it builds, right here from this article (this is the same simulation you would embed in Storyline):
The 5-step Storyline implementation
Wiring a sim into Storyline takes less than 30 minutes if you are already comfortable in Storyline, and up to an hour if you are new to it. The condensed version, and the full implementation guide lives on the devlin.ai platform under Publishing settings.
Insert the sim as a web object
In Storyline, go to Insert, then Web Object, and paste your simulation's embed URL. Set it to display in the slide and size it to fill the area where the chat should appear.
Create matching Storyline variables
Open the Variables panel and create variables whose names exactly match the ones your sim reports. The automatic ones are:
Variable Type Sim_Complete True/False Sim_Turn Number Sim_Pass True/False Sim_Score Number Sim_Feedback Text Sim_EvalComplete True/False Plus any custom variables your scenario defines, like a True/False for whether the learner hit a specific objective.
Add one JavaScript trigger
On the same slide, add an Execute JavaScript trigger set to run when the timeline starts. It loads a small bridge script that listens for updates from the simulation and writes them into your Storyline variables. This is the only JavaScript in the whole setup.
Make your course react
Use "when variable changes" triggers like you would with any Storyline variable: change a character image's state when a mood variable turns defensive, show a Passed layer when Sim_Pass is true, or drop
%Sim_Score%into a text box to display the score (which is also a handy way to confirm the bridge is working).Send results to the LMS
Once Sim_EvalComplete is true, run an Execute JavaScript trigger that calls
sendResultsToLMS(). Score, pass/fail, session time, and completion status all write to the learner's existing SCORM session. Nothing else to configure.
The trade-off with any embedded approach is that you are paying for a platform (devlin.ai pricing is usage-based AI credits, so you effectively pay per conversation) and the widget needs internet access at runtime. In exchange, you skip the API key problem, the middleware server, the prompt-engineering maintenance, and the reporting build entirely.
Chatbot or conversation simulation: which should you build?
Build a chatbot when learners need answers, and build a conversation simulation when learners need practice. In my experience, most "chatbot in Storyline" projects turn out to be the second one: the goal was never a bot that answers questions...it was a character that learners could talk to.
Build a chatbot when learners need answers. Build a conversation simulation when learners need practice.
Map your use case:
- Knowledge Q&A, performance support, course FAQs, or guided help: this is a chatbot (or a Coach on the devlin.ai platform). Any of the three options above works, chosen by budget and technical appetite.
- Role-play, feedback conversations, sales calls, de-escalation, or simulated customer interactions: this is a scored simulation. Learners need a character with a personality, a conversation that responds to what they actually say, and an evaluation at the end.
The ceiling on the simulation side is higher than most people expect. One of our students, Susan, worked with me on a prototype with six AI-powered characters, each with its own distinct personality, all running inside Articulate Storyline. You can see Susan's project in this video. Helping her build it in our weekly AI workshops stretched what I thought was possible with AI inside Storyline.
One related decision is whether Storyline is even the right container for your course. If your project is mostly information with a chatbot bolted on, the Storyline vs. Rise comparison is worth a read before you commit.
How do you report chatbot results to your LMS?
A non-AI static chatbot doesn't have tracking out of the box, a DIY chatbot needs custom xAPI statements, and an embedded sim can pass score and completion through Storyline's existing SCORM connection. This question comes up constantly in the community threads, and here's the answer for each option:
- Option 1 (static): the LMS sees normal Storyline completion. If you want the actual conversation data, send custom xAPI statements from Storyline to capture what learners typed and which paths they took.
- Option 2 (DIY): the LMS knows nothing about your chatbot unless you build the reporting yourself, which means custom xAPI statements for every event you care about. Reporting is the part most DIY tutorials skip, and it is often half the work.
- Option 3 (embedded devlin.ai sim): calling
sendResultsToLMS()writes score, pass/fail, session time, and completion into the learner's existing SCORM session, so no separate reporting build is needed.
This kind of tracking is very learnable. I ran a 10-week free tutorial series teaching xAPI and Articulate Storyline, and by the end, participants were presenting projects with custom tracking they had built themselves.
And if you are publishing to a website or portfolio rather than a corporate LMS, you can still track eLearning without an LMS using an LRS.
Frequently asked questions
Can you add a chatbot to Articulate Rise?
Not natively as a custom chatbot, but Rise 360 does include AI Tutor, Articulate's built-in learner-facing chatbot for course Q&A. For anything custom, the embed approach from Option 3 works the same way in Rise as in Storyline: build the chatbot or simulation externally and embed it in your course.
Do you need an API key to build a chatbot in Storyline?
Only for the DIY JavaScript route (Option 2). A simulated chatbot uses only built-in Storyline features, and an embedded widget or simulation platform manages the AI connection on its own servers, so no key ever touches your course.
Is a Storyline chatbot a good portfolio project?
Yes. I have recommended building portfolio projects in Articulate Storyline for years because demand for the tool is so high, and the tool-demand data I publish here on devlinpeck.com backs this up. A chatbot or AI simulation project demonstrates the most in-demand authoring tool plus AI integration in a single artifact. This combination is central enough that students at Peck Academy, my licensed career school, build an AI-integrated flagship project in Storyline 360 as the centerpiece of their portfolios. If you need somewhere to host the finished project, devlin.host offers free HTML project hosting inside devlin.ai, and the Starter plan ($9/month) adds a custom domain.
Will an embedded chatbot work in every LMS?
It needs internet access at runtime, so test in your actual LMS early. Most modern LMSs handle web objects fine, but locked-down environments that block external connections will break any embedded or API-based chatbot. In those environments, you'd need to build a static chatbot or get IT support. See the LMS reporting section above for how results flow in each case.