Number Input

The Number Input control allows a user to provide a numeric value when running a workflow.

A Number Input is an input control that allows a user to enter a numeric value. This ensures the input is treated as a number, not a string, making it suitable for calculations, comparisons, and other numerical operations.

When to Use

This control is ideal for any input that requires a number, such as:

  • A quantity or count (e.g., number of articles to generate).

  • A threshold or limit.

  • A score or rating.

  • Any value that will be used in a mathematical calculation.

How to Add

  1. From your workflow's Build page, click on + Add Input.

  2. Select Number Input from the list of available controls.

Configuration

  • Title: The main label for the input field.

  • Description: Optional helper text to provide more context.

  • Variable Name: The name used to access this input's value.

  • Optional/Required: A toggle to specify if the user must provide this input.

Setting a Default Value

You can pre-fill the Number Input with a default value:

  1. Enter the desired default number into the input field.

  2. Click the settings icon (⚙️) at the bottom right of the control.

  3. Select Set Current Value as Default.

Accessing the Value

You access the value using its variable name in double curly braces {{}}. For example, if the variable name is item_count:

  • In most nodes: Use {{item_count}}.

  • In a Code Node (Python): The value will be injected as a string, so you may need to convert it to a number, e.g., count = int("{{item_count}}").

  • In a JavaScript step: Access via params.item_count.

Example

Goal: Generate a specific number of new product ideas.

  1. Add a Number Input:

    • Title: "Number of Ideas"

    • Variable Name: num_ideas

    • Default Value: 5

  2. Add a Text Input:

    • Title: "Product Category"

    • Variable Name: category

  3. Add an OpenAI MCP Node:

    • Action: Chat

    • Prompt: Generate a list of {{num_ideas}} new product ideas for the following category: {{category}}.

When this workflow runs, it will use the number provided in the "Number of Ideas" input to generate the requested number of product ideas.

Last updated

Was this helpful?