Auto Post from Instagram to Telegram, Pinterest and Other Social Media Platforms
What this scenario does: Watches for your new posts on Instagram, downloads the files and posts to Telegram and Pinterest.
Level Of Difficulty: Intermediate
Implementation Time: Approximately 20 mins
Assumptions: You have a Telegram account with a configured Bot as well as an Instagram and Pinterest account with all connections added. An understanding of how to use/add Routers, Filters, and an Array Aggregator. It is important to note here that the Instagram module can only watch for your new posts on your account.
With so many social media platforms and instant messaging services available at our fingertips these days, who has the time to post to each one individually?
This tutorial shows you a way to post from Instagram to Telegram and Pinterest automatically however, it’s not limited to these apps only.
Feel free to replace/add other social media/IS apps to meet your own individual needs.
Configuring the scenario
The scenario consists of the following modules:
Instagram > Watch my account
Router
Instagram > Download a media file
Array Aggregator
Instagram > Get media album
Telegram Bot > Send a document/image
Pinterest > Create a pin
Telegram Bot > Send a video
Telegram Bot > Send an album (media group)
Here’s the scenario:
The connection is added in the Instagram > Watch media module so let’s take a look at the Instagram > Download media module as you first you need to download the file/s and then post to other apps.
Simply map the Media ID element outputted by the Instagram > Watch media to the Media ID field:
Adding a router, Telegram and Pinterest modules - Top route
Next is the Router that splits the scenario into 3 routes and each route contains a specific filter.
The purpose of the filter on the top route between the Router and the Telegram Bot > Send a document/image module is to only allow single**image files** to pass through to the subsequent modules.
To set this up, map the Media type element outputted by the Instagram > Watch media module to the top field. Next, select the Contains (case insensitive) text operator and type in IMAGE in the bottom field:
If the bundle meets the filter’s criteria, it will pass through to the Telegram Bot > Send a document/image module and the image file will get posted to the relevant channel/group.
To configure this module, you need the Chat ID of the channel/group. To obtain the Chat ID, follow the steps shown here. Now enter the Chat ID in the relevant field.
Next, map the Caption element outputted by the Instagram > Watch media module to the Caption field.
In the Send by field, select Data and under Source File, select the Instagram > Download media module:
The bundle then passes through to the Pinterest > Create a pin module. Here, you simply need to create a pin with the image received.
To do this, select the relevant board from the menu and map the Caption outputted by the Instagram > Watch media module.
Under the Pin image menu, select Upload image and under Source file, select the Instagram > Download media module:
Adding the Telegram module - Middle route
Let’s take a look at the filter on the middle route between the Router and the Telegram Bot > Send a video module. The purpose of this filter is to only allow single**video files** to pass through to the Telegram Bot module.
Set up the filter as you did with the previous one but this time, type in VIDEO in the bottom field:
The configuration of the Telegram Bot > Send a video module is the same as the Telegram Bot > Send a document/image module:
Adding the Instagram and Telegram modules - Bottom route
The purpose of the filter on the bottom route between the Router and the Instagram > Get album media module is to only allow Instagram posts that contain multiple images/videos (carousel album) or a combination thereof, to pass through to the subsequent modules.
Set up this filter the same as you did with the previous 2 but in the bottom field, type CAROUSEL_ALBUM:
Next is the Instagram > Get album media module which is required to retrieve the carousel album media in order to be downloaded in the subsequent module.
Simply map the Media ID element outputted by the Instagram > Watch media module to the Media ID field:
The second Instagram > Download media module is next.
Here, you need to map the Media ID element outputted by the Instagram > Get Album media module to the Media ID field:
Following the Instagram > Download media module is the Array Aggregator which is used to aggregate multiple bundles of data into a single array containing collections of specified items.
Here, the Array Aggregator combines the multiple media files (bundles) received from the preceding module into a single array (1 bundle) containing collections of the files.
Select the Router as the Source Module and Media under Target structure type:
Important
Under Media Type, you can select either Video or Image. In this instance, the Array Aggregator only allows you to select 1 option per media type however, there are various ways to incorporate both media types:
Add a Router with 2 routes containing filters after the Instagram > Download media module. 1 route for videos and the other for images (min of 2 media)
Data store - create a data structure for media types and store all media in the data store. Retrieve the media from the data store and post on Telegram.
As a work around, simply select the video option since Telegram still posts the images. However, the channel/group downloads it first to view.
Next, map the Caption element outputted by the Instagram > Watch media module and under Send by, select Data. Under Source file, select the second Instagram > Download media module.
Last is the Telegram > Send an album (media group) module. Here, enter the Chat ID and map the Array[] element outputted by the Array Aggregator to the Media field:
All done! There are 3 successful executions of the scenario below. Let’s take a look.
Execution 1: Single image
Here you can see that the Instagram > Download media module downloads the image file, the bundle meets the filter's criteria on the top route and the Telegram and Pinterest modules posts the image:
Execution 2: Single video
In this execution, Instagram > Download media module downloads the video file, the bundle passes through the filter on the middle route and the Telegram module posts the video:
Execution 3: Video and Image
The Instagram post contains a video and an image file therefore the bundle meets the filter's criteria on the bottom route. Moreover, the Instagram > Get media album module retrieves the files and the Download media module downloads the files.
The Array Aggregator aggregates the bundles and the Telegram module posts the files:
And that’s it! Hope you found this tutorial useful.
Let Make automate your social media posts for you!
Happy Automating!