Building GLAMbots for social media – GLAMbot series #1

Introduction

Bots are one of those things that you might hear about a lot usually in a negative way. But despite what you may hear, not all bots are malicious. In fact, there are lots of creative and entertaining bots that are being used to promote collections or parts of collections and other cultural sector services in really interesting ways.

Some of the conflation is because the word ‘bot’ is a bit of a catch-all term – a bot is an application that is designed to automate a process or task on the internet. And indeed, there are lots of different kinds of bots out there.

Yes, there are spambots that churn out a lot of automated rubbish online, but there are also bots designed to communicate with humans, bots designed to entertain us and bots designed to make our lives a bit easier by automating a boring, repetitive task.

There are different kinds of internet bots, often based on the format or channels they publish to. There are Twitterbots, automated Twitter accounts that are often spammy with a recent tendency to interfere in elections, but are equally often fun, creative uses of social media spaces that will correct you when you misspell a common expression (@StealthMountain) or share satirical (but often eerily accurate) titles for Library conference talks (@lib_papers).

There are also chatbots, that can automate conversations between you and your users on the web, in Facebook Messenger or Slack and on lots of other communication platforms. We’ll be focusing on chatbots in the next post in this series.

Wikipedia has its own series of classifications for different types of bots, ranging from social bot, commercial bots, helpful bots to malicious bots.

What’s a GLAMbot?

But what do we mean when we talk about GLAMbots? Well, this is a term that we’re using to refer to bots that are promoting or remixing collections and other cultural artefacts, particular those from Galleries, Libraries, Archives and Museums (GLAM). So, different from newsbots and spambots. And also marginally different to artbots, though they definitely share some common genes.

For example, there’s the EuropeanaBot, which is a twitter bot created by Peter Mayr that tweets interesting things found in Europeana collections. There’s also a bot for the Digital Public Library of America, tweeting random items from the DPLA collections (@dplabot).
Museum Bot (@museumbot) tweets random images from New York’s Met Museum. And @TateBot does the same for the Tate collection.

But GLAMbots can also be used to put a different spin on collections too.

@NYPLEmoji promotes the New York Public Library Collection to new audiences by replying to emoji tweets with a related item in their collections.

[@FlyPapers](https://twitter.com/fly_papers ) is a twitterbot created by Casey Bergman to keep up with Drosophila literature by automatically tweeting new abstracts in Pubmed and preprints in arXiv.

A more random but equally interesting bot that remixes existing data is the Bracket Meme Bot, created by Tiny Subversions (aka Darius Kazemi) which uses Wikipedia data to create brackets (those tree diagrams used in basketball tournaments etc). So here’s the ‘invasions in fiction’ bracket, for example, that’s generated using this Wikipedia data.

(unfortunately, like many awesome bots impacted by Twitter’s API changes, this one will now wither on the vine. A bit like Vine).

A lot of bot creators also share how they created their bots, so you can learn a lot from existing bots as well as getting inspiration for your own creations.

Why build a bot

Bots can be a great way to promote collections and services in new and interesting way.

Automating this can both simplify the management and add something special to the interaction. For example, by automating a reply to what emoji it receives, @NYPLEmoji bot is providing real-time contextual applications of its collections.

Remixing is a powerful tool when it comes to sharing our collections.

Remixed media succeed when they show others something new; they fail when they are trite or derivative. Like a great essay or a funny joke, a remix draws upon the work of others in order to do new work. It is great writing without words. It is creativity supported by a new technology.
LAWRENCE LESSIG, Remix: Making Art and Commerce Thrive in the Hybrid Economy

If you have collections of high resolution images you want to promote more widely, creating a bot to publish these on social media is a great way of sharing these with new audiences.

If you have text based collections, an internet bot can provide ways to reimagine or remix this text to give it new context and interesting new interpretations.

Or why not combine your image and text collections to create brand new content?

Choosing your format

Twitterbots used to be the easiest way to get a bot up and running but due to recent controversy around Twitter spam accounts, Twitter has placed new restrictions on their API which has some pretty serious ramifications for art bots on the platform.

These means that you now have to apply for API access for each Twitter account you use (previously, you only need register as a developer once). So if you set up a new Twitter account, you then have to also tell Twitter what you plan to use it for, whether it will include replies or other automated interaction with users and how you will comply with the new developer usage guidelines. Phew.

There does seem to be a bit of leeway – particularly if you are developing a bot for ‘educational purposes’. In our experience, there does seem to be a human on the end of the dialogue with Twitter which helps when your use case is, let’s say, a little complicated.

That doesn’t mean that Twitterbots aren’t an option, just that you have to factor in the new restrictions (and make yourself familiar with the terms of use when designing your bot project).
If you’re looking at creating a dedicated Twitter account to remix or repurpose your collections or artefacts, then it’s well worth persevering to register for a Twitter developer account – particularly if that’s the platform where your users are.

Instagram has also got some strict policies about API access which makes it difficult to build bots on their platform. Basically, they don’t let third-party apps post to the platform. There’s been a slight loosening of this recently but it seems to be restricted to business accounts on Instagram. But their terms and conditions are also pretty clear about this so you can risk getting your account blocked.

Mastodon has proved an interesting space for bots and many Twitter bot refugees are shifting to this federated social media network. Botsin.space is a good place to start.

Check out the BotWiki for a full list of online bot types:
https://botwiki.org/resources/

Tools for the job

There’s an impressive community of knowledge-sharing and openness in the world of creative botmaking, so there are plenty of resources out there to help you get started .

Cheap Bots, Done Quick!, created by George Buckenham (@v21), is a great starter tool if you’re using Twitter to publish your bot. And now, someone has created a Mastadon version of this tool called Cheap Boots Toot Sweet, – another handy way to get a bot up and running quickly.

And the aforementioned BotWiki should always be your starting point when you’re ready to start designing a bot of your very own.

If you’re looking to provide new interpretations for your collections or resources using generative text, you’ll likely encounter Tracery. Tracery is an awesome and influential tool in the artbot world. It’s a Javascript library created by Kate Compton (@galaxykate) that uses grammars to generate text.

You can use what’s called ‘formal grammars’ with Tracery to create generative bots (bare with me).

When we use a generative text tool like Tracery, we’re able to automatically apply the rules of grammar to make more human sounding, meaningful content. So you may have a rule for your generative text specified and then a series of values, such as place names, that can be slotted into the allocated place. Formal grammars are the set of rules that are defined for your string of text.

It might help if we talk about a concrete example. Say, you wanted to create a bot that automatically generates social media posts based on a particular text in your collection. But you didn’t just want to tweet line-by-line, but instead create a new interpretation or respond to users in the character inspired by the text. Say, you want to draw on the world of Alice in Wonderland, with recognisable characters and places, but given a new story.

There’s an [interactive tutorial available]( http://www.crystalcodepalace.com/traceryTut.html) that can help you learn the Tracery syntax as well as some examples of bots created using Tracery like this one.

You don’t have to use generative text with your bot of course, you can pre-programme content that you want to share on social media or you can design your bot to respond to other content with related images, for example.

So let’s have a closer look at some of the tools available to help you write your own GLAMbot application.

Getting started building a GLAMbot

To get started creating a bot for social media, it’s mostly a matter of figuring out the content you want to share, and how you want to share it. Does it respond to something on Twitter, or are you just sharing excerpts from your collection around a particular theme? Are you creating a new character on Twitter that draws on your collections or are you looking to put lesser known elements of your collection in front of users.

Once you’re clear on the objectives of your Twitterbot project, you can then create a source of materials to share, this can be in a text file or from an API or even from a Google Spreadsheet.

There are lots of ways to remix and share content in automated ways, from dedicated tools like [SheetsTweets](https://sheetstweets.com/ ) to using an IFTTT applet.

For the Twitterbot we created for the ILI2018 Treasure Hunt, we added our source text to a Google Spreadsheet. Our bot then tweeted the next part of the text of Through the Looking Glass everytime the internet-connected button was pressed. This was created using Node.js and published on Glitch.

If you’re new to coding or would benefit from seeing some code examples, Glitch is a great platform for bot-building. There are lots of live examples that you can remix so you can try things out without having to install or host anything yourself.

For example, you can create a Node.js-based bot to automatically tweet a random image from your collection by following this handy tutorial on BotWiki.

Or you could do something similar with Processing. Here’s a video tutorial from the unstoppable force that is Daniel Shiffman.

If you want to make a literaturebot like Flypapers that we talked about earlier, there’s a walkthrough of how to do this available.

In Summary

We hope this guide inspires you to start thinking about new ways to interpret and disseminate your gallery, library, museum or archive content. There are lots of tools out there to help you share and remix your collections on social media. We’ve built different types of internet bots for various projects and have a few more planned, so if you have any questions about creating a bot to share your collections or other interpretations of your content, don’t hesitate to get in touch.

In the next post, we’ll be looking in more detail at Chatbots.