Argument Fundamentals

Actions, Auths, and APIs have arguments, which define what data is requested from the user when building a workflow. There can also be hidden arguments with default values, which always relay certain information to the API when the request happens.

While arguments related to specific use cases do have specific properties, the following data is fundamental to any arguments.

Argument Properties

  • Key: A camelCase representation of the argument. The key is what is sent on the request along with the argument's value.

  • External Key: In some cases, the API requires keys to be sent in a different format, such as snake_case, TitleCase, etc. As we want keys to always be camelCase, if the API expects something different, use the external key.

    Nested Arguments with External Keys

    If you are going to use an Object type argument with external keys, you must always reference the parent argument within the definition of the external key. For example:


  • Data Type: The format in which the API expects the argument to be:

    • String

    • Number

    • Boolean

    • Date

    • Object

    • Array

    • List (lists are a special data type where the user can pick from options in a dropdown).

  • Location: What part of the HTTP request the argument should be transmitted in:

    • Query: GET https://acme.com/user?firstName=joe

    • Body: POST https://acme.com/user --data={ firstName: 'joe' }

    • Param: GET https://acme.com/user/joe/ (these can be accessed by starting with “:” within the URL definition, which will trigger an autocomplete with all available param arguments)

  • Required: Whether or not the argument must be filled out by the user before the request can be submitted.

  • Hidden: Whether to show the argument to the user or not. This is usually only used if the argument has a default value.

  • Default Value: A value that will be sent if the user does not alter it.

  • Mapper: You can write code in the form of a Javascript arrow function here to change the format of the argument value before the request is sent. Example: 'Mr. ' + input.firstName` would add a "Mr." to the begging of the first name value.

  • Parent: Array and Object datatypes can have children. An example would be a payload like this:

    {
    	"address": {
    		"city": "",
    		"state": "",
    		"zipCode": ""
    	}
    }

    Here, Address should be an object, and city would be a string, with address as its parent.

  • Escape Arguments: Some arguments need to be specially escaped before sending the data to the API. For example, a SQL string might need to have single quotes escaped by turning them into double quotes. Once you enable escaping, a section will pull up where you can configure details on this.

  • Max Length: Some fields can only be a certain length. This setting will enforce that length when building workflows.

  • Component: Some arguments are detailed and require a custom React component to be built. This field specifies the name of the React component to be dynamically imported. All dynamically imported components must be placed in this folder: projects/react/src/screens/workflows/components/workflowInput/dynamicComponents

  • Multiple Values: Some arguments allow for an array of single values, such as a list of email addresses. Enabling multiple values will let you do this, and furthermore will allow you to specify which data type and the delimiter to use when the values are passed.


List Arguments

When you set an arguments datatype as a list, you can then configure details about those list settings.

  • List Type:  

    • Fixed: This lets you hard-code a set of dropdown options to give the user. An example might be a status argument, where the API expects ENABLED or DISABLED. You can also make friendly labels for it, like “Enabled” or “Disabled”.

    • Lookup: Lookup lets you execute another action from this app, and use the returned results to populate the dropdown.

      • Action: Pick the action to run.

      • Action Arguments: Add any arguments needed to configure that action.

        Once Action and Action Arguments are set, the action will run, and the Value Key and Label Key fields will be able to be filled in. In a Select or other dropdown, there is a "label" and "value". Label is what the user sees on the dropdown. Value is what data is actually sent on the API request.

      • Value Key: Pick which data key returned by the lookup action should be used to populate the dropdown values.

      • Label Key: Pick which data key returned should be used for the display values.

    • Country: Provides a list of countries to choose from.

    • Currency: Provides a list of currencies to choose from.