Free Intro Class
    Botspot Logo

    agenthub · automation.fanout

    Fan out

    Turn a list of rows into one agent run each. It is what makes for-each work without a loop on the canvas.

    category Automationin rows · dataout outputexecution asyncmodel cost none

    Why the node earns its place

    The batch pipeline's terminal step. For every row it produces one job describing an agent run to launch, and the pipeline itself stays single-pass — there is no loop construct in the graph at all.

    Like Outcome, it is passive: it does not enqueue or run anything. It emits the jobs, and the automation runtime reads them, queues them, and drives one run per row on the owner's identity and wallet. Keeping the node side-effect-free is what stops a graph reaching into the queue directly.

    How it works at run time

    1. 1
      Find the rows the same way Filter does — wired rows, else rows_path into data.
    2. 2
      For each row, build a job: the agent_id to run, the channel to reply on, and the row itself as the run's seed context.
    3. 3
      Read the recipient from address_field on each row and make it that run's channel address.
    4. 4
      Emit the jobs and a count. Dispatch happens outside the graph.

    What comes out

    output.jobs   [{agent_id, channel: {kind, channel_id, address}, seed: {…row}}]
    output.count  how many runs will start

    What you wire

    Inputs

    • rows
      array
    • data
      object

    Outputs

    • output
      object

    Configuration

    KeyTypeDefault & optionsWhat it does
    rows_pathstringPath to the array inside the wired input `data`. Ignored when the `rows` input is wired directly.
    agent_id *stringThe agent to run once per row (e.g. the per-contact onboarding decider that picks what to send).
    channel_kindstringdefault "whatsapp"Channel each spawned run sends on (e.g. 'whatsapp'). Seeded as the run's channel so output.outcome can mirror it.
    channel_idstringThe sending channel id (e.g. the WhatsApp channel). Applied to every job.
    address_fieldstringdefault "phone"Field on each row holding the recipient address (E.164 phone). Becomes the run's channel address.

    What usually goes wrong

    Watch for this

    Each row becomes the spawned run's context, which is what lets the per-row agent greet someone by name without any extra wiring. Filter first: every row that reaches this node is a billed run, and there is no undo once the jobs are dispatched.

    Behaviour & provenance

    buildersAutomations
    routesno
    side effectsnone — computes only
    replay safetynot applicable
    talks tonothing outside the run
    holdsno credentials