Integry Docs
  • Welcome
  • Sign up for a free trial
  • Apps
    • Overview
    • Authentication
      • Access Control and Testing
    • Passthrough Requests
    • Supported Apps
      • Accelo
      • Aircall
      • Constant Contact
      • Copper
      • Elastic Email
      • Fireflies
      • Insightly
      • Instantly
      • Ontraport
      • RingCentral
      • Sendy
      • ServiceTitan
      • ActiveCampaign
      • Jotform
      • ActiveTrail
      • Agile CRM
      • Aha!
      • Airtable
      • Amazon SES
      • Asana
      • Basecamp3
      • BirdSend
      • Breezy HR
      • Brevo
      • Campaign Monitor
      • Capsule CRM
      • Chargify
      • CleverReach
      • ClickUp
      • ClickSend
      • Cliengo
      • Coda
      • Constant Contact
      • ConvertKit
      • Copper
      • Customer.io
      • Delighted
      • Demio
      • Drip
      • E-goi
      • Eventbrite
      • EverAction
      • Everhour
      • Formstack
      • Freshdesk
      • Freshworks CRM
      • Mautic
      • Customer.guru
      • Front
      • FTP
      • GetResponse
      • GitHub
      • Google Contacts
      • Google Sheets
      • GoToTraining
      • Groove
      • Help Scout
      • HubSpot
      • Keap
      • Mailchimp Transactional
      • Mailjet
      • MailUp
      • MeisterTask
      • Monday.com
      • MoonMail
      • Moosend
      • Nimble
      • Notion
      • Ontraport
      • PagerDuty
      • Pipedrive
      • Pipeline
      • Salesforce
      • SendPulse
      • Slack
      • Snappy
      • SolarWinds
      • Stripe
      • SurveySparrow
      • Teamgate
      • Unbounce
      • Zoho Books
      • Zoho Campaigns
      • Zoho CRM
      • Zoho Mail
      • Zoom
  • Flows
    • Overview
    • Flow Tutorials
      • Sync data TO another app from your app
      • Sync data FROM another app to your app
      • Create a two-way flow
    • Build a Flow
    • Trigger a Flow
      • Multiple Triggers in a Flow
    • Steps in a Flow
    • Integrations
      • Runs
  • Functions
    • Overview
    • Try Functions in 60 seconds
    • Quickstart for AI
    • Viewing Function Calls
    • Source Functions
    • Agent Frameworks
      • LangChain/LangGraph
      • CrewAI
      • AutoGen
      • LlamaIndex
      • Haystack
      • Smolagent
      • LiteLLM
      • Mistral AI
  • Embedded UI
    • Embed Integry Apps Marketplace
    • Add Integry Apps to an Existing Marketplace
    • Render modes, layouts and styling
    • Embedding FAQs
  • APIs and SDKs
    • JS SDK Reference
      • React Web Apps
    • API Reference
  • Workspaces
    • Overview
    • Workspace Variables
    • User Variables
  • Users
    • Testing with Beta Users
Powered by GitBook
On this page
  • HTTP Call
  • Action in an app
  • Action in an app with your account
  • Custom code
  • Writing and Testing Code
  • Outputting Different Data Types
  • IF condition
  • IF
  • ELSE IF
  • ELSE
  • Condition statement
  • Operators
  • Abort
  • Wait
  • Do While Loop
  • Do
  • While

Was this helpful?

Export as PDF
  1. Flows

Steps in a Flow

PreviousMultiple Triggers in a FlowNextIntegrations

Last updated 5 months ago

Was this helpful?

HTTP Call

Add the HTTP call step to a trigger block to make a call to an API endpoint of any app that Integry supports, including yours.

Note: If your app does not have a public API, please review our before you build it. Alternatively, you could also just connect directly to your database!

Action in an app

Integry supports . You can add a query or an action of those apps as a step in a flow block.

In order to run those queries or actions, we will get your user to login to the app (hence, "using user's auth"), and configure any fields that require their input. You can pre-configure some parts of it.

Alternatively, you can also perform an action in another app using your auth. In that case, you will login and configure the step.

A trigger block can include both types of actions.

Action in an app with your account

Typically, you would perform an action in another app using user's auth as a step in a flow block. However, that action will be executed using your user's account of that app. What if you want to use your own account?

Let's consider an example:

When an Account is Created in Salesforce, you make an HTTP call to your app (with the account details) to add a new contact. You also then send an email notification to the user informing them that a new account just got synced.

  • Accounts are accessed from Salesforce using the user's auth.

  • The HTTP call is made to your app using an API key of your app.

  • The email notification is sent using the Send New Email action in the Mailchimp Transactional app using your auth. You obviously want to send notifications to your users from your account.

Custom code

Sometimes when building your flows, you need to add custom logic, formatting or processing. You can do all of this using Custom Code.

You can add custom code at any point in your flow. The code step supports Python 3.12 with additional languages planned.

  1. Your code must be enclosed in a main() function

  2. You have access to the global steps dictionary of all the steps in the flow including their in variables and out variables

  3. Anything you return becomes available in the flow in the code steps's out variable

  4. You can return any data type and it will be made available: strings, numbers, dictionaries, arrays etc

  5. You can also create functions and use them in your code

Writing and Testing Code

Here's sample code that returns a full name by concatenating first name and last name with a space

def main():
  return steps.salesforce_contact_created.out.first_name + ' ' + steps.salesforce_contact_created.out.last_name

You can see that we're referring to steps global dictionary to access salesforce_contact_created trigger's first_name and last_name.

You can insert fields using the insert field menu

Once you have your code written out, you can test it by hitting the, you guessed it, the Test button. You'll see the exact output below. The structure of the output is important since it will be made available in the field insert menu for any subsequent step.

Here's the output of code we tested:

In the subsequent steps, the field insert menu for the code step has:

Outputting Different Data Types

If you return a dictionary, it will be available as-is in the output:

Here's the field insert menu:

You can also output arrays and more complex nested dictionaries

Importing Modules

You can mention the module you want to import at the top

import re

def main():
  txt = "The rain in Spain"
  return re.search("^The.*Spain$", txt)

IF condition

The IF condition step allows you to add branching logic to a trigger block.

The conditions are evaluated at run-time and the steps in the appropriate group -- IF, ELSE IF, ELSE -- are executed.

For instance, if the value of a "Type" field in the trigger payload from another app equals "Created", run the Create action in Acme. Otherwise, run the Update action in Acme.

IF

An IF condition can have one or more condition statements that each have three parts: data, operator and value. These statements can chained with an AND or OR operator.

For instance, this checks if the "type" field value is "Created" or "created".

The steps in the IF condition group will run if, at run-time, the entire expression is true.

ELSE IF

If you want to add more branching logic to the IF condition, you can add one or more ELSE IF steps from the Add Step menu. Each ELSE IF will have it's own condition statements, and steps to run if the condition statements are true at run-time.

ELSE

Finally, you can also add an ELSE branch to the IF condition that will execute if the IF condition, and all it's ELSE IFs (if you've added any), fail, i.e., their condition statements result in false.

Condition statement

Typically, data (left-hand side) will be a field, possibly from the output of a previous step, the value (right-hand side) will be a static value (but can be a field's value at runtime as well), and the operator will specify how to compare the two sides. Some operators, like is empty or is true, already include the respective values so you don't have to specify them.

Integry supports conditional statements in two types of steps: IF condition, and Do While Loop.

Data types

When using the Conditions, you don't have to specify data type, Integry will make best effort to coerce the type and use the appropriate comparison. When entering strings, you do not need to enclose them in quotes, the same is true for numbers. In addition, comparison is case sensitive for strings.

Operators

equals

This operator checks if left hand side is equal to right hand side.

does not equal

This operator is a negation of "equals", and will evaluate to true for all cases where "equals" evaluates to false, and false otherwise.

is true

This operator checks if given value is true. If the value is not a boolean, following rules are used to evaluate the condition.

  1. If value is an array, the operator evaluates to true if array is empty, false otherwise.

  2. If value is an object, the operator evaluates to true if object has at least one key, false otherwise.

  3. If value is a string, the operator evaluates to true if string is not empty and not false or null, false otherwise.

  4. If value is a number, the operator evaluates to true if number is not 0, false otherwise.

is not true

This operator is a negation of "is true", and will evaluate to true for all cases where "is true" evaluates to false, and false otherwise.

contains

This operator checks if right hand side is part of left hand side. The following rules are used to evaluate the condition:

  1. If left hand side is a string, the operator evaluates to true if right hand side is present in the string, false otherwise.

  2. If left hand side is an array, the operator evaluates to true if right hand side is present in the array, false otherwise.

  3. If left hand side is an object, the operator evaluates to true if right hand side is present in the object as a value, false otherwise.

  4. If left hand side is a boolean, number or null, it is coerced to a string and operator is applied on the string value.

does not contain

This operator is a negation of "contains", and will evaluate to true for all cases where "contains" evaluates to false, and false otherwise. Similar to contains, you can use strings, arrays or objects.

starts with

This operator checks if elements at the start of left hand side are equal to right hand side.

  1. If left hand side is not a string, following rules are used to evaluate the condition.

  2. If left hand side is a string, the operator evaluates to true if the right hand side is the start of the string, false otherwise.

  3. If left hand side is an array, the operator evaluates to true if the right hand side is the first element of the array, false otherwise.

  4. If left hand side is an object, the operator evaluates to false.

does not start with

This operator is a negation of "starts with", and will evaluate to true for all cases where "starts with" evaluates to false, and false otherwise.

ends with

This operator checks if elements at the end of left hand side are equal to right hand side. If left hand side is not a string, following rules are used to evaluate the condition.

  1. If left hand side is an array, the operator evaluates to true if the right hand side is the last element of the array, false otherwise.

  2. If left hand side is an object, the operator evaluates to false.

greater than

This operator checks if left hand side is greater than right hand side. If either side is not a number, following rules are used to evaluate the condition.

  1. If either side is a string, a lexicographical comparison is performed.

  2. If either side is a boolean or null, it is coerced to a string and a lexicographical comparison is performed.

  3. If either side is an array, the operator is applied on each element using "AND" logical relation.

  4. If either side is an object, the operator is applied on each key and value using "AND" logical relation.

less than

This operator checks if left hand side is less than right hand side. If either side is not a number, following rules are used to evaluate the condition.

  1. If either side is a string, a lexicographical comparison is performed.

  2. If either side is a boolean or null, it is coerced to a string and a lexicographical comparison is performed.

  3. If either side is an array, the operator is applied on each element using "AND" logical relation.

  4. If either side is an object, the operator is applied on each key and value using "AND" logical relation.

is empty

This operator checks if value is an empty string. If value is not a string, following rules are used to evaluate the condition.

  1. If value is an array, the operator evaluates to true if array is empty, false otherwise.

  2. If value is an object, the operator evaluates to true if object has no keys, false otherwise.

  3. If value is a boolean, number or null, the operator evaluates to false.

is not empty

This operator is a negation of "is empty", and will evaluate to true for all cases where "is empty" evaluates to false, and false otherwise.

Abort

Add an abort step to a flow block to abort the execution of a run. This is used when you want to explicitly handle execution errors (and don't want Integry to kill the run).

Wait

Add a wait step to a flow block to pause the execution of a run for a set period.

Do While Loop

A Do While Loop allows you to execute a group of steps in a trigger block, and then either repeat the group or exit the loop depending on one or more condition statements.

Do

Add the steps you want to repeat to the Do step group.

While

You can import Python modules as well. We support any , as well as lxml, bs4, and pytz

A condition statement has three parts: data, , and value.

For instance, get all records by making repeated to an endpoint that returns 100 records per page, until there are no more records available, loop over the records in a page (using a For Loop), and create customers in Acme.

The loop will continue to repeat while the condition is true. The condition is specified as one or more that each have three parts: data, operator, and value. These statements can be chained with an OR or AND operator.

standard modules
operator
HTTP Calls
condition statements
recommendations
200+ apps