Twitter is a great source of content for countless professionals across different industries.
Social media managers, influencers, media and PR companies often quote tweets from accounts they follow to inform and engage their audiences around different topics.
However, quoting tweets isn’t always a straightforward task.
First of all, let’s address the elephant in the room: Most people take screenshots when quoting tweets, and the result isn’t exactly an aesthetic marvel.
It’s not rare for companies to involve designers at this point, because uploading a tweet screenshot won’t cut the design standards. In other words, sometimes you need to make those tweets prettier before sharing them.
On other occasions, this issue goes beyond taste, and turns into a technical challenge.
Think, for example, about sharing a tweet on Instagram. Since the content layouts for Twitter and Instagram are different (the former is horizontal, the latter vertical), tweet screenshots just don’t fit well as Instagram posts.
Finally, there’s the problem of time and resources.
Perhaps you are aware of the issues already, but can’t spend too much on them. Or maybe you are already spending too much on them, and want to reduce the burden.
Considering all of the above, we are going to show you how to turn tweets into high-quality images, automatically.
This way, you will have access to a large number of visual resources to use across social media, blogs, newsletters, email campaigns, and whatnot.
Before we jump into the tutorial, let’s take a minute to see how this solution works, and what you will need to create it.
Turn tweets into images without lifting a finger
This tutorial will require you to integrate three different apps using Integromat, namely:
- Google Drive
To make it work, you will need accounts for each of these, plus an Integromat account as well (and since Twitter is the only premium app on Integromat, it has to be a paid one).
The integration works as follows:
- First, it watches the tweets of an account you specify (in our example we’ll watch Elon Musk’s tweets)
- Second, it filters the tweets according to criteria you specify (this is optional; in our example, Integromat will only process tweets containing the words “space” and/or “Mars”)
- Then, it converts the contents of tweets into visually-appealing images using APITemplate
- Finally, it downloads the resulting images and stores them in a Google Drive folder
So, next time we need to quote Elon Musk discussing space or Mars, we’ll just go to the Google Drive folder and grab it. Pretty cool, right?
Now, let’s get down to action, and learn how to transform tweets into images you can share.
Step 1: Getting the tweets
The first goal of this Integromat scenario is to monitor Twitter and retrieve posts made by a particular user (if you wish to monitor multiple accounts, you can clone the scenario as many times as you wish; more on this later).
So, to accomplish this, create a new scenario from your Integromat dashboard, and add the “Twitter > Watch Tweets” module to it.
Once you do this, the configuration box for that module will pop up.
Here, create a new connection with your Twitter account by clicking the “Add” button next to the “Connection” field.
Enter a connection name of your choice, and click “Continue” to proceed. Follow the steps on the pop up window to establish the connection.
After connecting your Twitter and Integromat accounts, enter the Twitter handle of the account you want to watch in the “Screen name” field.
Finally, in the “Limit” field, you can enter the number of new tweets that will be retrieved each time the scenario is executed.
Step 2: Setting up the APITemplate module
Now that the Twitter module is set up, the next step is to generate an image with the data retrieved from a tweet.
To achieve this we will use the “Create an Image” APITemplate module.
Bear in mind, you need to sign up for an APITemplate account before you can configure this module. The app has a free plan available that will let you generate up to 50 images from tweets every month.
Once you have your APITemplate account, navigate over to the API Integration page.
Here you will see your API Key, which you will need to establish a connection between Integromat and APITemplate. Copy it and paste it somewhere - you will need it in a bit!
In your APITemplate account dashboard, click the “New Template” button to create a new template.
Here you can select a template for your images, give it a name, and define the image size.
For this example we will choose the template with the yellow background, name it “Tweet” and set the size to 1080x1080 (which is the size of a typical Instagram post).
Finally, click “Create” to proceed.
After doing this, click “Launch Image Editor” to customize it.
The image editor is similar to most image editing tools, so you might already be familiar with the layout.
Each element that you add to your image can be edited directly from an Integromat scenario, as you will see at a later stage.
The way these elements can be accessed within Integromat is by their layer name.
By clicking on each layer of the image you will see its properties on the right side.
For example, you can click on the text on the image where the user's Twitter handle should be displayed, and rename the layer to twitter_handle (originally named text_twitter).
You can do the same for the twitter_name layer (originally named text_name).
Finally, you can delete layers that are not useful, such as footer_text and line_1.
Once your template is ready, leave the image editor open and navigate back to your Integromat scenario.
Next, click on the APITemplate module to open its configuration window, and then click on the “Add” button next to the connection field.
This is where you have to paste the API key you copied earlier.
Once you do that, click the “Continue” button to establish the connection with your APITemplate account.
Now it's time to instruct the APITemplate module on how you would like to modify the image template you created earlier, so it includes the data retrieved from a Twitter post.
Switch back to the APITemplate image editor and navigate to the “Zapier/Integromat/N8n' tab”.
Here you will see a list of all the layers and properties that your image has. The properties of the layer are simply the elements that can be edited on it.
For example, you can edit the value of the text on a layer that contains a text field, as well as the text color, the background color, the font size, and so on. These are all properties of a text layer.
To let Integromat know which properties of each layer you want to edit, you have to copy the property and paste it in the module as a key-value pair.
The key is the property, and the value is, mind the redundancy, the value you want that property to have.
For this example we will be passing data to the following properties:
- image_profile.src, which will be equal to the URL of the Twitter user's profile picture
- text_content.text, which will be equal to the content of the tweet
- twitter_name.text, which will be equal to the name of the Twitter user
- twitter_handle.text, which will be equal to the handle of the Twitter user
To add a new property key-value pair in the APITemplate module, simply click the “Add item” button under the “Key Value Pairs” field.
First, paste the property you would like to modify from the image template. Let's start with twitter_content.text.
Next, you need to enter the value this property will have once the scenario is executed.
Since the goal is to dynamically create an image using the data retrieved from the previous Twitter module, we will use a process called data mapping.
If you click on the “Value” field, a window will pop-up. Here, you will see a list with all the data elements retrieved from the Twitter module.
For the text_content.text property you need to map the “Text” data element from the “Watch Tweets” module. Simply click on it and it will be mapped.
Repeat the same process, by adding another item to your 'Key Value Pairs'.
Add the key twitter_name.text and map the “Name” data element (found under the User collection) to the “Value” field.
Next, do the same with the twitter_handle.text property.
This time, map the “Screen name” data element (found under the User collection) to the “Value” field.
Finally, repeat the process once again with the image_profile.src property.
This time map the “Profile image URL” data element (found under the User collection).
Now that your 'Key Value Pairs' are mapped, the last step is to select the template you would like to modify.
Simply click on the “Template ID” dropdown field and select your template.
Great! The APITemplate module is now ready.
When your scenario executes, this module will receive the Twitter post data and pass it to the APITemplate server, where an image will be generated based on the template created earlier.
Once this image is generated the module will output an image URL, which you need to use in order to download the image to the Integromat scenario, which will then upload it to Google Drive.
Step 3: Filtering the tweets
In this step, we will include a filter, so the scenario only generates images for tweets that meet a specific criteria.
We are doing this for a simple reason: If we don't, our scenario will generate images for every tweet the account we are following posts, which will likely result in lots of useless images down the line.
So, in order to filter the tweets, click on the tool icon that appears between the Twitter module and the APITemplate module in the scenario.
This is called a filter, and by clicking on its configuration window will pop up.
Here you can specify the conditions you would like the tweets to meet in order to pass through the filter.
In our example, we will filter out tweets by Elon Musk that are related to space projects. To do this, we have to enter two conditions: That the “Text” data element contains the words “space” or the word “Mars”.
See the image below for reference:
Once the filter is set up, click “OK”, and proceed to the next step.
Step 4: Setting up the HTTP module
To download an image to your scenario, you need to use the “HTTP > Get a file” module.
After you add it to the scenario, simply map the “Download URL” (or Download URL PNG) data element from the APITemplate module.
And that’s all we need from this module. Now, let’s move on to the final bit of this scenario.
Step 5: Configuring the Google Drive module
Finally, it is now time to upload the generated image to your Google Drive.
To do this you need to add the “Google Drive > Upload a File” module to your scenario.
On the configuration window you will have to establish a new connection with your Google account.
Google currently has some restrictions in place that require you to generate a custom OAuth client to allow Integromat to interact with your Google services (including Google Drive).
To achieve this and set the connection with Google Drive, please follow this guide.
Once your connection is established, you need to configure the module as shown below.
Choose the “Select from the list” option for the “Enter a Folder ID” field. This will allow you to select “My Drive” as well as the folder inside your Google Drive space where you want to store the generated images.
As the source of the image file, you need to select the “HTTP - Get a file” option, since this is the module that has downloaded the image from APITemplate.
Finally, you can click the “Show advanced settings” option and enter a custom name pattern for your image files.
For example, you can dynamically pass the “Screen name” twitter data element to the file name so you can easily search for the quotes of specific twitter users once the image files are in Google Drive.
Congratulations! The scenario is now ready. You can go ahead, save it and then click the “Run once” button to execute it.
If your scenario executes successfully a new image will be uploaded to your Google Drive with the latest post of the Twitter user you are monitoring.
To execute this scenario automatically, you can edit the scheduling settings by clicking on the clock icon next to the Twitter module.
A window will pop up where you can define the scenario execution schedule.
Once you do that, you can click on the “Scheduling” switch at the bottom left corner to turn the scenario ON.
Final thoughts and results
This solution will allow you to automatically create quotes from tweets, which is useful when you need content from different sources (such as rising entrepreneurs, thought leaders, politicians) transformed into images that look good.
So, instead of being stuck with this:
You will have an image like the one below:
In other words, this will allow you to improve the quality of your content and optimize your resource allocation all at once.
Each time you need an image to convey a tweet in an aesthetic way, all you’ll have to do is go to your Google Drive, and it’ll be ready for you.