Functions in Workflows

Interact with, change, and control your data in Workflows using functions.

  

 

Branching

Function

Description

Assign If Assign a value based on the true or false result of a conditional statement. If you have more than two potential output values, see Lookup
If/ElseIf Specify different actions to run based on multiple if and else if conditions (similar to Switch or Case in some programming languages). To specify different actions based on a single condition, you can use If/Else instead.
Continue If Continue or halt the Flow based on the result of a true or false conditional test. Use Return Error If instead if you want to halt the Flow with an error when the condition is true.
If/Else Use an If/Else conditional statement to determine the steps that should be followed by the Flow.
Lookup Convert one value to another using a lookup table, e.g. one web service code to another web service code, a department name to a contact email, etc.

Date & Time

Function

Description

Add Adds a multiple of a unit of time (e.g. seconds) from a starting date & time, returning the resulting date.
Difference Returns the difference in time between two dates.
Epoch Converts a date & time to the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT) not counting leap seconds, which is the standard date format for some systems. See UNIX to use the number of milliseconds elapsed instead of seconds.
Date to Text Formats a date and time into a provided format in a specified timezone.
Convert Converts a date & time to a variety of formats.
ISO Given a date & time, returns the corresponding iso8601 string using UTC "Z" notation, i.e. not adjusted for local time zone (e.g. "2016-09-07T16:55:25.670Z")
Now Returns the current date and time in a variety of formats, all in UTC time (i.e. not adjusted for local timezone). Use the Date to Text function to adjust a date to a timezone.
Text to Date Creates a date & time from the contents of text, according to a format you specify. The specified format identifies the format of the 'start' input contents.
Subtract Subtracts a multiple of a unit of time (e.g. seconds) from a starting date & time, returning the resulting date.
UNIX Converts a date & time to the number of milliseconds that have elapsed since January 1, 1970 (midnight UTC/GMT) not counting leap seconds, which is the standard date format for some systems. See Epoch to use the number of seconds elapsed instead of milliseconds.

Encryption

Function

Description

AESAES-encrypts input text and returns the encrypted text. Accepts any aes-based algorithm specified by OpenSSL.
EncryptEncrypt text into a base64 encoding using a key and specified OpenSSL algorithm.
DecryptDecrypt text from a base64 encoding using a key and specified OpenSSL algorithm.
HashHash-encrypts input text and digests the return string on output with hex, binary, or base64 encoding. Accepts any hashing algorithm specified by OpenSSL.
HMACHMAC-encrypts input text and returns the resulting encrypted text, accepting any HMAC algorithm specified by OpenSSL
SHA1SHA1-encrypts input text, returning the resulting encrypted text.
SHA256SHA256-encrypts input text, returning the resulting encrypted text.

Error Handling

Function

Description

Return ErrorThrow an error and end the Flow.
Return Error IfThrow an error and halt the Flow if a conditional test is true. If you want to conditionally stop a Flow but under normal circumstances so it doesn't appear as an error, use Continue If instead.
If ErrorSpecify alternate actions to handle an error without stopping your Flow.

File

Function

Description

DownloadDownloads a file to the Designer file system over HTTP or HTTPS.  For example, any file that you can get to through a URL in your browser - like an image or a document file - you can download using this function.
InfoRetrieves information about a file.  To use it, set the input to the File Contents of a file you have downloaded previously in the Flow. The output will give you helpful information about it.
Multipart UploadUploads a file from the software's file system to a web service, using http or https, via multipart form-data.
UploadUploads a file from the software's filesystem to a web service, using HTTP or HTTPS.

Flow Control

Function

Description

AssignCreate new output fields based on the input supplied.
PauseThe Pause function currently only works when used in Flows that are resumed programmatically. If you want to pause a Flow for a specific delay or until a specific time, use a Wait For or Wait Until function.
Pause RawPause the running Flow execution, returning raw http data to the caller. Resume it by calling the resume API.
ReturnEnds a Flow and returns values to the caller of the Flow.
Return RawReturns data to the caller, with full control over the HTTP Response.
Call Flow AsyncStart another Flow then continue without waiting for that Flow to finish. String together multiple Call Flow Async cards if you want to kick off different sets of actions to run at the same time, i.e. "in parallel".
Call FlowRun another Flow within the context of your current Flow. Your Flow will resume when the other Flow finishes. If you don't care about waiting for the other Flow to finish, you can use Call Flow Async instead.
RepeatRuns a child Flow a specified number of times.
Wait UntilPause the Flow and wait until a specific date & time to continue executing the Flow.
Wait ForPause the Flow and wait for a specified amount of time before resuming the Flow execution. NOTE: The minimum amount of time you can wait is 1 second, and the maximum is one year.

HTTP

Function

Description

Authenticate with HTTP Cards

Use HTTP function cards to make authenticated basic, OAuth 2, or custom connections to third party services.

Close

For use with API Endpoint Flows only. See API Endpoint.

This function sends a response back to the caller and closes the HTTP connection, similar to Return or Return Raw, but also allows the Flow to continue execution afterward. This is useful for Flows that might not complete before the connection times out, after which the caller might call the endpoint again with the same inputs (thus causing unintended duplicate executions).

DeletePerforms an HTTP DELETE request, returning the result of this request and the response headers. On input, takes a required URL input and optional header, body, and query inputs.
HTTP - ErrorsAn error in an HTTP function typically corresponds to a standard HTTP error code returned by the API you called. For instance, if the api returns the status code 400, you get a "Bad Request" error. If the status code is 401, the error is "Unauthorized." You can see a full list of status codes, error names, and general descriptions in Wikipedia.
GetPerforms an HTTP GET request, returning the result of this request and the response headers. On input, takes a required URL input and optional auth, header, and query inputs. Each optional input can either be modeled by a singular object-typed input or by multiple keys with the appropriate group attribute. On output, returns an object with two keys, headers and output. The output key contains the response body, and the headers key contains the response header. More detailed information can be accessed about these by using multiple keys with the appropriate grouping. NOTE:
PostPerforms an HTTP POST request, returning the result of this request and the response headers. On input, takes a required URL input and optional auth, header, body, and query inputs. Each optional input can either be modeled by a singular object-typed input or by multiple keys with the appropriate group attribute. On output, returns an object with two keys, headers and output. The output key contains the response body, and the headers key contains the response header. More detailed information can be accessed about these by using multiple keys with the appropriate grouping.
PutPerforms an HTTP PUT request, returning the result of this request and the response headers. On input, takes a required URL input and optional auth, header, body, and query inputs. Each optional input can either be modeled by a singular object-typed input or by multiple keys with the appropriate group attribute. On output, returns an object with two keys, headers and output. The output key contains the response body, and the headers key contains the response header. More detailed information can be accessed about these by using multiple keys with the appropriate grouping.
Raw RequestAdvanced.  This method performs a raw HTTP request, allowing the Flow builder to control all aspects of the HTTP request.  This allows a Flow to call an XML service for example, or call an HTML service, or a number of other advanced usages.  The other HTTP functions are optimized for ease-of-use with typical JSON-based services; the Raw Request function is more flexible, at the cost of being a bit harder to use. Here are a few of the use cases for Raw Request:

JSON

Function

Description

ParseThis function parses a JSON string into a typed field - such as an object or a list - that you can use in subsequent functions. It's the inverse of the Stringify function.
StringifyThis function converts a typed value - such as an object or a list - into a JSON string. It's the inverse of the Parse function.

JWT

Function

Description

DecodeDecode a JWT without verifying the signature.
SignEncode and sign a JWT.
VerifyDecode and verify a JWT.

List

Function

Description

For Each - Ignore ErrorsProcess a list by calling a child Flow  for each item.  This function is almost identical to the For Each function, with one important difference:  For Each will stop processing more items if an error occurs when processing one of the items in the child Flow. On the other hand, this function continues to process all items even if some hit errors in the child Flow. Here's how to think about it:
AtReturns the item at the specified position in a list, where the first item is in position 0.
CollapseCollapse a list of objects into a single object by merging each object in the order they appear in the list. If objects have overlapping keys subsequent values will take precedence over preceding values.
ConstructConstructs a new list from a set of values.
DifferenceRemoves any items in a list (list1) which are also in the second list (list2).  The output is a new list which is a subset of list1, containing only those items which are not in list2.  The lists can be a list of any type of item - a list of text, a list of numbers, a list of objects, etc.  All three lists should be set to the same type.
For EachProcess a list by calling a child Flow for each item.
List - ErrorsMany of the list functions call another Flow to process the list (including Filter, Find, For Each, Map, Reduce, Sort, and Unique). If you encounter an error on one of these cards, you may want to look at the Flow History for the Flow that the function calls since the details of the error may be more evident when viewing data in Flow History for that Flow.
Filter CustomGiven a list, the Filter Custom function creates a new list that contains only those items in the list that pass a test. The test is done by calling a child Flow once for each item. The Flow returns true or false, as to whether that item should be included in the output list. (To filter using a simple comparison test, use the Filter function instead.)
FilterFilter a list to include only those items that meet a specified condition. (To filter based on more complex criteria, use Filter Custom.
Find Custom

Find an item in a list by running a child Flow on the items, one at a time, and returning the first item where the Flow returns True. For simple searches, use the Find function instead.)

FindFind the first item in a list that meets a specified condition. To find based on more complex criteria, use Find Custom.
FlattenTakes a list that contains lists and turns it into a single list.
IncludesCheck whether a list contains a particular item. The output is a True/False value - it returns true if the list contains the item, false if it does not. The list can be a list of any type of item - a list of text, a list of numbers a list of objects, etc. The value must be an item of that type.
Index ByThis function is designed for a common API pattern, where a service returns a list of field values as a list of objects which each contain a field name as one key, and a field value as another key.
IntersectionGiven two or more input lists, creates a new list that contains only those items that are included in all of the input lists. The lists can be of any type (text, number, object, etc.), as long as all lists are set to the same item type.
List to TextThis function generates a single text output from a list, using an optional separator. For instance if you have a list of product names, you can use this function to create comma-separated list of products to include in an email.
LengthFind the number of items in a list.
MapYou can use the Map function to convert a list to a new list by running a child Flow for each item in the list.
MergeMerge objects from two or more lists at matching offsets. If an item with the same key exists in multiple lists for the same offset, the value from the later list will overwrite the value from an earlier list.
PluckThis function takes a list of objects, and produces a sub-list.  It does that by plucking the key specified by key from each object in the input list, and putting those values into an output list.  The list input must be a list of objects, this function doesn't make sense for any other kind of list.  The key input defines the key to pluck from each item; it can be a key name in the root of each item, or it can be a dot-delimited path that lets you specify keys in sub-objects. You must set the type of the values output list to be the type of the values at that key path; if you don't set the type correctly, you will very likely encounter type mismatch errors when you execute your Flow.
Get Last ItemGiven a list, return two outputs: the last item and the list with that item removed (aka Pop).
Add to EndAdd an item to the end of a list (aka Push).
ReduceThis function produces a single cumulative value by running a child Flow for each item in a list.  For example you can determine the largest number in a list of numbers, count how many text items start with "A" in a list of text, etc.  The result can be any type -- not just a number -- so you can also use Reduce to build text, date, true/false, object, or a list of any of those.
ReverseReverse the order of the items in a list.
SampleGenerates a random sample from a list.
Get First ItemGiven a list, return two outputs: the first item and the list with that item removed (aka Shift).
SliceChoose a subset of a list using start and end points.
Sort CustomSort Custom allows you to do a custom sort of a list by calling another Flow to generate the value used to sort each item. For simple sorts, use the Sort function instead.
SortSort a list from smallest to largest.
SumCalculates the sum of a list of numbers. This function accepts only a list of type number. If your numbers are formatted as a list of text, you can use the Map function to convert each item from text to a number. If your numbers are stored inside a list of objects, you can use the Pluck function to generate the list of numbers you need to pass into Sum.
TruncateCut a list down to a specified length.
UnionCombine multiple lists into a single list of all of the unique values contained in any of the input lists. The lists can be of any type (text, number, object, etc.) as long as all lists are set to the same type, including the output list.
Unique CustomAllows you to use custom logic to determine how to remove duplicates from a list.
UniqueRemoves duplicates from a list.
Add to FrontAdd an item to the start of a list (aka Unshift).
XORXOR, or "exclusive or", takes two input lists and generates a new list that contains all of the items that are in one or the other input list but not both. The lists can be of any type (text, number, object, etc.) as long as both input lists and the output list are set to the same type.
ZipTakes two lists of equal length and combines them into a list of lists of each corresponding pair. For instance, if you zipped together [1,2,3] and ["a","b","c"] you'd get a new list: [[1,"a"],[2,"b"],[3,"c"]]. The input lists can be lists of any type.

Number

Function

Description

Absolute ValueCalculates the absolute value of a number, which is the size of the number irrespective of negative or positive. For instance, the absolute values of -5 and 5 are both 5.
AddReturns the sum of the input values.
Round UpRound up to the nearest integer (aka Ceiling).
DivideReturns the quotient from the division operation between two values.
ExponentCalculates Euler's number, e (approximately 2.718), raised to a specified power, or exponent. To calculate a different base number to a specified exponent, use Power instead.
FormulaBuild a math expression by combining operators, functions and numbers you type with fields you drag and drop in. Place number fields anywhere in the expression where there can be a number. At runtime, the expression is evaluated using the values of the fields to generate a single output number.
FactorialCalculates the factorial of a number, returning 0 if that number is less than 0. A factorial is the product of an integer and all the integers below it. For instance, the factorial of 5 is 5 x 4 x 3 x 2 x 1 which is 120.
Round DownRound down to the nearest integer (aka Floor).
LogCalculate a logorithm, which is the power to which a base number must be raised to produce a given number.
RemainderFinds the remainder after the division of two integers.
MultiplyReturns the product of provided values.
PowerCalculate a base number raised to a specified power, or exponent.
Random IntegerCalculates a random integer between two numbers.
RoundRounds a number to the nearest integer.
SignCalculates the sign of a number.
Square RootCalculates the square root of a number, e.g. the square root of 16 is 4.
SubtractReturns the difference between two values.
Round Decimal PlacesRounds a number to a specified number of decimal places.

Object

Function

Description

Clear EmptyRemoves keys with no values associated (for example, null, "", {}) from an object. Similar to the Object - Filter function but with the added ability of choosing whether or not the filtering is recursive.
ConstructCreates a new object based on a set of user-defined inputs.
For EachIterates through an object key-by-key using a child Flow . For each key in the input object, the child Flow is called with the key name and value for that key - you can select those using the dropdown in the designer after selecting a child Flow using the Choose Flow button.
FilterThe Filter card will remove keys with no values associated (e.g. null, "", {}) from an object. If the object may contain other objects, use the Clear Empty card instead.
GetReads the value stored in an object at a given path.  For example, if the object is:  { "a":"one", "b":"two", "c": 17 } then specifying a path of b will retrieve the text two.  To get more than one value at a time from an object, use Get Multiple instead.
KeysThe Keys card will generate a list of the keys within your object.
Map to ListIterates through an object key-by-key using a child Flow , creating a list as output, with one item in the list per key in the object. For each key in the input object, the child Flow is called with the key name and value for that key - you can select those using the dropdown in the child Flow inputs after selecting a child Flow using the Choose Flow button.
MergeMerges multiple objects into a single object. The output object has all of the keys (with their associated values) that appear in any of the input objects. If the same key appears in more than one of the input objects, only one value is taken. There are two inputs by default, but more can be added.
MoveMoves a value from one key to another key, which essentially renames the key while keeping the value the same.
Get MultiplePicks several values from an object at once. Similar to Get, the Get Multiple card allows you to access values within an object by providing multiple keys and/or paths to values in an object.
MapProcesses an object key-by-key using a child Flow , creating a new object as output.  For each key in the input object, the child Flow is called with the key name and value for that key - you can select those using the dropdown in the designer after selecting a child Flow using the Choose Flow button.
SetSets a key of an object to a specified value, creating a new key if it doesn't exist already.
SizeReturns the number of elements in an object.
UnsetDeletes a key/value pair from an object.
ValuesThe Values card will generate a list of the values within your object,
ZipCreate an object from two lists, by mapping keys from the first lists to values from the second.  This is particularly useful when creating an object that has keys with dots in the key names.

Tables

Function

Description

Create RowCreate a new row in a Table .
Create TableThis function creates a new Table, returning the Table ID for that table so that you can add rows to it in subsequent cards, import rows from a CSV or another Table, etc.  The new Table will be created in the "My Folder" personal folder for the user who is the owner of the Flow. The table may appear in another user's "My Folder" personal folder if the Create Table card is located in a Child Flow. When the Create Table card exists in a Child Flow, whoever executed the Child Flow will have the table appear in their "My Folder" personal folder.
Delete RowDeletes a row in a table.
Export To CSVExport a Table  to a CSV file, including all rows or a filtered subset of rows.  The CSV file will be created within the filesystem - from there you can use an upload card from a cloud service connector (Google Drive, Box, etc.) to move it to another cloud service, or an SFTP upload, etc.  CSV files can be imported into most spreadsheet programs including Excel.
Import Data from CSVYou can import data into a table from a CSV file. See Wikipedia for more information on CSV files.
Import From CSVThis function imports the contents of a CSV file into a Table.  See Wikipedia for more information on CSV files.
Read RowReads the values from a row in a Table. .
Read TableThis function returns the column schema of a Table, as identified by the Table ID.
Search RowsFind rows in a Table  that match a provided set of conditions.
Update RowUpdates a row in a table.

Text

Function

Description

AtReturn the single character at a specified position in a text input, where 0 is the first position. To get a whole segement rather than a single character, use the Text Segment function. To search for a single character, use Find.
Base64

Returns the base64 encoding of a string. For example, input "Hello", would return "SGVsbG8=". For more information, see What is base64?.

Base64 DecodeReturns base64 decoded text. For example, the input "SGVsbG8=" would decode to "Hello".
ComposeCombine text you type and fields you drag and drop in. At runtime, all of the text is combined with the values of the fields to generate a single text output.
Concatenate

Takes the inputs and combines them, without spaces, into a single text output. You can also do this using Compose.

Find EmailFind and return the first instance of a valid email address in text.  For example, if the input is "You can reach me at fred@example.com or support@example.com", the output will be "fred@example.com".
FindFinds the first instance of a string within another string. To do a more complex search, such as looking for a string that matches a pattern, use the Find Pattern function instead.
Find LastSearch for the last match inside text. Returns the position number or -1 if not found.
LengthReturns the length of text, in number of characters.
Find PatternSearch text for the first match of a pattern.
RandomReturns random text of a specified length.
ReplaceSearch and replace text.
Replace PatternsFind and replace any of multiple patterns with a single value. For any find and replace that looks for a single text or pattern, use Replace instead.
SplitSplit text into a list of text segments separated by commas or other specified delimiter.
Text SegmentReturn a portion of text (formerly called "Substring").
To Lower CaseConverts all letters in text to lowercase.
To Upper CaseConverts all letters in text to UPPERCASE.
TrimRemove leading and trailing blank space from text.
Unique IDReturns a random universally unique identifier (UUID), sometimes called a globally unique identified (GUID). It is represented as 32 hexadecimal (base 16) digits displayed in five groups separated by hyphens.

True/False

Function

Description

AndReturns true if all inputs are true, otherwise returns false.
CompareRun a simple true or false test. For instance, you might check to see if a Type field is equal to "Customer" or if a Price field is greater than 1000.
ExpressionBuild a True or False expression by combining operators and values that you type with fields that you drag and drop in. Place fields anywhere in the expression where there can be a value. At runtime, the expression is evaluated using the values of the fields to generate a single output of true or false. When using non-True/False inputs, number fields evaluate to false when 0; otherwise true. Text fields evaluate to false when null or "false"; otherwise true. Date fields convert to a timestamp that will work in comparisons.
Any False?Return true if any of the inputs are false; otherwise return false (also known as NAND).
All False?Return true if all inputs are false; otherwise false. (Also known as the Boolean operator NOR.)
NotTakes a true or false input and returns the opposite value.
OrReturn true if any inputs are true, otherwise false.
XNORA True/False operator that returns true if both inputs are true or both inputs are false; otherwise returns false. It is the opposite of the Exclusive Or (or XOR) operation.
Or (Exclusive)The Exclusive Or true/false operator (also known as XOR) returns true if one, and only one, input is true; otherwise returns false.

URL

Function

Description

Decode Query

Decode a URL-encoded query string into a query object. A query string is everything after the ? in a URL. Certain special characters, like space, :, ?, /, and so forth, need to be encoded because they have special meaning in the URL itself. For more information, see Percent encoding.

Decode ComponentDecode a URL-encoded component, such as the value of a query parameter.  This function decodes all URL-encoded characters and outputs the decoded text. For more information, see Percent encoding.
Encode QueryEncode a query object into a URL-encoded query object.  A query string is everything after the ? in a URL.  Certain special characters, like space : ? / etc., need to be encoded because they have special meaning in the URL itself.  For more information, see Percent encoding.
Encode ComponentEncode text into a URL-encoded text for use within a URL.  This function encodes all reserved characters, like space : ? / etc., for use in a URL. For more information, see Percent encoding.
FormatA convenience function that makes it easy to construct a URL string from it's component parts.
ParseParse a URL string into its components, with proper encoding

XML

Function

Description

BuildConvert an object to an XML string.
ParseThis function converts an XML string to an object. By converting XML to an object, you will be able to leverage many of the built in functions such as those in the List and Object categories to process and utilize values from the XML string throughout the rest of your Flow.