In this article, we'll walk you through the process of adding a Trigger inside your Guided Flows. As an example, we will add a Sendinblue Trigger to our Guided Flow.
Let's get started.
Adding a Trigger Inside Your Guided Flow
As explained in the previous article, you need to add a Trigger step to your Guided Flow as the first step.
Step 1: Go to Integry's Homepage and click on Flows.
Click on 'Create a Flow' to start creating a Guided Flow in the Flow Builder.
Step 2: Next, add an App Connector for the trigger application.
Next, you have to select the App Connector for your trigger application. Search for the desired app in the search bar (shown above).
As you'll select the App Connector, the title of the Guided Flow will automatically be updated (shown above).
Step 3: Select a Trigger event that will begin the integration.
Click on Select a trigger for this step to open the Activity dropdown menu. We'll select the Trigger Contact Created for our example. As a result, whenever a contact gets created in the Sendinblue app, it will Trigger our integration and start the execution of the Flow.
Step 4: The next step is to connect your Trigger application account.
The accounts you connect while creating your App Connector will appear in the list. Choose an account from the list or add new account by clicking on the 'Add My Account' button.
Configuring the Trigger Application
In this step, you have to configure the trigger application for the Flow. If the trigger has any fields, you can configure those fields for the end-users. If the trigger doesn't have any fields, you can add a condition for the Trigger.
Step 5: Turn the User Visible Form toggle on if you want this form to appear in the integration setup process for your end-users. These fields will appear in the Integration setup form according to your configurations.
For example, we will configure the List field. This field helps us monitor the list of newly created contacts in our Sendinblue account. The end-user trying to set up this integration will be able to add their own list here.
Step 6: Click on the field to open a side menu where you can configure the following:
- Title: This is the name or title of the field.
- Description: This is the description of the field.
- Default value: Here, you can select the default value for the field.
- Placeholder Text: This is the label that will appear until the end-user selects an option for this field.
- Required: To make this field mandatory for the end-user, turn this toggle on.
- Visible: This option enables you to make this field visible or hidden for the end-user.
You can also click on 'Advanced Settings' to customize some optional advanced settings.
- Help Icon: If you want to display a help icon for your field, you can upload it using the 'Upload Icon' button and setting a help text for it. This help text will appear on hovering over the help icon.
- CSS class: You can specify a CSS class for the field to adapt the look and feel of your application.
- Field actions: These are actions that you can perform when the end-user selects or enters a value to the field. For example, if an end-user selects a value for the list, you can configure the following actions for the next fields.
- Show - Select this option to show a hidden field
- Hide - Select this option to hide a visible field
- Toggle - You can apply a toggle to the next field
- Refresh - Reload the data for the next field
- Open - If the next field is a section, you can expand it
- Run - If the next field is a manual flow, you can choose to execute or run it
- Enable - Enable another field
- Disable - Disable another field
The action(s) you choose for 'When Changed' dropdown, will be applied to the field(s) you choose for 'this Control.'
Close the side navigation menu and your changes will be automatically saved. Then, click on 'Continue' to proceed.
Testing the Trigger Step
After adding and configuring the Trigger application to your Flow's step, you have to test it.
Step 7: Select or enter the value for your field (if any) and click on the 'Test' button, shown above. The Flow will be saved automatically once tested.
You will be prompted to carry out the activity on your app that will notify Integry about the Trigger.
In this example, we are being prompted to create a contact in our Sendinblue account. After performing the activity in your account, Integry will receive a Trigger and the test will be passed successfully.
Step 8: Next, you can view the test results.
Click on the Trigger section to expand the test results.
The results contain the payload that Integry receives when the trigger event occurs in the trigger application. In our case, the payload contains all the information we entered while creating a contact in our Sendinblue account. Other than that, the timestamp for when the trigger is received will also be displayed in the response of the test result.
Before the integration runs, the Pre-Save endpoint is executed. This is an API call that Integry makes to the trigger application or the trigger API to register its webhook URL. As a response to this call, the the trigger API returns the webhook ID of the registered webhook. Integry saves the value of the webhook ID in a variable
webhook_id. Each time the Pre-Save endpoint is executed, a webhook is created and a unique
webhook_idis assigned to it.
Click on 'Done' and your Trigger step will be added to your Guided Flow.
As you save the Flow step, an API call for another endpoint is configured for the trigger step, called Pre-Delete. This endpoint is executed if you want to delete this integration. A delete request is made to the same trigger API, as a result of which, all the webhooks created for this integration get deleted - and then the integration also gets deleted.
You're all done adding, configuring, and testing the Trigger for your Guided Flow. Let's move on to the next step.
In the next article, you'll learn how to add an Action inside your Guided Flow.