Tracking Twitter Mentions With Monday.com
You can use Reshuffle's open source integration framework to easily integrate Twitter and Monday services to meet your brand's needs for social monitoring.
Join the DZone community and get the full member experience.Join For Free
Monitoring social media mentions is an essential part of any business. It gives brands an opportunity to track, analyze, and respond to conversations about them on social media. In this quick tutorial, I will show you an example of how you can setup a simple Twitter mentions tracker with Monday.com.
In this article, we will be using Reshuffle's open source integration framework to easily integrate Twitter and Monday services to meet your brand's needs for social monitoring.
Let's Build It
Normal setup and configuration could take a while in order to get these services to work together. Reshuffle is an open source, lightweight, and event-driven framework that helps you build integrations that complete complex tasks.
These integrations and workflows are created inside a Reshuffle App. The objects that let you interact with these services are called connectors.
The first thing we need to do is to declare a Reshuffle App and a Twitter connector that will search for any @mentions or #hashtag passed in.
To keep track of mentions, we will be pushing them onto a Monday board using the Monday connector.
Now that we have the connectors declared, we can start using them.
First thing is to make a new board from your Monday dashboard. Get the board ID from the URL (eg. new-board-name.monday.com/board/2193445), this will be used to get the board data like column IDs, item names, etc. Make a new board with columns that look similar to this.
As you can see above, we use the
BOARD_ID to fetch any items that are currently on the board using the
getBoardItems method. For each of the row names, we will be using the Twitter IDs, as you will see later on. This function will run before any Twitter connector actions to prevent duplicate tweets from being saved onto the board.
With this duplicate check in place, we can move on with the Twitter connector.
We need to define the event to listen to using the Twitter connector's
on() method. In this case, we will listen for search events.
We will get an array of tweets from the event object. You can see in the
if block, we run a check on the object from earlier, to prevent duplicate tweets from being added onto the Monday board. If the tweet does not exist in the object, we can continue to add a new row with the
addNewItem function we will create.
In this function, we will be using multiple methods from the Monday connector. First, we use the
getColumn, to get the titles of each column, then we create an object using the column titles as the key. Finally, we can pass it through to the
createItem method to generate a row that will look something like this.
Last but not least, let's initiate the integration by starting the Reshuffle App
With minimal code, Twitter mentions are easily tracked with the Monday board. Now it's your turn to get creative! Find new solutions to monitoring social mentions, maybe extend this functionality by tracking the frequency of daily mentions.
Published at DZone with permission of Alan Lee. See the original article here.
Opinions expressed by DZone contributors are their own.