What can you do with it?

The /inputs command enables you to access and utilize input parameters passed to your automation. You can retrieve POST body data, query parameters, form submissions, and API payloads that trigger your automation, allowing you to create dynamic workflows that respond to external data and user inputs.

How to use it?

Basic Command Structure

/inputs [parameter-name]

Parameters

Required:

  • parameter-name - The name of the input parameter to retrieve

Optional:

  • default-value - Value to use if parameter is not found
  • validation - Validation rules to apply to the input
  • transform - Transformation to apply (e.g., uppercase, parse-json)

Response Format

The command returns:

{
  "value": "the input parameter value",
  "source": "POST body/query parameter/form data",
  "type": "string/number/object/array",
  "raw": "original untransformed value"
}

Examples

Basic Usage

/inputs
parameter-name: userId

Retrieves the userId parameter from the automation inputs.

Advanced Usage

/inputs
parameter-name: orderData
default-value: {}
validation: required, object
transform: parse-json

Retrieves orderData with validation, parsing JSON string into an object with a default empty object if not provided.

Specific Use Case

/inputs
parameter-name: email
validation: required, email
transform: lowercase

Retrieves an email parameter, validates it’s a proper email format, and converts to lowercase.

Notes

Input Sources:

  • POST body parameters (inputs.js file)
  • Query string parameters
  • Form data submissions
  • Webhook payloads
  • API request bodies