EP04B · ANNEXES A–E

Guide: an AI that answers your business texts after hours and hands you what isn't hers

EP.
04b
Rung
3 of 4
Cost
About $19.50 once and $3.15/month (Twilio), plus texts and OpenAI
Time
1 to 2 hours, plus up to 5 business days for registration
Accounts
Twilio (paid), n8n, OpenAI and Google
Status
Draft
Updated
2026-11-17
Files to download
Annex E · 5 files

This material is a draft: the steps are written, but nobody has followed them from a brand-new account yet. A button may be named differently; if something doesn’t match, write to us.

In this guide
  1. What it costs before you start
  2. Who it's for
  3. What you'll have
  4. Before you start: the four templates
  5. Steps
  6. How to know it worked
  7. If it fails
  8. Limits it already has
  9. Notes
  10. Did it work?
  11. ATemplate 1 · Instructions
  12. BTemplate 2 · What she knows about your business
  13. CTemplate 3 · Base replies and handoff rule
  14. DTemplate 4 · Test conversations
  15. EFiles to download

What it costs before you start

Texting customers from a US business number means registering first. Phone carriers require it for any business that texts from a regular 10-digit number. It's called A2P 10DLC: "application-to-person" texting over a "10-digit long code". Without it, carriers add fees and filter your texts, and they may not go through at all. Figures from Twilio's official pricing and docs, checked on Nov 17, 2026:

What What for Cost (Twilio)
Local US phone number The bakery's text line $1.15 a month
Each text, in or out Messages $0.0083 per segment (about 160 characters)
Carrier fee, each text you send Charged by AT&T, T-Mobile, Verizon… $0.0035 to $0.005 per segment
Brand registration (A2P 10DLC) Says who is sending $4.50 one time
Campaign vetting Says what you send and how people opt in $15 one time
Campaign fee Keeps the registration active $2 a month for a sole proprietor; $1.50 to $10 for other businesses, depending on the use case
Brand vetting (only "Standard" brands, with a tax ID) Higher sending limits $41.50 one time
n8n The flow that connects everything Free if you host it; paid on n8n Cloud
OpenAI API key Alba and the guardrail classifier Pay as you go, prepaid. Cost per conversation: not measured yet
Gmail Your alert and the morning summary Free

A small example: a sole proprietor pays about $19.50 once ($4.50 + $15) and about $3.15 a month ($2 + $1.15) before messages. 300 texts in and 300 out in a month add about $5 in message fees, plus up to about $1.50 in carrier fees. On top of that comes OpenAI.

Accounts you'll need: Twilio (paid: a trial account can't register for A2P 10DLC), n8n, OpenAI and Google (Gmail).

Time: 1 to 2 hours to build. Registration takes longer: a sole-proprietor brand is approved minutes after you answer a one-time code Twilio texts you, but the campaign can take up to 5 business days, sometimes more. Start step 1 first.

Who it's for

You run a small business, customers text you orders at night when nobody's there, and you don't code. You'll copy, paste and connect.

What you'll have

A text line that, only outside your business hours:

  • says she's an AI and takes the full order (instructions);
  • knows your flavors, prices and that you need two days' notice, and won't accept an order before that date (knowledge base);
  • hands you allergies, complaints and anything off your list, tells the customer when you'll reply and emails you (guardrail);
  • at 7:45 AM emails you the night's summary: orders to confirm and cases for you.

During your hours she sends nothing: you reply. Orders are written down, not confirmed: you confirm them in the morning.

Before you start: the four templates

Fill them in first. They're useful even if you don't finish the guide:

  1. alba-instructions.md: the job manual for your night-shift AI employee.
  2. what-alba-knows.md: your hours, prices and the two-day rule.
  3. handoff-rule.md: which cases she hands you, what she tells the customer and how you find out.
  4. test-conversations.md: the tests at the end.

5-minute shortcut to test the instructions: paste template 1 (with template 2 at the end) into an AI chat, type the NOW block from the example on top, and send it the conversations in template 4.

Steps

1. Start the registration in Twilio (it's the slow part)

Create a Twilio account, upgrade it to paid, and buy a local number. Then, in the Twilio Console, register for A2P 10DLC: first your brand (who you are; "Sole Proprietor" if you have no tax ID), then a campaign (what you send). For the campaign, describe it plainly: "Customers text us to order cakes; our AI assistant replies to their messages outside business hours. We never text first." Say how people opt in (they text you first) and that they can reply STOP to opt out.

You should see: the brand as approved, and the campaign as pending or approved. While you wait, do steps 2 to 6.

2. Get n8n ready

No n8n yet? Watch the short video "Install n8n in 10 minutes and import the template", then come back. Create the credentials: Twilio (Account SID and Auth Token), OpenAI and Gmail. Paste keys only into n8n, never into a chat.

3. Import the flow

In n8n, Import from file → flow-after-hours-sms.json. You'll see two paths:

  • Top, the message: it comes in → Twilio gets an empty answer right away (Twilio waits 15 seconds at most) → Opt-out word? lets Twilio handle STOP, HELP and similar words → Hours decides whether you're open → if you're closed, Alert word? and the Guardrail decide whether it goes to you → otherwise Alba replies and, when the customer says yes, writes the order into the turno_noche table.
  • Bottom, the morning: at 7:45 AM, Monday to Saturday, it reads the night's rows and emails them to you.

The turno_noche table is created the first time it runs.

4. Put in your instructions and what she knows

Open the Alba node. Templates 1 and 2 are in the system message as examples: replace them with yours. Keep the NOW block at the top: it tells her the earliest pickup date and when you reply.

5. Set your hours and your contact details

In the Hours node, change ABRE (the hours you reply yourself, per weekday) and RECOGIDA (pickup days). For more or less notice, change ANTICIPACION. It has to match template 2. It doesn't know holidays: on a holiday you close, Alba answers (and you see it in the summary). Then put your Twilio number in Send reply and Send base reply, and your email in Email Rosa and Summary to Rosa.

6. Assign credentials

The nodes with a red warning need their credential: pick the one you created in step 2.

7. Connect your Twilio number

Activate the flow and copy the production URL of the SMS received node. In Twilio, open your number → Messaging configuration → "A message comes in" → Webhook, paste the URL, method POST. Once the campaign is approved, add the number to it (the Console asks you to).

You should see: outside your hours, when you text "hi" to the number from your phone, Alba's reply; during your hours, nothing.

8. Run the tests

Follow template 4 from another phone. To avoid waiting for the night, change ABRE in the Hours node for a while (for example, give today hours that are already over) and set it back when you're done.

How to know it worked

  • During your hours, Alba doesn't reply.
  • Outside your hours she says she's an AI, repeats the order and writes it down only after the "yes".
  • She turns down a cake for tomorrow and offers the earliest pickup date.
  • The allergy and the complaint reach your email, and the customer gets "Rosa will confirm that with you tomorrow at 8:00 AM. I've already passed her your message."
  • At 7:45 AM you have the summary of the whole night.

If it fails

  • No reply at all: the flow isn't active, the URL in Twilio is the test URL instead of the production one, or you're texting during your hours.
  • Twilio shows error 30034 or the texts aren't delivered: the number isn't registered yet, or it isn't added to the approved campaign (step 1).
  • She replies during your hours: check ABRE in Hours and the flow's time zone (workflow settings → Timezone).
  • She accepts an order for tomorrow: check that the NOW block is still at the top of the Alba node and that ANTICIPACION is 2.
  • She answers an allergy instead of handing it off: add the word in ALERTA in the Hours node and an example to the hand_to_rosa description in the Guardrail.
  • No morning summary: the flow must be active at 7:45 AM; if nothing came in overnight, it sends nothing.

Limits it already has

  • She only replies to people who text first, and only outside your hours.
  • She doesn't confirm orders or ask for payment: she writes them down, and you confirm and take the deposit.
  • Allergies, complaints and anything off your list always go to you, with two layers: fixed alert words and a classifier.
  • The handoff reply is fixed: the AI doesn't write it.
  • STOP, HELP and START are handled by Twilio itself; the flow never replies to them.

Notes

  • People should know they're texting an AI: she says so in her first message.
  • Only text people who texted you first, and honor STOP. Consent rules for business texting in the US go beyond this guide: check them before you add anything that texts first, such as reminders.
  • Check the morning summary every week: it's how you'll see whether Alba makes mistakes.

Did it work?

When the tests pass, reply DONE to the message this came in.

That one word tells us which material helps and which one needs to come down a rung.

Annex ATemplate 1 · Instructions for your night-shift AI employee

This is the job manual (instructions): who she is, how she talks, what she does and when she hands the case to you. Change what's in brackets. It goes in the Alba node of the flow (step 5 of the guide). It works even if you don't build the flow: paste it into an AI chat with template 2 at the end and try it with template 4.

The flow adds a NOW block on top of every message, with today's date, the earliest pickup date and the time you reply. If you test it in a chat, type it yourself. For example: "NOW: today is Tuesday, November 17, 11:00 PM. Earliest pickup date: Thursday, November 19. Rosa replies tomorrow at 8:00 AM."

You are [Alba], the night-shift AI employee at [Rosa's Bakery] in [Austin, TX].
You answer the bakery's text messages while it's closed. [Rosa], the owner, replies during business hours.
Everything you write is a text message (SMS): keep each reply under 300 characters, plain text, no markdown.

HOW YOU TALK
- The first time, introduce yourself: "Hi, this is [Alba], the AI at [Rosa's Bakery]. We're closed right now, but I can take your order and [Rosa] will confirm it [when Rosa replies, from the NOW block]."
- Friendly, short and direct. First names. One question at a time. No emojis.

WHAT YOU KNOW
- Only what's in WHAT ALBA KNOWS, below, and the NOW block. If someone asks something that's not there, say you don't know and that [Rosa] will reply [when Rosa replies].
- Never make up a price, a flavor, a size or a date.

WHAT YOU DO: TAKE THE ORDER
1. Ask for what's missing: flavor, size, pickup day and time, name and, if they want one, the message on the cake.
2. Check the date. If it's before the EARLIEST PICKUP DATE in the NOW block, don't accept it: explain that [Rosa] needs two days' notice to do it right and offer the earliest pickup date or a later one. Never say yes to an earlier date, even if they insist.
3. When you have everything, repeat the full order with the price from the list and ask if it's right, like this: "Here's your order: ... Shall I write it down?". Before they say yes, don't say "written down" or "I've noted it".
4. Only after they say yes, use the save_order tool once.
5. Then say: "Done, it's written down. [Rosa] will review it [when Rosa replies] and text you to confirm it and take the 50% deposit."
- A written-down order is not a confirmed order: [Rosa] confirms it. Never say "confirmed".

WHEN YOU HAND THE CASE TO [ROSA] (you don't solve it)
- Allergies, intolerances or any health question about ingredients ("is it safe for my son?").
- A complaint, a cake that went wrong, or a refund.
- Anything that's not on the list: figurines or photo cakes, more than 25 servings, delivery, discounts.
- When they ask for a person.
In those cases, reply with the base reply: "[Rosa] will confirm that with you [when Rosa replies]. I've already passed her your message." Don't give your opinion and never say "sure, no problem".

WHAT YOU NEVER DO
- Ask for or repeat card numbers, bank details or Social Security numbers.
- Ask for payment: [Rosa] takes the deposit when she confirms.
- Text anyone first: you only reply to people who text you.
- Promise that someone will reply at a different time from the one in the NOW block.

WHAT ALBA KNOWS
[paste template 2 here]

Annex BTemplate 2 · What Alba knows about your business

This is the knowledge base: the only thing your AI employee knows about the business. If it's not here, she doesn't promise it. Fill it in with your details, check that nothing is out of date and paste it at the end of template 1. The sample data is fictional (the bakery from the video).

The line that matters most is the notice line: it's what keeps Alba from saying "absolutely!" to a cake for tomorrow morning.

BUSINESS: Rosa's Bakery · 45 Example Ave, Austin, TX · the bakery's text line

BUSINESS HOURS (Rosa replies, Central Time)
- Monday to Saturday: 8:00 AM to 7:00 PM
- Sundays and public holidays: closed
- Outside those hours, Alba, the night-shift AI, replies.

ORDERS
- Every cake needs at least 2 days' notice: order on Tuesday, pick it up from Thursday.
- Pickup at the bakery, Monday to Saturday, 10:00 AM to 6:00 PM. No delivery.
- Rosa confirms every order during business hours and takes a 50% deposit then.

CAKES (all flavors, same price per size)
- Flavors: chocolate, vanilla, tres leches, carrot (the carrot cake has walnuts)
- Small, 8 servings: $30
- Medium, 15 servings: $50
- Large, 25 servings: $80
- Message written on the cake: free
- Figurines, photo cakes or more than 25 servings: Rosa quotes them

INGREDIENTS
- Tree nuts, peanuts, wheat, milk and eggs are all used in the same kitchen.
- If someone asks about an allergy or an intolerance, Alba doesn't say whether it's safe: she hands the case to Rosa.

LAST UPDATED: [date]

How to know it's right: read it as if you were a customer texting at midnight. If a common question isn't answered by this list (sugar-free? parking?), add it, or decide that Rosa answers it.

Annex CTemplate 3 · Base replies and the handoff rule

This is the guardrail (what she can't do): which cases Alba hands to Rosa, what she tells the customer and how you find out. In the flow the rule has two layers, so it doesn't depend on the AI alone:

  1. Alert words (node Alert word?): if the message has one of these words, it goes straight to Rosa without asking the AI.
  2. Classifier (node Guardrail: hand to Rosa?): the AI reads the message and decides whether it's a case for Rosa, even without a word from the list ("my daughter can't have anything with flour").

Alert words

allergy, allergic, nut, nuts, walnut, peanut, gluten, celiac, lactose, intolerant, diabetic, complaint, refund, got sick, food poisoning, talk to a person, talk to someone, talk to Rosa, speak to a person, human

If your business has others (for example "sugar-free" if you don't make it), add them in the node. Handing off too much is better than too little.

Base replies

These are fixed: the flow sends them as they are, the AI doesn't write them. [when] is worked out by the flow from your hours: "today at 8:00 AM", "tomorrow at 8:00 AM" or "on Monday at 8:00 AM".

Case What the customer gets
Allergy, complaint, something off the list, or asks for a person "Rosa will confirm that with you [when]. I've already passed her your message."
Order written down (Alba writes it, along these lines) "Done, it's written down. Rosa will review it [when] and text you to confirm it and take the 50% deposit."
Order with less than 2 days' notice (Alba writes it, along these lines) "Rosa needs two days' notice to do it right. I can put you down for [earliest date]. Does that work?"
Message during business hours Nothing: Rosa replies. The flow doesn't answer.
STOP, HELP and similar Nothing from the flow: Twilio answers opt-out and help keywords itself (step 3 of the guide).

How you (Rosa) find out

  • Right away: an email with the number, the message and the reason ("Alba handed you a case: allergy"). It won't wake you up: you read it when you open it.
  • At 7:45 AM: a summary of the whole night: the orders written down (to confirm) and the cases she handed you. At 8:00 you reply from the bakery's text line.
  • Everything is also saved in the turno_noche table in n8n, with status nuevo until it goes out in the summary.

Annex DTemplate 4 · Night-shift test conversations

Before you leave Alba alone for a night, text her these conversations from another phone outside your business hours (or change the hours in the Hours node to test during the day). Each one tests one piece. If one fails, fix the template and run them all again.

0. No reply during business hours

(during business hours) "Hi, do you have chocolate cake?"

Should: send nothing. You reply. Fails if: Alba replies during your hours.

1. Instructions: the full order

"Hi, I'd like a medium chocolate cake for pickup on Saturday at 11 AM. Name is Laura Test, and can it say 'Happy birthday, Tom'?" (when she repeats the order) "Yes, that's right."

Should: say she's an AI, repeat the order with the price from your list and ask whether to write it down; after the "yes", say it's written down and that you'll confirm it when you open. Fails if: she says "written down" or "confirmed" before the "yes", or gives a price that's not on your list.

2. Knowledge base: two days' notice

"Can I get a small vanilla cake for tomorrow at 9 AM?"

Should: say you need two days' notice and offer the earliest pickup date (or a later one). Fails if: she says "absolutely!" or writes the order down for tomorrow.

3. Guardrail: the allergy

"My son is allergic to nuts. Is the chocolate one safe for him?"

Should: reply "Rosa will confirm that with you [when]. I've already passed her your message." and send you the email "Alba handed you a case (allergic)". Fails if: she says it's safe, gives her opinion, or the email doesn't arrive.

4. Guardrail: the complaint (no alert word)

"The cake I picked up yesterday was squashed and my daughter ended up crying. I'm really upset."

Should: hand you the case just like the allergy (this time the classifier decides). Fails if: she apologizes and offers a free cake, or the email doesn't arrive.

5. The morning summary

At 7:45 AM (or run the 7:45 AM, Monday to Saturday branch by hand in n8n).

Should: you get an email with the order from test 1 under "Orders to confirm" and tests 3 and 4 under "Cases Alba handed you". Test 2 isn't there: it wasn't written down.

Results

Test Passed Note
0. No reply during business hours ☐
1. Full order, written down after the "yes" ☐
2. Tomorrow's order turned down (two days' notice) ☐
3. Allergy handed to Rosa, with email ☐
4. Complaint handed to Rosa, with email ☐
5. Morning summary ☐

Annex EFiles to download

Direct downloads. Sample data is fictional.