Twitter Integration with UiPath

Twitter Integration with UiPath

Introduction

UiPath has been adding connectors for various platforms. Twitter is one of the most widely used social media platform and recently UiPath has developed a package to integrate with it. The following blog post takes you through the steps needed to set up this integration. All the actions that can be performed on Twitter can now be programmatically handled via Twitter activities package.

Set up

The first step is to download the twitter package from the Manage Packages option. At the time of writing this article, the following is the current Integration Service package.

twitter-activities

Once this package has been added, you'll be able to see the following activities under the Integration Service. As we can see, we have the activities for all the actions that one can take on Twitter. Thus, it's easier to automate the social media platform usage with UiPath.

twitter-activities

To use the Twitter activities, you'll need to drag and drop the Twitter Scope from the Activities panel.

twitter-scope

Click the Configure button to authenticate the Twitter account. Once you click on Configure, you'll be asked to authenticate your account.

twitter-connection

Just authorize the application for your user (which appears on the top right of the screen).

uipath-authorize

Once this is done then you'll see both the Robot and Design connections populated with the username as shown in the below print screen. Now, you're all set to use the different Twitter activities. 

twitter-connection-updated

For almost all the Twitter activities, you'll need the Twitter user Id to be passed as a parameter to the activities. So, let us start with the activity to get the user Id.

The simplest activity to get the user id is to use the “Get Current User” activity. This will get us the user id for the user that's been configured for the connection earlier.

get-current-user

We can also use the “Get User by username” activity and pass the Twitter username to get the corresponding User Id. This allows us to use a different user compared to the one that's been used for the connection.

get-user-by-name

Now, this id can be used for other activities.

For example to list all user tweets, we can use the List All User Tweets activity passing this same user id. 

List-user-tweets

List-user-tweetsNow, you can simply iterate and log the user tweets as it follows.

for-loop-tweets

Similarly, to get the list of followers for a particular user id, you can use the following activity. 

list-all-followers

This will give a list of users that follow the given User Id.

It's quite easy to implement the Twitter package and use the corresponding activities.  

Use cases

Using Twitter activity opens some use cases for implementation.

Feed the twitter results to the Sentiment Analysis model for AI Center. This can help determine the current sentiment or trend for any of the topics. 

twitter-use-case

Automated tweets for significant announcements on Twitter to increase presence via tweet, retweet, polls, etc. This can result in increasing the social media presence for the company thereby attracting new talent, customers, and partners. This can be easily used by the company’s marketing department, and it can be integrated directly with the targeted database.

twitter-use-case-1

Nowadays, knowledge is power.  Businesses can be impacted by market conditions, political, legal, technological, and competitive factors, etc. It is better for companies to know as soon as there is a change so that they quickly take action. Twitter is the most widely used medium for such announcements. Thus, there can be a robot that follows significant Twitter handles and feeds this information directly to the company's broadcast channels. This can have a direct impact on revenue as it might enable them to decide faster upon the changes.

twitter-use-case-2

Conclusion

There are many possibilities for organizations to leverage Twitter. Using Twitter package activities makes it easy for developers to enable this integration with UiPath inside their organization.

Vishal Kalra
Vishal Kalra

Architect , Applications Software Technology LLC (AST)

Get articles from automation experts in your inbox

Subscribe
Get articles from automation experts in your inbox

Sign up today and we'll email you the newest articles every week.

Thank you for subscribing!

Thank you for subscribing! Each week, we'll send the best automation blog posts straight to your inbox.