Last week we explained how to set up an Endpoint to receive data from a Webform. In today’s article, we are going to discuss linking this Endpoint to a Workflow to be able to fully automate the processing of the incoming data.
When you look at the screen in which you build up your Endpoint, you can see that one of the datafields available is ‘Workflow’.
This field allows you to set up the Workflow that all data that is received by this Endpoint should be sent to. The fields ‘Campaign’ and ‘Channel’ are used to identify which campaign and channel the Endpoint is considered to be a part of, but are not required and won’t be covered today.
In order for a Workflow to be assigned to this Endpoint, we will first need to create one. You can do this by going to the Workflow page by clicking on the corresponding button in the left bar:
This button will bring you to the Workflow overview, where you can view all currently available Workflows. Click on the ‘New’ button in the top right of the screen to start the creation process of a Workflow.
All that is required is a name. You can also immediately set the Workflow to be active, instead of paused, though for the purpose of constructing the Workflow it is best to keep it paused until you are ready for the automation to start working.
Clicking on ‘Save’ will move you directly to the Workflow page. However, first, go back to the Endpoint detail page and make sure that the Workflow is selected in here. Click on the ‘edit’ button and select the Workflow just created in the dropdown menu for the ‘Workflow’ field:
That is all we need to do in the Endpoint. Now we can go to the Workflow, but keep the tab with the Endpoint open.
With the Endpoint and the Workflow linked, it is now a matter of taking the data from the Endpoint and defining the names of the variables that the Endpoint is going to be working with. If you open the Workflow we just created, you can see that in the bottom-left part of the screen is room to start defining variables. Clicking on the ‘Edit’ button at the top of the screen enables the ‘Add’ button to the left, which gives you a screen very similar to the Variable creation screen we saw in the Endpoint screen.
We will want to create a Variable for every Variable in the endpoint that we wish to use in the Workflow. With the Variables of the Endpoint we defined last week, this could look like this:
Now all that rests us, is to define how the data from the Endpoint should be translated to these Variables. In the Workflow, you can see that there is a single node currently available. If the Workflow is still in Edit mode, you can see a pencil appear when you hover your mouse over the node:
Clicking on the pencil icon will open an edit screen. In this edit screen, you can now start defining the names of the Endpoint Variables that the Workflow should expect and in which Workflow Variables the data should be stored. In order to do so, click on ‘Add’, which will give you the following screen:
In here, simply make sure that the ‘Name’ entered is the same as the name of the Endpoint Variable you are describing. The ‘Target’ is the Workflow Variable that should store the data from the endpoint.
For example, in the Endpoint we have the Variable ‘FormData’ that stores the data from the Webform as a Lead variable. In the Workflow we will want to store that data in the Lead variable called ‘Webform_Data’. That means the screen would look like this:
Then simply clicking ‘Ok’ will link the Variables.
When you have done this for all the Variables from the Endpoint, your Endpoint and Workflow are successfully linked! Next week, we will start discussing how the Workflow can be used to automate all kinds of actions that would otherwise have to be done by hand.