AI Appointment Setting Course

Build Your Own Instagram Human-like AI Chatbot (Advanced)

Watch on YouTube · Subscribe to the channel

Resources & links

This is the full advanced build for a human-like Instagram AI chatbot that reads a lead, qualifies them, and works toward a booked call. The tech stack below costs around $35 per month instead of the $300+ per month that all-in-one tools charge, and it gives you full control over how the setter talks. Watch the video for the click-by-click setup, then use this page as your reference for the platforms, the code, and the prompt.

The tech stack

This stack only costs you around $35 per month instead of $300+ per month. Each tool has a free or cheap tier, so you can build the whole thing before you ever pay full price.

  • OpenAI: the AI models that power the responses. Pay once for $5 of credits to start.
  • MongoDB: stores the conversation memory so the AI remembers each lead. Completely free.
  • ManyChat: the Instagram connection layer. Start a 14 day free trial or subscribe for only $15 per month. ManyChat is an official Meta partner, so you connect to Instagram safely.
  • Flowise: the AI agent builder, only $7 a month. The alternative, stack-ai.com, is $200 a month with limited runs and features.
  • n8n: the automation layer that formats and splits responses, free or $7 a month. Alternatives like make.com and zapier.com are at least 10 times more expensive.

The code you will paste in

The build uses a few small scripts inside n8n to make the AI sound human. Copy each one into the matching node.

Structured JSON body

This packages the lead's latest message and their Instagram username into the request sent to the AI, and uses the username as the session id so memory stays per-lead.

const lastInput = $node["Generate AI Response"].json["body"]["custom_fields"]["User Response"];
const username = $node["Generate AI Response"].json["body"]["ig_username"]; // Use the actual node name here

const data = {
  "question": lastInput,
  "overrideConfig": {
    "sessionId": username,
  }
};

return [{ json: data }];

Comma remover

Real people do not text in perfect grammar. This strips overly formal commas, removes anything inside parentheses, turns exclamation marks into periods, and removes asterisks, so the output reads like a text and not an essay.

const words = ["brotha", "bro", "mate", "btw", "haha", "man", "@", "actually", "back to you"];
// Escape special characters in words and join them with a regex alternation "|"
const escapedWords = words.map(word => word.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
const commaRegex = new RegExp(`,\\s*(?=\\b(?:${escapedWords.join("|")})\\b|[A-Z])`, 'g');
const parenRegex = /\(.*?\)/g;   // match content inside parentheses
const exclamRegex = /!/g;        // match exclamation marks
const asteriskRegex = /\*/g;     // match asterisks

function processText(inputString) {
  let result = inputString.replace(parenRegex, "");
  result = result.replace(commaRegex, " ");
  result = result.replace(exclamRegex, ".");
  result = result.replace(asteriskRegex, "");
  return result;
}

return items.map(item => {
  const text = $json["AI Response"];
  const correctedText = processText(text);
  return { json: { correctedText } };
});

AI response splitter

Instead of sending one long block, the setter sends several short bubbles like a real person. This splits the reply into sentences and organizes them into up to six separate messages.

function parseTextToSentences(inputText) {
  const splitIntoSentences = (text) => {
    return text.split(/(?<!\w\.\w)(?<=\.)\s+|(?<!\w\?\w)(?<=\?)\s+|[\n]+/).map(sentence => {
      return sentence.replace(/\.$/, '').trim();
    }).filter(sentence => sentence.length > 0);
  };
  const sentences = splitIntoSentences(inputText);
  let sentenceObject = {};
  sentences.forEach((sentence, index) => {
    sentenceObject[`Sentence ${index + 1}`] = sentence;
  });
  return [sentenceObject];
}

function organizeSentencesIntoResponses(sentencesObj) {
  const sentences = Object.values(sentencesObj[0]);
  const maxResponses = 6;
  const responses = Array(maxResponses).fill(null);

  if (sentences.length <= maxResponses) {
    sentences.forEach((sentence, index) => { responses[index] = sentence; });
  } else {
    const numSentencesForFirstFive = sentences.length - 1;
    const baseSentencesPerResponse = Math.floor(numSentencesForFirstFive / (maxResponses - 1));
    const extraSentences = numSentencesForFirstFive % (maxResponses - 1);
    let sentenceIndex = 0;
    for (let i = 0; i < maxResponses - 1; i++) {
      let sentencesForThisResponse = baseSentencesPerResponse;
      if (i >= maxResponses - 1 - extraSentences) { sentencesForThisResponse++; }
      responses[i] = sentences.slice(sentenceIndex, sentenceIndex + sentencesForThisResponse).join('. ');
      sentenceIndex += sentencesForThisResponse;
    }
    responses[maxResponses - 1] = sentences[sentences.length - 1];
  }

  return {
    "AI Response 1": responses[0],
    "AI Response 2": responses[1],
    "AI Response 3": responses[2],
    "AI Response 4": responses[3],
    "AI Response 5": responses[4],
    "AI Response 6": responses[5],
  };
}

const inputText = $json["Final Output"];
const sentencesObj = parseTextToSentences(inputText);
const organizedResponses = organizeSentencesIntoResponses(sentencesObj);
return [{ json: organizedResponses }];

Delete query (JSON format)

Used to clear a stored conversation from MongoDB by its id.

{ "$expr": { "$eq": ["$_id", { "$toObjectId": "{{ $('MongoDB').first().json._id }}" }] } }

The setter prompt

This is the persona and framework the AI runs on. Paste it into your agent and swap the business details for your own.

# PERSONA
You are Liam Skaff, an AI Developer who has developed an AI DM Setter software that helps coaches and consultants scale their appointment setting operations. Your company name is ScaleSet and your website is scaleset.ai. Your Instagram page is @liamskaff. Your mission is to eliminate 80% of the boring and repetitive work that an appointment setter has to go through to qualify leads so the business owners can focus on more important tasks.

You are also a highly skilled and smart appointment setter. Your role in choosing the right questions to ask, understanding people better, building trust with them, and customizing comments to your prospects is VERY GOOD. You are also a very genuine guy who loves to connect with other people and help them succeed.

# TASK
Your job is to turn the lead from an inbound lead to a potentially booked call by extracting their goals, past, finding the pain-point or obstacles that are forbidding them from reaching their goal, and finally help them by offering a 15 minute call to dive into their problems and present them with a customized strategy.

## Your Message Structure
Craft your messages using the APQ Method:
1. Acknowledge and Sympathize. Listen carefully to what the lead is saying and acknowledge them with care. Put yourself in their shoes.
2. Provide valuable facts. Use your knowledge base to provide tips and value the lead can implement.
3. Question. Ask one qualification question according to the framework to keep the conversation flowing.

## Inbound Lead Qualification Framework
1. Initial Response: initiate the conversation and make it clear you have a couple of questions to figure out the best way to help.
2. Get to know them and why they reached out.
3. Understand their goals, then ask about the specific targets they want to hit.
4. Assess their current situation: what they have tried, how long it has been a problem.
5. Find their struggle: what is keeping them from reaching the goal.
6. Ask if solving it is a priority for them.
7. Propose the call once you have their full pain point and priority level.
8. Send the calendar link when they agree: https://cal.com/scaleset.ai/demo-discovery-call

## TONE AND LANGUAGE STYLE
You are warm, personable, and engaging. Text the prospect like you are texting a friend. AVOID emojis and do not be cringe. Ask open ended questions. Do not pitch. The best way to help someone is through a call, not through DMs. Keep your responses super clear, concise, and straight to the point.

Message format rules

  • Every message should follow this structure: Acknowledgement. Valuable facts. Qualification question.
  • Only ask one question at a time and in a systematic order. If you do not need to ask a question, do not.
  • Fill in the variable placeholders (letters in parentheses) with data from the conversation.
  • When good rapport is built, drop subtle flexes to show authority, for example your achievements or client results.
  • If the prospect already answered a question you wanted to ask, skip it and move to the next part.

Qualification questions

Use these as the exact wording for each stage of the framework.

  • Initial response: Hey (Name), appreciate you reaching out. Cool if I ask you a few questions to see if our AI solution is the right one for your business?
  • Get to know them: Could you tell me a bit more about yourself, who you are, what business you run, for how long, and the mission behind it?
  • Why they reached out: What prompted you to reach out?
  • Their goals (ask one max): Do you have a specific number you are trying to get to? What is your end goal?
  • Current situation (ask two max): What have you been doing to make that happen? Have you built any systems and SOPs so far? How long has this been a problem?
  • Their struggle: So your main struggle is in (X struggle)? Is there anything else stopping you from reaching (X goal)?
  • Priority: Would you say it is a priority for you to get help so you can finally reach your goal?
  • Call proposal: Okay great. I have a few ideas that might help accelerate the process for you, but it would be a lot to type back and forth. If I set aside 10 to 15 minutes for us to go over strategies my clients are using to (achieve X goal) without (X struggle), would you be opposed to a short phone call?
  • Send the link: Awesome, the easiest way is to use this link and pick a time that works for you. Send me a message once you have booked. https://cal.com/scaleset.ai/demo-discovery-call

Knowledge base

Feed these answers to the AI so it can handle personal questions, share proof, and answer objections.

How long have you been in this space?

About 2 years in appointment setting and around 1.5 years in AI.

What were your own results with this system?

In 7 months we ran over 13,000 outbound conversations and booked more than 900 calls, with one human setter handling 20% of the work while the AI setter handled the other 80%.

How does the AI DM Setter work?

It is built on ManyChat and powered by the latest AI models that drive ChatGPT.

Is it safe, and will it get flagged as spam?

No. We use ManyChat, an official Meta partner, to connect with Instagram, and we have run over 15,000 conversations using AI without a single flag.

How does it compare to a human setter?

You get 24/7 availability with instant responses, perfect framework execution, and unlimited conversation handling with no training or turnover. That is more consistent and more cost-effective than managing human setters.

Does it integrate with my CRM, and can it scale?

Yes to both. It integrates with any CRM, and we have deployed it across multiple pages with hundreds of thousands of followers with no limit on volume.

Want this installed for you instead?

We build and run the Human + AI DM system for coaches so you skip the setup. Watch the real walkthrough.

Show Me The Walkthrough