Skip to main content
Auto-Gather variables are one of the most powerful features in Phonely. They let your agent collect, validate, and format information at the exact moment it’s needed, directly inside a block such as a Payment block, API Request block, Calendar block, Email block, or even Post-Call workflows. Instead of creating talk blocks just to gather data, Auto-Gather variables let you define the variable inside the block where it will be used. This keeps your flows cleaner, shorter, and more intelligent.

Why Auto-Gather Variables Are Useful

Traditionally, collecting a variable required a Talk Block:
  • Ask the caller a question
  • Define the variable inside that Talk Block
  • Validate and confirm it
  • Use it later in your flow
This works, but becomes complicated when:
  • You need many variables
  • You want to gather them only at specific points
  • Your flow changes over time
  • You want fewer blocks and cleaner logic
Auto-Gather Variables solve all of this by letting you define variables exactly where they’re needed, with built-in validation, formatting, confirmation, and re-use.

Creating an Auto-Gather Variable

You can create an Auto-Gather variable from inside any block that supports it. For example: inside API Request, Payment, Calendar, Email, and more.

How to Create One

  1. Open any block (e.g., API Request or Payment).
  2. Click on any of the fields where you want to collect and add the variable.
  3. This should open the Variables panel. Click and expand the Auto-gather variables section.
Config Api Request Block
  1. Click + to auto-gather a new variable.
  2. Fill in the required fields. These help your workflow understand exactly what to capture.
Configure Aut Gather Variables

Validation Options

Depending on the type, you may see:
  • Required – forces the agent to collect the value before continuing
  • Confirm – agent asks: “You said 34 dollars, correct?
  • Spell Back – useful for names, emails, or IDs

Custom Type Definition

Custom types let you define a format using natural language, for example:
“Format this as a raw number with two decimal places. If someone says $34, output 34.00.”
This ensures the agent outputs values exactly the way your system expects them, without extra logic or multiple retries. Great for:
  • Currency formatting
  • Standardized dates (ISO format)
  • Phone numbers
  • IDs
  • Special codes
Custom Variable Definition

Auto-Gather in Example: Payment Block

Imagine you want to collect the payment amount from a caller. Instead of Adding a talk block, asking for the amount, validating the format manually, and passing it to the payment block.

You simply

  1. Open Payment Block.
  2. Click + Auto-Gather Variable.
  3. Enter the following details:
Configure Aut Gather Variables Now your agent automatically:
  • Asks for the payment amount right before the block runs
  • Formats it correctly
  • Confirms the value
  • Passes it to the payment processor
No extra blocks. No manual logic.

Smart Behavior: Automatic Confirmation

Auto-Gather Variables are intelligent: If Phonely already knows a piece of information, like the caller’s name, it will not ask again. Instead, it confirms: “I have your name as Sarah Johnson. Is that correct?” This prevents frustrating repetition and builds smoother user experiencest