How to Build a Twitter Bots for Automation
This step by step guide explains how you can create your own Twitter bot without writing a single line of code. It will take about 5 minutes to make a bot and all you need is a Google account and a Twitter account.
Step 1: Generate Twitter API keys
Create a Twitter App inside Twitter's developer portal and generate the API keys as explained in the Create Twitter App guide.
Step 2: Verify Credientals
Open the Twitter Bots application and sign-in with your Google account.
Create Twitter Bot button and provide the Twitter API keys that you have generated in the previous step. Click the
Verify Keys button to verify your Twitter bot credentials. If the verification is successful, you will see a success message.
Continue to move to the next step.
Step 2: Design the Twitter Bot
In this step, you will specify what the bot will do. You can configure the Twitter bot to send automated tweets, quoted tweets, retweet tweets, follow users or even send direct messages.
For this example, we'll configure the bot to send automated tweets whenever the @nytimes tweets an article with the word
cooking anywhere in the tweet.
Quote Tweet from the list of actions and specify the text (comment) that will go with your quoted tweet. You may use emojis, hashtags or even @mention users in the message text.
For the search query, we'll use
from:nytimes cooking to search for tweets from @nytimes that contain the word
cooking in the tweet. You may even say
cooking OR recipe OR baking to search for tweets that contain either of these words.
Twitter bots understand the spin syntax so your tweet replies may contain multiple variations of the same canned response.
Step 3: Dry Run (preview)
The way Twitter bots work is that they will first search for tweets that match your search query. If a tweet is found, the bot will apply the specified action on the tweet. It could follow the person who sent that tweet, retweet the tweet or send a direct message to the person.
You can click the
Dry Run button to get a list of sample tweets that match your search query. This will help you to verify that the search query is working as expected. No tweets will be sent or any action will be taken on the tweets in the dry run.
Step 4: Activate the Twitter Bot
Give your Twitter bot a name and the check the
Enable this bot checkbox. Click the
Save button to activate the Twitter bot. It will now run in the background and will start sending automated tweets whenever a tweet is found that matches your search query.
The bot runs once every 15 minutes or 1 hour depending on your plan.