itter, for many, has become a preferred medium of communication. Your email messages may never get read or, in the worst case, may get caught in the Spam folder but tweets and @mentions are very likely to get noticed.
When you are travelling or going on a vacation, with limited access to the Internet, you often create an “out of office” reply in your email program to let people know that you won’t be able to respond to them right away. How about doing something similar for people who are trying to reach you through Twitter?
What will the Twitter Auto-Responder do
Unlike your email program, Twitter offers no easy way for you to setup out of office auto-replies but we can easily and quickly add such a feature to our Twitter account(s) with the help of a simple Google Script.
You specify the start date and the end date when the auto-responder should be active and any tweets sent to you during this period will automatically get a reply from your Twitter account saying you are out of office (the auto-reply text can be configured). The replies are sent only once so if a person sends you two or more tweets during your vacation period, they will get only one out-of-office auto-reply.
How to Setup Out of Office Replies in Twitter
Step A: Setup a Twitter App
Go to apps.twitter.com and sign-in with your existing Twitter account. Create a new Twitter app (screenshot), add a description, website (any URL) and put https://spreadsheets.google.com/macros/ in the callback URL field.
Once the Twitter app has been created, click the Permissions tab and setRead and Write as the Application Type. Click Update Settings to save your changes.
Switch to the API Keys tab and make note of the Consumer API Key and API Secret.
Step B: Setup the Auto-responder Script
Click here to make a copy of the auto-responder script into your Google Drive.
Enter the start and end dates of your vacation, the Twitter API keys (from the previous step), and your Twitter handle.
Go to Run -> Start to initialize the auto-responder. Say Yes if the script requires you to authorize access to certain Google Script services.
Choose Run -> Start again and authorize the script to post tweets from your Twitter account.
The script will invoke itself on the specified start date and will respond to all incoming tweets until the end date. It will then stop itself automatically. As always, you are free to use, modify and distribute the source code with attribution.
When you are taking another vacation, just open the auto-responder script already present in your Google Drive, change the Start and End dates and choose Start from the Run menu to initialize the autoresponder again.
Use this Google Script to setup Out of Office auto-replies in Twitter. The script reads all the Twitter @KAMINDOZ and sends them a tweet with a custom status message.
1
2
3
4
5
6
7
8
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/* O U T O F O F F I C E F O R T W I T T E R */
/* - - - - - - - - - - - - - - - - - - - - - */
/* Written by Amit Agarwal http://labnol.org?p=27911 */
/* For help, email amit@labnol.org or tweet @labnol */
functionstart(){
// Please enter dates in YYYY-MM-DD HH:MM format
varOUTOFOFFICE_START_DATE="03/11/2013 18:13";
varOUTOFOFFICE_END_DATE="03/11/2013 19:00";
// This is your Out-Of-Office reply. Keep it less than 120 characters.
varOUTOFOFFICE_TEXT="I am currently out of the office,