With Power Apps, not only can you build apps quickly, you can also drive the transfer of data between platforms though the huge number of connectors. Twitter is the social media platform that really makes it easy to exchange data and here is an example of what can be done
Connect to Twitter
Power Apps will extract tweets from a Twitter feed, validate the structure of the content and then load the Tweets and related info to an Excel spreadsheet on OneDrive
The Power App is driven via a timer that extracts the tweets using the Twitter connector. The timer runs for 15 minutes and OnStart loads the 100 most recent tweets and assigns them to a collection. Twitter limits the PowerApps connector (and any other connectors) to a maximum of 15 calls every 15 minutes and 200 tweets per call, so the timer could be run much more frequently and load even more data if necessary
As soon as the tweets are loaded, the app checks each Tweet in the collection against those already in the OneDrive Excel spreadsheet to remove tweets from the Collection that have been loaded into the spreadsheet in a previous cycle. The remaining Tweets in the collection are then added to the Excel table
Here’s a video of the app running with progress indicted in the red box at the top. This particular app populates 2 seperate Excel tables depending on the format of the Tweet but they both work in exactly the same way
Load the Tweets
Connect to Twitter via the connector and add a timer set to run at your chosen duration. Using the OnStart property extract the most recent Tweets (in this case 100) and load into the colTwitterTemp collection
Every Tweet is given a unique ID by Twitter. RemoveIf is used to de-duplicate the collection with any Tweets that have already been added to the Excel table from a previous cycle. StandardTweetList is the Excel table and the column ID holds the TweetId record in that table which is used as the unique identifier
The remaining Tweets in the collection are then displayed in the gallery you can see in the demo
Assign to a Variable
Count the number of Tweets (in this case those that start with the text and hashtag “New #job” ) and assign the total to a variable
Patch the Data
Patch the data into the Excel table. The Posted column is used to measure the progress of the app adding records to Excel with a value of 1 indicating a new record has being loaded. You can see this running and updating in real time in the demo
Summary
That’s it! Its that easy to extract data from one of the most widely used social media platforms and load it into a spreadsheet or other data source
Instead of using Power Apps, Power Automate can also be used with a Scheduled Flow so the whole process runs in the background using the power of the Microsoft Cloud. Power Automate avoids the need for a tablet or PC to run the Power App, Power Automate just executes the process automatically
There’s loads more you can do with the Twitter connector, for example, you can analyse the positivity of Tweets relating to a hashtag (for example your company) by use of Azure AI Text Sentiment. It’s also straightforward to reverse the process and use a Timer to post Tweets from a spreadsheet using Power Apps. Both sound like they are complicated, but not with the Power Platform