A flow is a task with several stages, with the state saved at each one. The gate is the stage that ends and pauses: the bot shows you what it did and waits for you. Approving, correcting, or rejecting is when you manage the work instead of doing it yourself.
3Approve, reject with a correction, redo, or cancel
4Practice with | sombra before spending
Goal: put the gate in the right place in a flow and decide whether to approve, reject with a correction, or cancel.
01 · A flow with a gate: /promoavatar
The domain flow running in production in inemaccbot.
Lesson 601 · A flow with a gate: /promoavatarThe domain flow running in production in inemaccbot.
1/5
Request
The command creates a numbered flow (A#9) and a list of stages. Each stage has its own state; /status shows each stage and each audience.
Scroll down: each step below lights up its part of the diagram.
1/5
Request
The command creates a numbered flow (A#9) and a list of stages. Each stage has its own state; /status shows each stage and each audience.
2/5
Texts
The agent writes a script for each audience (young people, women…). You don’t want to lose this work if a later stage fails, which is why this is a flow, not a skill.
3/5
Gate
The phase ends, and the bot sends what it declared to show in the chat, then STOPS. You read it, make corrections, and save the avatars. The flow continues only with /pronto (or /aprovar, /ok).
4/5
Video
After the gate come the costly phases or those with consequences: downloading the avatar video, assembling the reel, and delivering it to the channel. If one fails, /refazer resumes from that phase without redoing the text.
5/5
Where to put the gate
After what needs your eyes, before what is costly or public. A gate at the start has nothing to show; a gate at the end comes too late.
Click each block. The gate goes after the work you need to review and before anything that costs money or goes public.
02 · Simulate the gate
Run the flow, read the text that stopped at the gate, and decide.
Texts
Gate
Video
Publish
textos/A#9/jovens.md
Illustrative browser simulation: nothing is generated or published. The text with the error is intentional.
03 · Decisions at the gate
Each command does something different. Mixing them up costs work.
1. Approve
/pronto A#9 releases the gate. /aprovar, /aprovado, and /ok are synonyms, and A#9, a9, and A9 refer to the same item.
Without a reference, /pronto releases the flow when only one is waiting; with several, it lists them.
2. Reject with a correction
When the flow declares gate responses, you can reply with more than "yes": enter a word, such as reprova, followed by what to correct. The bot runs the domain command, and the phase REOPENS with the new material.
It's the "redo it and show it to me until I approve" process. Each flow declares which responses it accepts; /ajuda <fluxo> shows which ones.
3. Retry a failed phase
/refazer A#9 [público] resumes from the phase that FAILED, without redoing earlier phases.
This doesn't work for a phase stopped at the gate: it hasn't failed; it's waiting for you. To continue, approve it or reject it with a correction.
4. Cancel
/cancelar A#9 stops the entire flow and removes it from /status. Use it as a last resort: if you want to change one text, you lose every phase.
To permanently delete the flow's files, use /limpar A#9. It only shows what would be deleted until you type confirmar.
04 · Flow commands
Practice with | sombra before spending anything.
Telegram · practice, run, and track
/promoavatar Don’t start by learning tools | shadow
# shows stage × audience × queue and does NOT enqueue anything
/promoavatar Don’t start by learning tools --alvo=jovens
/status
/status A#9
Telegram · decide at the gate
/pronto A#9 # approves and continues
/refazer A#9 jovens # resumes from the stage that failed
/cancelar A#9 # stops the entire flow
/limpar A#9 # shows what it would delete
/limpar A#9 confirmar # actually deletes
The stage declares in portao.mostrar what goes to the chat: text goes in the message, audio and images go as files, and video goes as a link (a video lasting several minutes exceeds Telegram’s 50 MB limit).
Runs to the end without stopping for approval, but still sends to the chat what each gate would show. Use it only when you already trust that flow, and never before publishing something you haven’t read.
The project documentation records the risk: approving several flows at once without checking can trigger pointless waits (the stage that downloads the avatar waits up to 90 minutes before failing when the video hasn’t been recorded). Check before approving.
05 · Practice
Use a flow with a gate. If /promoavatar isn’t configured yet, start with | shadow.
E5 · The gate
30 min
Run a flow with a gate (such as /promoavatar), first with | shadow to see the stages. When it stops, read what arrived in the chat, make corrections if needed, and only then send /pronto.
Done when: you rejected or corrected at least one text before approving.
Where should the gate go in a video flow for social media?skill
Correct
After the parts that need your eye, before the parts that cost money or go out into the world. At the start, there’s nothing to read; after publishing, it’s too late.
That’s not it
After the parts that need your eye, before the parts that cost money or go out into the world. At the start, there’s nothing to read; after publishing, it’s too late.Review: A flow with a gate: /promoavatar
Question 2 of 4
The flow stopped at the gate with incorrect text. You send /refazer A#9. What happens?
Correct
A stage at the gate hasn’t failed. To change the text, reply to the gate with the correction (when the flow allows it) or, as a last resort, cancel.
That’s not it
A stage at the gate hasn’t failed. To change the text, reply to the gate with the correction (when the flow allows it) or, as a last resort, cancel.Review: Decisions at the gate
Question 3 of 4
What is | sombra for?
Correct
It’s a rehearsal before spending: you see what would happen. Don’t confuse it with | sem-portao, which runs everything without stopping.
That’s not it
It’s a rehearsal before spending: you see what would happen. Don’t confuse it with | sem-portao, which runs everything without stopping.Review: Flow commands
Question 4 of 4
In the simulation, what shows that you’re managing, not just using?
Correct
The gate only protects you if you read. Approving without reading let the false promise through; rejecting it with a correction reopened the stage and published the right text.
That’s not it
The gate only protects you if you read. Approving without reading let the false promise through; rejecting it with a correction reopened the stage and published the right text.Review: Simulate the gate
Test complete
You got {a} out of {n} right. If you get them all right, the lesson is marked complete.
Choose an option. The explanation appears after you try.