The LinkedIn AI Auto Poster is an intelligent, AI-driven solution designed to automate the creation and publishing of engaging LinkedIn content. Leveraging cutting-edge Azure OpenAI technology, this application streamlines content generation and ensures consistent, high-quality posting directly to LinkedIn. Ideal for professionals looking to enhance their digital presence effortlessly, this automated system saves significant time while maintaining active audience engagement.
- AI-Enhanced Daily Automation: Automatically executes daily at 9 AM, handling content creation and posting seamlessly.
- Dynamic AI Topic Generation: Utilizes Azure OpenAI to craft unique and relevant topics, intelligently avoiding repetition.
- Automated Content Creation: Produces captivating LinkedIn posts with advanced AI-generated insights.
- DALL-E 3 Image Generation: Creates professional, engaging images for each post to boost engagement and visibility.
- Direct LinkedIn Integration: Publishes AI-crafted content with images directly to your LinkedIn profile or page.
- Efficient Data Storage: Archives generated posts, images, and metadata in Azure Cosmos DB for future reference and analysis.
The solution leverages these Azure services:
- Azure Functions: Scheduled timer-triggered functions manage daily automation.
- Azure OpenAI: Provides generative AI capabilities for topic and content creation.
- Azure Cosmos DB: Securely stores generated posts, ensuring data persistence and easy retrieval.
- Azure Blob Storage: Stores generated images before posting.
- Azure Key Vault: Securely manages API keys and connection strings.
linkedin_ai_auto_poster/
├── host.json
├── local.settings.json
├── package.json
├── tsconfig.json
├── src/
│ ├── index.ts
│ ├── constants/
│ ├── flow/
│ │ └── linkedin_post_flow.ts
│ ├── functions/
│ │ ├── auto_post.ts
│ │ ├── test_linkedin_post.ts
│ │ └── test_image_generation.ts
│ ├── prompts/
│ │ ├── generate_linkedin_post_derek_huynen.md
│ │ ├── generate_topic_derek_huynen.md
│ │ └── generate_linkedin_image_prompt.md
│ ├── service/
│ │ ├── CosmosService.ts
│ │ ├── LinkedinService.ts
│ │ ├── MdService.ts
│ │ └── OpenAiService.ts
│ └── types/
│ └── Post.ts
├── scripts/
│ ├── deploy-infra.sh
│ └── publishProfile.publishsettings
├── ReadMe.md
linkedin_post_flow.ts: Coordinates the intelligent AI-driven workflow.auto_post.ts: Azure Function scheduled trigger implementation.CosmosService.ts: Manages database interactions.LinkedinService.ts: Handles LinkedIn API interactions.OpenAiService.ts: Facilitates content and topic generation using Azure OpenAI.
-
Clone & Navigate:
git clone <repository-url> cd linkedin_ai_auto_poster
-
Install Dependencies:
npm install
-
Configure Variables: Set your environment variables in
local.settings.json. -
Local Execution: Run locally with Azure Functions Core Tools:
func start
-
Test Image Generation: Test the DALL-E 3 image generation feature:
.\scripts\test_dalle3.ps1
-
Deploy to Azure:
func azure functionapp publish <function-app-name>
- Main Guide: ReadMe.md - Overview and main documentation
- Environment Variables: ENVIRONMENT_VARIABLES.md - Configuration settings
- Image Generation Guide: IMAGE_GENERATION_GUIDE.md - Using the image generation feature
- DALL-E 3 Testing: DALLE3_TESTING.md - Testing the DALL-E 3 integration
- Customizing Images: CUSTOMIZE_DALLE3_IMAGES.md - Tailoring image generation
- Sample Prompts: SAMPLE_IMAGE_PROMPTS.md - Example prompts for reference
- Create resources via Azure Portal to host and manage your AI models.
- Deploy your chosen OpenAI model and note endpoint and API details.
-
LinkedIn Developer Project:
- Visit LinkedIn Developers to create and configure your app.
-
Generate OAuth Token:
- Obtain access tokens via LinkedIn’s OAuth tools.
-
Retrieve LinkedIn URN:
- Use the LinkedIn API:
GET https://api.linkedin.com/v2/userinfo
- Pass the
Authorization: Bearer <access_token>header to get your member URN.
- Pass the
- Use the LinkedIn API:
-
Secure Credentials:
- Save tokens securely in your environment variables.
-
Create Cosmos DB Instance:
- Set up Cosmos DB on Azure Portal and define the data model (
src/types/Post.ts).
- Set up Cosmos DB on Azure Portal and define the data model (
-
Configure Credentials:
- Store DB credentials in environment variables.
- Security: Utilize Azure Key Vault for managing sensitive credentials.
- Robust Error Handling: Implement retries with exponential backoff.
- Optimized Performance: Enhance query performance and use caching where feasible.
- Comprehensive Logging: Enable detailed logs for monitoring and troubleshooting.
- Multi-platform social media support
- Web dashboard for managing content
- Advanced analytics integration for detailed performance tracking