Sign Up
Loading...

Inputs

Watch the walkthrough

Endpoint Inputs

Configure endpoint inputs and use request values in a workflow.

Recorded with an earlier Twidget interface. Names, control locations and available options may differ; use the linked documentation for current guidance.

Watch tutorial (3:04)

Browse all video tutorials

Overview

In Twidget, inputs are essential elements that allow you to configure endpoints and functions. Events do not use inputs.

Endpoint Inputs

Endpoint inputs are used to retrieve data from requests. The available types of endpoint inputs are:

  1. Path: Variables that are part of the URL path.

  2. Query: Variables that are part of the query string in the URL.

  3. Header: Information included in the request headers.

  4. Body: Data included in the request body.

  5. Files: Files uploaded in the request. Only endpoint files can be lists.

Function Inputs

Function inputs are used to pass data to functions within the platform. They can be of various data types, including:

  1. Text: String data.

  2. Number: Numeric data.

  3. Boolean: True/false values.

  4. Date: Date values.

  5. Object: Complex data structures.

  6. File: File data.

All function inputs can be lists.

Common Features

  • Required Inputs: You can mark an input as required. If a required input is not provided, an error will be thrown.

  • Default Values: Many input types allow you to set a default value that will be used if no input is provided.

Utilizing Inputs

Inputs can be referenced throughout the no-code builder. For endpoint inputs, you will need to use specific prefixes:

  • $body.: For inputs retrieved from the request body.

  • $headers.: For inputs retrieved from the request headers.

  • $files.: For files included in the request.

  • $path.: For variables included in the path.

  • $query.: For variables included in the query string.

Input Selector

When referencing an input in the value or variable builder, you can:

  1. Select Input as the type.

  2. A dropdown of available inputs will be displayed.

  3. Use the search functionality within the dropdown to quickly find the input you need.

Related Topics

Workflow templates

Keep reusable workflows in a private library within your workspace. Save a useful endpoint, function, middleware or event, then install independent draft copies when you need the same starting point again. Related workflows are included automatically where supported. Open Workflow templates from the...

Dynamic variables in JSON and text

Build JSON bodies and messages using values from your workflow. The Insert variable picker lets you choose inputs, earlier command results, nested object fields and list items without typing their references. Choose a nested field or list item. 1. Open a command value or function output and choose J...

Live debugging

Pause an isolated editor test before a command runs, move through it one step at a time, and inspect its recorded outputs. Use this to find where a calculation or decision begins to differ from what you expected. Start a debug test. 1. Open a server function, endpoint or event and choose Test. 2. Ch...

Reusable Middleware

Middleware is a reusable workflow that runs before or after an endpoint, function or event. Build it once, then apply it wherever you need the same input checks, response formatting or logging. Create middleware. Open Middleware from the sidebar and choose Create Middleware. Give it a clear name, su...

Test suites

Test a customer journey across several endpoints in a single ordered run. For example: sign in, create an order, retrieve it, then check its status. Every run shares its own isolated database across its steps. Your workspace records are not changed by those database actions. This version supports is...