Send Personalized Tweets & DMs in Bulk from a Google Spreadsheet

Published in: Google Sheets - Twitter

Introducing Twitter Merge, a new Twitter app that will help you send personalized tweets and direct messages (or DMs) to multiple Twitter users in one-go. You create a template for the tweet, specify a list of Twitter users and the app will take care of the rest. The Twitter Merge app, like Gmail Mail Merge, also runs inside a Google Spreadsheet but instead of emails, this one allows you to send customized tweets and DMs in bulk.

Let me share a scenario where such an app may be useful.

Say you are a brand and you are trying to organize meetings with Twitter users in various cities on different dates. You want to send them invites on Twitter but it would take just too much effort to compose the tweets or DMs manually. You thus create an invite template and add the Twitter user names in a Google Sheet. The Twitter Merge app, using that template, will send a personalized tweet (or DM) to every handle listed in the sheet automatically.

Here’s a sample Tweet template and the corresponding tweets / DMs generated from the template.

Personlized Tweets

To create a Twitter template, write a tweet in notepad (or any text editor) and replace the words that will be different in each tweet with {{variables}}. For instance, if you are write a tweet with customized name and city, your template will read something like hello _{{first name}}_ from _{{city name}}_ while the “First Name” and “City Name” will be columns in your Google Spreadsheet.

Bulk Send Tweets & Direct Messages

Follow these steps to get started:

  1. Click here to copy the Twitter Merge spreadsheet in your Google Drive.
  2. Add new columns to the sheet so that you have one for every variable that exists in your tweet template. The column names should be the same as the variable name though the case doesn’t matter.
  3. Fill the spreadsheet with one or more rows. Add the Twitter screen names in the “Twitter User” column while keeping the “Tweet” and “Status” columns as blank.
  4. Go to the Twitter Merge menu at the top and choose Authorize. This is required because you need to allow the Spreadsheet to send tweets on our behalf.
  5. From the same menu, choose Configure and paste the text of your tweet template. You also need to specify whether the tweets are be sent as DMs or public tweets. Save the configuration.

We are almost done now.

The “Tweet” column will display the actual text that will be sent and you have an option to manually edit that text. Choose Send tweets from the Twitter menu and the app will send the customized tweets to all the listed Twitter users. The following video (link) will also guide you through the process.

Also see: Archive Twitter Search Results in Google sheets.

Later, if you wish to send more tweets or DMs, you can just repeat from step 2 onwards.  Also, if the “Status” column for a tweet is set as “SENT”, the app will skip sending a tweet to that particular Twitter user.

Internally, there’s a Google Script running that transforms your template into actual tweets using data from the row and it then connects to the Twitter API to send the tweets. Give it a try and do share your feedback in the comments section below.

📮  Subscribe to our Email Newsletter for Google tips and tutorials!
Published in: Google Sheets - Twitter

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
Amit Agarwal

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube