How to integrate Flash AI with your website
Adding Flash AI to your website takes just 3 steps.
Go to flashai.pl, click "Order" and configure your AI assistant — name, personality, knowledge base.
Add one line to your website, just before the closing </body> tag:
<script src="https://flashai.pl/widget.js" data-ai="TWOJE_BOT_ID"></script>
The chat widget will appear in the bottom-right corner of your website. Your AI assistant is ready to talk to visitors.
Customize widget behavior using HTML attributes on the script tag.
| Attribute | Description |
|---|---|
data-ai (required) |
Your bot ID |
data-name |
Display name in chat header |
data-color |
Accent color (hex) |
data-auto-open |
Auto-open chat on page load |
data-fullscreen |
Fullscreen mode |
data-lang |
Force interface language |
<script src="https://flashai.pl/widget.js"
data-ai="twoje_bot_id"
data-name="Asystent Sklepu"
data-color="#ff6b00"
data-auto-open="true"></script>
Control the widget programmatically from your website code.
| Method | Description |
|---|---|
FlashAI.open() |
Opens chat window |
FlashAI.close() |
Closes chat window |
FlashAI.toggle() |
Toggles chat open/closed |
FlashAI.send("text") |
Sends a message immediately |
FlashAI.setInput("text") |
Sets input text without sending |
FlashAI.isOpen |
Checks if chat is open |
<!-- Button that opens the chat -->
<button onclick="FlashAI.open()">Chat with us</button>
<!-- Button that sends a specific question -->
<button onclick="FlashAI.send('I want to book an appointment')">Book now</button>
<!-- Link that pre-fills the input -->
<a href="#" onclick="FlashAI.open().setInput('Pricing')">Ask about pricing</a>
Add #flashai-open to any URL and the chat will open automatically. Perfect for QR codes, email links, or buttons.
https://your-website.com/#flashai-open
For full control, use the JavaScript configuration object before loading the widget script.
<script>
window.FlashAI = {
botId: "twoje_bot_id",
config: {
agentName: "Asystent",
primaryColor: "#00f5ff",
position: "bottom-right",
languages: ["pl", "en"],
trigger: {
type: "delay",
delay: 5
},
teaser: {
enabled: true,
delay: 3,
message: "Hi! Need help?"
}
}
};
</script>
<script src="https://flashai.pl/widget.js"></script>
"immediate"
Widget appears immediately
"delay"
Appears after specified seconds
"scroll"
Appears after scrolling specified %
"engagement"
Appears after user engagement
"exit"
Appears on exit intent
"manual"
Only via API call
Online