Ai Coding Tools

How to Build an AI-Powered Chatbot in 90 Minutes

By BTW Team4 min read

How to Build an AI-Powered Chatbot in 90 Minutes

Building an AI-powered chatbot might sound intimidating, especially for beginners. But what if I told you that you could create a functional chatbot in just 90 minutes? This guide is for indie hackers and solo founders who want to dip their toes into AI without getting overwhelmed. I’ve done this, and I’m here to share the specific tools and steps that worked for me.

Prerequisites: What You Need Before You Start

Before we dive in, let’s ensure you have everything you need:

  • Basic coding knowledge: Familiarity with JavaScript or Python will help, but you can still follow along if you're a determined beginner.
  • Accounts on AI platforms: Sign up for a free account on tools like OpenAI (for GPT models) and a chatbot platform like ManyChat or Dialogflow.
  • A text editor: Use VS Code or any code editor you're comfortable with.

Step-by-Step Guide: Building Your Chatbot

Step 1: Define Your Chatbot’s Purpose (10 minutes)

Before jumping into coding, decide what your chatbot will do. Is it for customer support, lead generation, or just for fun? Knowing its purpose will guide your development.

Step 2: Choose Your AI Tool (10 minutes)

Here are some popular AI tools to consider:

| Tool | Pricing | Best For | Limitations | Our Take | |---------------|-----------------------------|------------------------------|--------------------------------------|-------------------------------| | OpenAI GPT-3 | Free tier + $20/mo pro | Natural language processing | Limited control over responses | We use this for conversational AI. | | Dialogflow | Free tier + $25/mo pro | Building chatbots | Steeper learning curve | We like the integration options. | | ManyChat | Free + $10/mo pro | Facebook Messenger bots | Limited to Messenger, not as flexible| We use this for marketing bots. | | Chatbot.com | $49/mo, no free tier | All-in-one chatbot solution | Higher cost, fewer customization options | We don't use it due to cost. | | Tidio | Free tier + $18/mo pro | Customer support bots | Limited features on the free plan | We find it effective for small businesses. | | Botpress | Free, self-hosted | Open-source chatbot | Requires hosting and setup | We recommend this for developers. |

Step 3: Set Up Your Environment (15 minutes)

  • Create a new project folder on your computer.
  • Initialize a new project using npm init (if using JavaScript) or set up a virtual environment (if using Python).
  • Install necessary libraries. For example, if you're using Node.js, run:
    npm install express body-parser openai
    

Step 4: Build the Bot Logic (30 minutes)

Here’s a simple outline of what your code might look like. This example uses JavaScript with Express and OpenAI:

const express = require('express');
const bodyParser = require('body-parser');
const OpenAI = require('openai-api');

const app = express();
app.use(bodyParser.json());

const openai = new OpenAI('YOUR_API_KEY');

app.post('/chat', async (req, res) => {
    const userMessage = req.body.message;
    const gptResponse = await openai.complete({
        engine: 'davinci',
        prompt: userMessage,
        maxTokens: 150,
    });
    res.json({ reply: gptResponse.data.choices[0].text });
});

app.listen(3000, () => console.log('Chatbot server running on port 3000'));

Step 5: Test Your Chatbot (15 minutes)

Run your server and test the chatbot locally using tools like Postman or your web browser. Make sure it responds appropriately to various inputs.

Step 6: Deploy Your Chatbot (10 minutes)

Once you’re satisfied, consider deploying your bot. You can use platforms like Heroku or Vercel for easy deployment.

Troubleshooting: What Could Go Wrong?

  • No response from the bot: Check your API key and ensure your server is running.
  • Unexpected outputs: Revisit your prompt structure; fine-tuning may be necessary.
  • Deployment issues: Ensure all environment variables are set correctly.

What’s Next?

Once your chatbot is live, consider expanding its capabilities. You could integrate it with a website or connect it to a database for personalized experiences. Keep iterating based on user feedback.

Conclusion: Start Here

Building an AI-powered chatbot doesn’t have to be an overwhelming task. With the right tools and a clear plan, you can have a functional bot up and running in about 90 minutes. Start by defining your bot’s purpose, choose the right AI tool, and follow the steps outlined above.

What We Actually Use

In our experience, we primarily use OpenAI for natural language processing and ManyChat for user engagement. They complement each other well, allowing us to create responsive and engaging chatbots without breaking the bank.

Follow Our Building Journey

Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.

Subscribe

Never miss an episode

Subscribe to Built This Week for weekly insights on AI tools, product building, and startup lessons from Ryz Labs.

Subscribe
Ai Coding Tools

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time As a developer, whether you're just starting out or have years of experience, debugging can feel like a neverend

Oct 16, 20265 min read
Ai Coding Tools

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
Ai Coding Tools

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read