Introduction: Creating an event-driven flow
In an event-driven flow, you identify an event that can occur in your source application and actions that can be completed in one or more target applications. The flow is triggered when the event occurs.
Creating an event-driven flow takes just a few steps:
- Complete the following steps. As you progress, App Connect automatically saves your changes. If
you move away from the flow at any stage, the flow is saved as a draft flow that you can complete at
another time.
- Enter a name that identifies the purpose of your flow, for example:
Contact tasks for new attendee
- Select the first (source) application, and the event to trigger the flow. For hints and tips about using specific applications, see the "how to" pages under How to guides for apps.
- If App Connect isn't yet connected to the application, you can connect now to allow App Connect to interact with your application.
- Add a target application, and the action to be completed.
- If App Connect isn't yet connected to the application, you can connect now to allow App Connect to interact with your application.
- Populate any mandatory fields for the target application, and any other fields that you want to
use for the target application. Note: In each mandatory field for the target application, provide the value that the target application needs. If you map the name of a source field, make sure that the source application passes a suitable value. If the application passes an invalid value, the flow can't complete successfully. In your flow, you can use conditional logic to do something appropriate if a value passed is invalid.
- In the default edit view for some create actions, you can select the parent object in which to
create a new object. For example, for the Asana action Create Task, you can select the project
within which to create the task in the following way.
<strong>*Project</strong> Event team tasks
If the parent object is later deleted, then when you next edit the flow it displays a message to indicate that the object no longer exists; for example:
<strong>*Project</strong> No object with ID "232105349566428" exists in the target system.
Where the ID value is the system ID for the parent object.
- In the default edit view for an action, some applications have fields that are hidden because they are not needed for general use cases. For more advanced use cases, to be able to work with all available fields for objects, you can switch to advanced mode editing.
- If a field name is truncated, hover over the field name to display the full name.
- You can add the names of source fields, apply functions to transform source data, and type text. For more information, see Techniques for specifying data to be passed to a target application or API.
- If a target field references an object in the source app (like a Contact) and the object is
deleted from the source app, the flow displays a message. In the following example, the ID value is
the system ID for the
object.
No object with ID "232105349566428" exists in the target system.
- In the default edit view for some create actions, you can select the parent object in which to
create a new object. For example, for the Asana action Create Task, you can select the project
within which to create the task in the following way.
- Insert other target applications, and the actions to be completed, as in
step 2.d. You can insert a target
application at any (+) point in the flow.
- You can add a maximum of 10 target applications (actions).
- Actions are completed in the order that is shown on the canvas.
- If one of the actions fails, the following actions aren't completed, but any previous actions aren't reversed.
- In the target fields for an action, you can map data from the trigger application or from previous target applications in the flow.
- If you choose an action to retrieve or update data in one of your
applications, you can add a condition to retrieve or update a single record.
For example, the following condition retrieves a single record where the email address of the Insightly lead matches the email address in the trigger application, and the Insightly lead comes from Ireland.
- You can add a maximum of 10 conditions. If you add more than one condition, all the conditions must be matched to succeed.
- You can retrieve a single record only. If the condition matches more than one record, or no records, you see an error message on the dashboard. The following actions aren't completed, but any previous actions aren't reversed.
- You can add some conditional logic to your flow. If you want your flow to do different things according to the data that it receives from the trigger application, you can add one or more ‘If’ nodes to your flow. For more information, see Adding conditional logic to a flow.
- You can parse the data that is returned by an app in your flow, for subsequent use by another app. For example, if data is returned as a JSON string, you need to parse it into a JSON object before you use the data as input into another app. For more information, see Using the JSON parser to parse a JSON string into a JSON object and Using the CSV parser to parse CSV text into a JSON object.
- Enter a name that identifies the purpose of your flow, for example:
(!) Incomplete
.For simple step-by-step examples of how to create a flow for different use cases, see the other tutorials for App Connect.