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 performed 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 navigate 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 you haven't connected to the application already, you can do so now to allow App Connect to interact with your application.
- Add a target application, and the action to be performed.
- If you haven't connected to the application already, you can do so now to allow App Connect to interact with your application.
- Populate any required fields for the target application, and any other fields that you want to
use for the target application. Note: In each required field for the target application, ensure that you provide a value as needed by the target application. If you map the name of a source field, you should ensure that the source application will pass a suitable value; otherwise, if a value passed is invalid the flow can't complete successfully. In your flow, you can use conditional logic to do something appropriate if a value passed is invalid.
Considerations:
- In the default edit view for some create actions, you can select the parent object within 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; for example:
<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.
Figure 1. A required field with truncated name and mouse pointer used to show 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 in Salesforce) and the
object is deleted from the source app, then the flow displays a message to indicate that the object
no longer exists; for example:
No object with ID "232105349566428" exists in the target system.
Where the ID value is the system ID for the object.
- In the default edit view for some create actions, you can select the parent object within 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; for example:
- You can add some conditional logic to your flow. If you want your flow to do different things depending on 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 returned by an app in your flow, for subsequent use by another app. For example, if data is returned as a JSON string, you'll need to parse it into a JSON object before using 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:
Note: If you do not complete the flow, the flow is displayed on the Dashboard with the label
(!) Incomplete
.For simple step-by-step examples of how to create a flow for different use cases, see the other tutorials for App Connect.