Twitter Bot Workshop

The goal of this workshop is to create artistic, literary, educational, and/or activist Twitter bots based on your own creativity and projects based on historical and/or literary figures, texts, archives, Twitter data and other cultural heritage collections. 

What is a bot?

A bot is an autonomous software machine that acts as a person or personifies a concept, creature, or thing. While there are millions of practical bots deployed on social networks (especially Twitter and Tumblr) and operating systems (i.e. Clippy, Siri, Alexa, Cortana, Google), the bots that we will focus on for this workshop are created for artistic, literary, educational, and/or activist purposes. We will be creating works in a genre that is designed for the Twitter stream: recurrent, generative, even interactive. 

Twitter Bot Examples

Conceptualizing Your Bot

As you read about bots, think about what aspect of your project and data you might be interested in sharing on Twitter. Your bot can serve a variety of goals, such as:

  • Dissemination – you may simply want to share some interesting aspect of your data with the community.
  • Promoting research – this allows you to get word about your project out there.
  • Community building – some of the most successful bots build audiences and communities around them, who then share and respond to its tweets.
  • Discovery – when you build a generator it surprises you with its output, drawing attention to aspects you hadn’t thought about. So it’s worth building one (even a private one) and following it so you see its output and can reflect on it. It’s a nice way of portioning data and drawing your attention to it in a focused way.

So think about how you’re going to represent this bot in a Twitter account that captures the essence of your concept.

Our Tool: Cheap Bots Done Quick!

Cheap Bots Done Quick! (CBDQ) is a wonderfully simple and empowering framework for bot creation and hosting created by George Buckenham and using Kate Compton’s Tracery JavaScript Library. This platform generates text (or ASCII and emoji art) using templates, variables, and datasets. It can also respond when tweeted at, allowing you to create chatbots. 

In CBDQ, you define variables (the word listed on the left) and the dataset– the options the system will randomly select from when each variable is called. CBDQ always begins by choosing a sentence from “origin” and when one of those sentences has a variable (a word surrounded by hashtags, like #alternatives#), it seeks that variable and chooses an option within that variable’s dataset. See the image below.

While there are other ways to create more powerful and functionally sophisticated bots, CBDQ, is simple, accessible, and foregrounds coding in a simple way, making it a powerful educational tool.

Workshop

The tutorial video will go over the following steps:

  1. Explore the Twitter bot examples listed above for ideas and inspiration to come up with a concept and basic operation of a bot you would like to create.
  2. Think of sentence templates, variables, and datasets that you can use to generate the kind of output you want your bot to generate. Here are some useful resources.
  3. Create a Twitter account for your bot. 
    1. You will need an email address for that account. You can create one from scratch, or if you have a Gmail account, you can add +botname to your e-mail address before the @ sign.
    2. Breathe life into the account with a profile picture, header picture, and description. This is where you begin to develop its character and personality.
  4. Go to Cheap Bots Done Quick! and connect to your Twitter account.
  5. Create your bot:
    1. Change the JSON code to meet your needs, keeping “origin” as the starting variable, and paying attention to having precise punctuation– JavaScript is unforgiving of errors, but CBDQ will tell you exactly where the problems are.
      1. For large data sets, you can save a lot of time using the CONCATENATE function in Google Sheets: 
        1. Prepare each word or phrase by creating a parallel column with the following command: =CONCATENATE(,char(34),(CELL#),char(34),char(44),” “)
        2. At the bottom of the prepared column type =CONCATENATE(range of column)
        3. Copy and paste that into the CBDQ JSON.
    2. You can test the output by hitting the refresh button beneath the JSON code.
    3. Optional: define its responsiveness by identifying key words it responds to and how it responds to them.
    4. Launch your bot: set up post frequency, click save and presto!
  6. Here’s the information on the bot created for this tutorial:
    1. The Twitter handle is @botpinions
    2. Its source code is available at: https://cheapbotsdonequick.com/source/botpinions
    3. The spreadsheet with the data set (and concatenation magic) is available here.
    4. The poll in its replies is here. And here is the sheet where it gathers the data.
  7. Share your bot on Twitter and in our conversation spaces.

Additional Reading

download pdf