Iterative Twitter Bot
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
View only
 
 
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Iterative Twitter Bot for Google Apps
by Allison Parrish
(inspired by Zach Whalen's work here: http://www.zachwhalen.net/posts/using-google-spreadsheets-for-a-generated-text-twitter-bot)

This is a Google Sheet that is also a Twitter bot! Here's how to get it to work:

- If you haven't already, copy this spreadsheet to your own Google account. (Go to File > Make a copy...)
- Switch to the "Tweets" sheet (at the bottom of this page). Paste in the text that you want your bot to Tweet. The first cell of each row should contain a single tweet. (The spreadsheet comes pre-populated with text from Shakespeare's sonnets. Delete these lines and replace them with your own.)
- Follow the instructions below to get the "Project Key" for your copy of this spreadsheet and put it in the appropriate cell.
- Go to https://apps.twitter.com/ and create a Twitter application.
- For the "Callback URL," go to Bot > Get Callback URL (in the menu above).
- Make sure the application is set to "Read and write."
- Copy the "Consumer Key" and "Consumer Secret" for your Twitter application into the appropriate cells below.
- Create a new Twitter user for your bot and stay logged into Twitter as that user.
- Select Bot > Authorize from the menu. Follow the instructions.
- Set the "Interval (minutes)" value in the cell below, taking care to choose only a valid value.
- Finally, select Bot > Start Tweeting from the menu. Your tweets should start appearing on your bot's Twitter account soon!

You can test to see if your bot is authorized by selecting Bot > Send test tweet. If at any time you need to redo the authentication process, select Bot > Clear auth and then Bot > Authorize.

If you have problems, contact me at allison@decontextualize.com. More information on this script here: http://air.decontextualize.com/twitterbot.

2
3
FieldFill in values in this columnExplanation
4
Consumer Key
Check "Keys and Access Tokens" tab in your Twitter app
5
Consumer Secret
Check "Keys and Access Tokens" tab in your Twitter app
6
Project Key
- Go to Tools > Script Editor...
- In the new window, select File > Project Properties...
- Copy the "Project key" string and paste it here.
7
Interval (minutes)120Number of minutes to wait between tweets. This needs to be either:
- 1, 5, 10, 15 or 30
- a multiple of 60 (60, 120, 180, etc.)
Keep in mind that a bot that tweets every minute will be very annoying and runs the risk of exceeding rate limits.
8
Current index1The current row from the "Tweets" sheet. This field will be incremented automatically, but if you want to skip ahead, you can change it by hand.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...
 
 
 
Setup
Tweets