Posting a Twitter Message Using a Flow

Last Updated: 07/15/2016 Introduced in Verision: 2.0

Once Twitter integration has been activated, the platform uses a Twitter account to post messages as one method of notification. The platform can also post messages that are manually entered or automatically generated. Use the Post Tweet component when building a flow to post a message. Define the input for the flow, and map that input to the Post Tweet step in the Mapping Editor.

To post a Twitter message using a flow, in the Flow Designer, in the Components panel, in the Communication > Twitter category, drag a Post Tweet component to the workspace.


In the example, we build a flow that displays a form for entering a Twitter message. Once the user enters the message and clicks Done, the Post Tweet component uses the Twitter account that has been integrated with the platform to post the tweet.

The form, Twitter Message Form, has been created for this example.

We begin by navigating to a project folder and clicking the Create Flow button.



We give the flow a name and click OK to open it in the Flow Designer.



We begin building the flow by adding the form for capturing the message.

From the Flow Designer start-up window, we expand the Flows, Rules, Forms and Reports > Forms [Integration] > [Current Folder] category and select a Twitter Message component. We click Add to add it to the workspace.



Next we add the step that posts the message.

In the Components panel, we expand the Communication > Twitter category, and drag a Post Tweet component to the workspace.



We connect the outcome paths, starting with the Start step, which we connect to the form step. We then connect the form step to the Post Tweet step, and the Post Tweet step to the End step.

We want the Post Tweet step to accept the user input entered on the form, so we select the Post Tweet step and, in the Properties panel, click the Show Mapping Editor link.



In the Mapping Editor, we connect the form’s output, the user-entered message, to the Post Tweet step’s input. We click OK to save the mapping and close the Mapping Editor.



This completes our flow, so we save it and run it in the Debugger.

Note that in Decisions version 3.5 and above, you’ll need to click Test Flow to access the Debugger.

3.5 Test Flow Shot

The Form tab displays the form. We enter a message in the Twitter Message field and click Done.



We click the Diagram tab to see the flow’s progress. There is a slight pause as the message is posted. . .



. . . and then the flow completes.



To validate the flow, we access the Twitter account, and view the message with the text “This message is posted from flow.”


Additional Resources