Smm
A comprehensive Python-based social media automation platform built on the Frappe framework. SMM enables automated content creation, scheduling, and multi-platform posting with AI-powered content generation.
- Author: akaoio
- Repository: https://github.com/akaoio/smm
- GitHub stars: 0
- Forks: 1
- License: NOASSERTION
- Category: Integrations
- Maintenance: Minimally Maintained
Install Smm
bench get-app https://github.com/akaoio/smm
Add the Frappe Gems badge to your README
Maintain Smm? Paste this into your README:
[](https://frappegems.com/gems/apps/akaoio/smm)
About Smm
SMM - Social Media Marketing and Management System
A comprehensive Python-based social media automation platform built on the Frappe framework. SMM enables automated content creation, scheduling, and multi-platform posting with AI-powered content generation.
Features
🤖 AI-Powered Content Generation
- OpenAI Integration: GPT-4 for intelligent text generation
- DALL-E 3: Image creation and variations
- Smart Content Mechanisms: Rule-based content generation with customizable prompts
- Multi-Source Aggregation: Combine RSS feeds, prompts, and linked content
📱 Multi-Platform Support
- X (Twitter): Full OAuth 1.0a/2.0 support, media uploads, threading
- Telegram Bot: Message and media group posting
- Facebook: Basic integration
- Extensible: Plugin architecture for additional platforms
📅 Advanced Scheduling
- Activity Plans: Convert high-level strategies into scheduled activities
- Smart Scheduling: Conflict resolution and dependency management
- Time-Based Execution: Automated content generation and posting
- Agent Management: Multiple account support per platform
📡 Feed Management
- RSS Integration: Automated feed parsing and content extraction
- Virtual Feeds: JSON-based content sources
- Multi-URL Support: Multiple sources per feed provider
- Configurable Intervals: Customizable fetch frequencies
Installation
Prerequisites
- Python 3.7+
- Frappe Framework
- Bench (Frappe development tool)
Setup
Clone the repository:
git clone cd smmInstall dependencies:
pip install -r requirements.txtInstall the app:
bench get-app smm /path/to/smm bench --site [your-site] install-app smmRun migrations:
bench --site [your-site] migrate
Configuration
API Setup
Configure API credentials for each platform:
- OpenAI: Add API token for content generation
- X/Twitter: Set up both OAuth 1.0a (media) and 2.0 (posting) credentials
- Telegram: Configure bot token
- Facebook: Add app credentials
Agent Configuration
- Create Agent records for each social media account
- Complete OAuth authorization flow
- Configure agent groups for bulk operations
Content Mechanisms
Define content generation rules: - Text generation parameters (length, style) - Image generation settings (size, style) - Feed source combinations - Custom prompt templates
Usage
Basic Workflow
- Setup Feed Providers: Configure RSS feeds or virtual content sources
- Create Content Mechanisms: Define AI generation rules
- Configure Agents: Set up social media accounts with OAuth
- Create Activity Plans: Schedule content generation and posting
- Monitor Activities: Track execution and performance
Manual Operations
Test Content Generation
bench --site [site] execute smm.libs.openai.generate_content --kwargs '{"name":"[mechanism_id]"}'
Test Social Media Posting
bench --site [site] execute smm.libs.activity.cast --kwargs '{"name":"[activity_id]"}'
Fetch Feeds
bench --site [site] execute smm.libs.feed.fetch --kwargs '{"name":"[provider_id]"}'
Refresh OAuth Tokens
bench --site [site] execute smm.libs.x.refresh_access_token --kwargs '{"name":"[agent_name]"}'
Architecture
Data Flow
Feed Providers → Feeds → Content Mechanisms → Content → Network Activities → Social Platforms
Core Components
- Activity Plans: High-level scheduling strategies
- Network Activities: Individual scheduled posts with content
- Content Mechanisms: AI generation rule engines
- Agents: Social media account abstractions
- Feed Providers: Content source configurations
Scheduled Tasks
The system runs automated tasks: - Token refresh for all agents - Feed fetching based on intervals - Activity plan processing - Content generation - Activity casting (posting)
API Integration
OpenAI
- GPT-4 Turbo for text generation
- DALL-E 3 for image creation
- Function calling for structured output
- Automatic image format conversion
X/Twitter
- Dual OAuth support (1.0a for media, 2.0 for posting)
- Chunked media upload for large files
- Thread management and reply handling
- Profile synchronization
Telegram Bot
- Message posting with formatting
- Media group support for multiple images
- Bot token authentication
Security
- OAuth token encryption via Frappe password fields
- State verification for authorization flows
- Secure file handling with randomized names
- API credential isolation per environment
Development
File Structure
smm/libs/: Core business logic modulessmm/tasks/: Background scheduled taskssmm/smm/doctype/: Frappe doctype definitionssmm/templates/: UI templates
Testing
Use the debug commands in DEBUG.txt for manual testing of specific components.
License
MIT License - see LICENSE file for details.
Contributing
This project follows Frappe development conventions. Please ensure all changes are compatible with the Frappe framework and maintain backward compatibility.
Related Integrations apps for Frappe & ERPNext
- Insights — Open Source Business Intelligence Tool
- Raven — Simple, open source team messaging platform
- Frappe Whatsapp — WhatsApp cloud integration for frappe
- Frappe Assistant Core — Infrastructure that connects LLMs to ERPNext. Frappe Assistant Core works with the Model Context Protocol (MCP) to expose ERPNext functionality to any compatible Language Model
- Biometric Attendance Sync Tool — A simple tool for syncing Biometric Attendance data with your ERPNext server
- Frappe React Sdk — React hooks for Frappe
- Frappe Js Sdk — TypeScript/JavaScript library for Frappe REST API
- Mcp — Frappe MCP allows Frappe apps to function as MCP servers