Back to Side Projects
Tik2Insta
Cancelled

Tik2Insta

A Telegram bot that automatically converts TikTok videos to Instagram posts, preserving metadata like descriptions and tags while crediting the original author. Built as a proof of concept for creating an Instagram profile focused on cute animals.

Tags

PythonTelegramInstagramTikTokAPI IntegrationAutomationSocial MediaBot

Technologies Used

PythonTelegram Bot APIInstagram APITikTok APIPlaywrightVideo Processing

Project Links

Project Details

July 13, 2023
Side Project
Portfolio Showcase

Quick Stats

8
Tags
6
Technologies

Overview

Tik2Insta was an innovative Telegram bot designed to bridge the gap between TikTok and Instagram content. The bot automatically converted TikTok videos into Instagram posts while preserving all metadata including descriptions, hashtags, and proper attribution to original creators.

Built as a proof of concept for creating an Instagram profile focused on cute animals, the project demonstrated the technical feasibility of cross-platform content automation. While the bot was functional for several weeks, changes to unofficial APIs eventually rendered it non-operational.

Key Features

Telegram Integration

Seamless integration with Telegram Bot API for receiving TikTok URLs and processing requests

Video Processing

Automatic download and processing of TikTok videos for Instagram compatibility

Instagram Upload

Automated posting to Instagram with preserved metadata and proper formatting

Metadata Preservation

Maintains original descriptions, hashtags, and credits the original content creator

Automated Workflow

Complete automation from URL detection to Instagram posting with minimal user intervention

API Integration

Integration with multiple unofficial APIs for TikTok and Instagram functionality

How It Works

The bot operated through a sophisticated pipeline that handled content conversion from TikTok to Instagram:

Processing Pipeline

  1. 1URL Detection: Bot monitors Telegram chat for TikTok URLs and validates them
  2. 2Content Extraction: Downloads video and extracts metadata using TikTok API
  3. 3Video Processing: Converts video format and optimizes for Instagram requirements
  4. 4Instagram Upload: Posts content with preserved metadata and proper attribution

Bot in Action

Watch the Tik2Insta bot in action! This demonstration shows the complete workflow from sharing a TikTok video to receiving the converted Instagram post:

Loading video...

What You'll See:

  • 1. TikTok Share: User shares a TikTok video directly to the Telegram bot
  • 2. Bot Processing: Bot responds with status messages showing the conversion progress
  • 3. Instagram Link: Bot provides the final Instagram post link
  • 4. Result Verification: Opening the link shows the successfully converted Instagram post

Technical Implementation

The system utilized multiple APIs and processing techniques to achieve seamless cross-platform content conversion:

1. Telegram Bot Framework

Built using python-telegram-bot library for handling user interactions, URL detection, and providing status updates throughout the conversion process.

2. TikTok API Integration

Utilized unofficial TikTok APIs to extract video content, metadata, and creator information. Handled various TikTok URL formats and video types.

3. Video Processing Pipeline

Implemented video conversion and optimization using FFmpeg to ensure Instagram compatibility while maintaining quality and aspect ratios.

4. Instagram API Integration

Integrated with Instagram's unofficial APIs for automated posting, caption formatting, and hashtag management while respecting platform guidelines.

Challenges & Solutions

Challenge: Unofficial API Reliability

Working with unofficial APIs that frequently change their endpoints and authentication methods.

Solution: Implemented robust error handling and fallback mechanisms to handle API changes gracefully while maintaining functionality.

Challenge: Video Format Compatibility

Converting TikTok videos to Instagram-compatible formats while preserving quality and metadata.

Solution: Developed a comprehensive video processing pipeline using FFmpeg with optimized settings for Instagram's requirements.

Challenge: Rate Limiting & Detection

Avoiding detection and rate limiting from both TikTok and Instagram platforms.

Solution: Implemented intelligent rate limiting, user agent rotation, and request spacing to minimize detection risk.

Project Outcome

API Changes Impact

The bot was functional for several weeks until the unofficial APIs used for TikTok and Instagram integration underwent significant changes, rendering the bot non-operational. This is a common challenge when working with unofficial APIs that lack stability guarantees.

Proof of Concept Success

Despite the eventual API issues, the project successfully demonstrated the technical feasibility of automated cross-platform content conversion. The bot was able to process multiple videos and maintain proper metadata preservation, proving the concept was viable.

Technical Learning

The project provided valuable experience in working with multiple APIs, handling video processing, and managing complex automation workflows. The challenges encountered highlighted the importance of API stability and alternative approaches for production systems.

Skills & Technologies Gained

Python Bot Development
Telegram Bot Framework
Developed a sophisticated Telegram bot using python-telegram-bot library, handling user interactions, URL detection, and providing real-time status updates throughout the conversion process.
API Integration
Multiple Platform APIs
Integrated with unofficial TikTok and Instagram APIs, handling authentication, rate limiting, and data extraction while managing API changes and fallback mechanisms.
Video Processing
FFmpeg & Format Conversion
Implemented comprehensive video processing pipeline using FFmpeg to convert TikTok videos to Instagram-compatible formats while maintaining quality and aspect ratios.
Automation Workflows
Cross-Platform Content Automation
Built end-to-end automation systems for content conversion, metadata preservation, and cross-platform posting with minimal user intervention.
Social Media Integration
Platform-Specific APIs
Worked with social media platform APIs, understanding their limitations, handling platform-specific requirements, and managing content formatting.

Key Learnings

This project provided valuable experience in working with multiple APIs, handling video processing, and managing complex automation workflows. While the bot eventually became non-functional due to API changes, it successfully demonstrated the technical feasibility of cross-platform content conversion and provided important lessons about the challenges of relying on unofficial APIs for production systems.