This is a submission for the Postmark Challenge: Inbox Innovators.
What I Built
PostContent is an intelligent automation platform that transforms your email client into a social media command center. We built it to solve the time-consuming problem of creating and scheduling content across different social networks.
Simply send an email with a topic or idea, and our AI system automatically:
- Plans a Strategy: Decides the best way to post your content on platforms like X and LinkedIn.
- Generates Content: Writes engaging posts tailored to each platform's style and can even create relevant AI images to go with them.
- Matches Your Voice: Analyzes your existing social media profiles to learn and replicate your unique tone, making the content sound genuinely yours.
- Schedules & Posts: Automatically queues the content for publishing at the right time.
- The result is a seamless workflow that takes you from a simple idea in your inbox to a series of fully-formed, scheduled posts, saving you hours of manual work.
Demo
Code Repository
Due to API limitations, I'm unable to share a live link at the moment.
How I Built It
Our development process focused on creating a robust, asynchronous pipeline that could translate a simple email into a complex set of actions. The architecture is built on a modern, decoupled stack, ensuring each part of the system is scalable and maintainable.
Core Technical Workflow:
The journey from an idea in an email to a live social media post involves a seamless, multi-stage process orchestrated by a series of intelligent, interconnected services.
1. The Email Trigger: Your Command Center
The entire workflow is initiated with a simple action: sending an email.
A user composes an email to a dedicated address (cms@postcontent.xyz
). This email is not just a message; it's a command. The subject and body of the email contain the raw instructions for the content to be created. This can be as simple as "post about our new product tomorrow" or as detailed as a multi-paragraph brief for a series of posts.
2. Intelligent Task Planning: The AI Planner Agent
Once the email is sent, it is received by our system, and the AI Planner Agent takes center stage. This is where the magic begins.
-
Natural Language Understanding (NLU): The agent, powered by a state-of-the-art Large Language Model (LLM), reads and interprets the email. It's not just looking for keywords; it's understanding intent. The agent deconstructs the user's request to determine:
- The core message of the post (
content_brief
). - The desired schedule (e.g., "tomorrow at 4pm," "next Tuesday," "in two hours").
- The target social media platforms (e.g., X, LinkedIn).
- Any special instructions, such as a request for an image.
- The core message of the post (
Structured Output: The agent transforms the unstructured text of the email into a structured plan, including a precise, machine-readable timestamp (in UTC) for scheduling.
3. AI-Powered Image Generation: Crafting the Visuals
If the user's email includes a request for a visual (e.g., "...and generate an image of a futuristic city"), the workflow enters a specialized image generation phase.
- Prompt Engineering: A simple request is not enough to create a stunning image. Our system uses a second LLM dedicated to "prompt engineering." It takes the user's basic idea and elaborates on it, creating a detailed, descriptive prompt that is optimized for a text-to-image model like DALL-E 3.
- Image Creation: This detailed prompt is then sent to our image generation service, which creates a high-quality, original image tailored to the user's request. This image is saved and linked to the content plan.
4. Persona-Driven Content Crafting: The Voice of Your Brand
One of the most powerful features of our platform is the ability to maintain distinct personas for different social media channels. A user can define a professional, formal persona for LinkedIn and a witty, casual persona for X.
- Persona-Driven Adaptation: The system fetches the relevant, pre-defined persona for each target platform.
-
Tailored Content Generation: A third LLM, a specialized content generator, is then invoked. It takes the original
content_brief
and the platform-specific persona and crafts a unique piece of content. The same core idea is expressed in a tone, style, and format that is perfectly suited for the intended audience of each platform, complete with relevant hashtags.
5. Automated Scheduling and Publishing: The Final Mile
With the content and visuals created, the final step is to schedule and publish.
- Database Entry: The complete post—including the tailored text, the generated image path, the UTC schedule time, and target platform—is saved as a 'scheduled' item in our database.
- The Scheduler: A dedicated scheduling service runs continuously, checking the database every minute for posts that are due to be published.
- Secure Publishing: When a post's scheduled time arrives, the scheduler securely connects to the target social media platform using the user's pre-authorized credentials, automatically refreshing authentication tokens to ensure a reliable connection. It then publishes the content, including uploading any media.
- Confirmation: Once posted, the item is marked as 'posted' in the database, completing the workflow.
Key Features
This workflow is built on a foundation of several powerful, cutting-edge features:
- Natural Language Interface: Users interact with the system using plain English in an email, the most intuitive interface of all.
- Multi-Persona Management: Maintain a consistent and appropriate brand voice across all social media channels.
- Context-Aware Content Generation: Content is not just generated; it is crafted with an awareness of the platform and persona.
- AI-Enhanced Visuals: Go beyond stock photos with unique, AI-generated images that match your content perfectly.
- Robust Scheduling and Authentication: A reliable, automated system ensures your content goes out on time, every time, with secure and persistent connections to your social accounts.
Conclusion
Our workflow represents a paradigm shift in social media management. By seamlessly integrating multiple AI agents for planning, image generation, and persona-driven content creation, we have built a system that is not only powerful and flexible but also incredibly simple to use. It transforms a simple email into a fully-realized, multi-platform social media campaign, empowering our users to focus on their strategy while we handle the execution.
Our Experience with Postmark:
Postmark was the linchpin of our user experience. It allowed us to use email as a natural and powerful interface, saving us the immense effort of building a custom email-parsing engine. By converting inbound emails into clean, reliable JSON, Postmark enabled us to focus our development time on the core AI and application logic. It effectively served as the bridge between our users' simple ideas and our complex backend workflow.
Top comments (0)