Site iconAxway Blog

Integrating Axway Application Integration: Automating the use of Twitter Tweets with Hashtags

automating use of Twitter Tweets with Hashtags

automating use of Twitter Tweets with Hashtags

This blog entry is part of a two-part series where we will ultimately build a Cloud to Cloud (C2C) integration between Twitter and Slack, utilizing a Scheduled trigger to execute an automated orchestration Flow.

In this blog entry, I will cover how to:

  1. Create a Scheduled Trigger Flow in Axway Integration Builder (IB).
  2. Set the Trigger to check periodically for Tweets with a specific hashtag.
  3. Create a Flow Instance to execute successfully and monitor the steps configured in the Flow.

Prerequisite Reading

This ain’t our first rodeo! Not every step is explicitly covered here if we have done it elsewhere before. Check out these two blogs to fill in the pieces where mentioned in the below steps.

Integrating Axway Application Integration and Slack by Daniel Wille

Axway Integration Builder—Scheduled Triggered Flow Example by Leor Brenman.

Create and Configure and Event-Based Flow

At this point, we have seen how the Twitter APIs can be used to see statuses with a specific hashtag. Next, we can see how to set up a Scheduled Trigger to poll automatically Twitter on a schedule and capture new Tweets using that hashtag.

Build New Flow Template

Flow Variables

JS Script Contents

let body = {“text”:'”‘+steps.CallTwitter.response.body[0].text+'”‘};

done({body:body});

Demonstrate the Flow in action.

Conclusion

At this point, you should have a working Cloud to Cloud integration between Twitter and Slack with an automated Flow Instance that kicks off a Scheduled execution of the Twitter statuses API once per minute. This Flow checks for hashtags as defined in the Connector API Call step, and relays them to an endpoint, in this case, a Slack channel.

The Flow Template is completely reusable. Just create a new Flow Instance where you can modify the Slack or Twitter instances you are connected to, or the Slack Channel or cron. This could also be updated to allow for a variable for the hashtag. Perhaps one also wants to watch for floods, hurricanes or tornados!

What Now?

From here there are many ways you could use this base demo.

The possibilities are endless!

Enjoy this blog post? Follow me on the Axway Devblog. Stay tuned, enjoy and reach out if you have any questions, comments or concerns with this configuration!

Want to know more about Axway Integration Builder and the art of the possible? Let us know by going to our site and clicking the “CONTACT” tab in red on the right.

Exit mobile version