# Social Media AI Generator Setup Guide ## Overview The Social Media AI Generator creates stunning 3D social media posts with AI-generated images, captions, and hashtags. This guide explains how to configure email notifications for post approval. ## Email Notification Configuration ### Option 1: Specific Social Media Reviewers (Recommended) Set the `SOCIAL_MEDIA_REVIEWERS` environment variable to specify who should receive email notifications when new posts are generated. ```bash # In your .env file or environment variables SOCIAL_MEDIA_REVIEWERS=marketing@company.com,social@company.com,manager@company.com ``` **Benefits:** - Dedicated reviewers get notified - Centralized approval process - Can include external marketing team members - Consistent review workflow ### Option 2: Organization Admin Users (Fallback) If `SOCIAL_MEDIA_REVIEWERS` is not set, the system will automatically send notifications to admin users within each organization. **How it works:** - System finds users with admin/manager permissions in each organization - Sends notifications to their email addresses - Automatic per-organization targeting ## Email Notification Details ### When emails are sent: - Daily at 9 AM when new posts are generated - Only sent if posts were successfully created - One email per recipient per organization ### Email content includes: - Organization name - Number of posts generated - Direct link to review interface - Summary of what was created (images, captions, hashtags) ### Review interface: - Access via: `https://scoutlysnap.com/static/admin/#social-media` - View all pending posts - Approve/reject with optional edits - Download images and copy text - Schedule posts for optimal times ## Configuration Examples ### Single reviewer: ```bash SOCIAL_MEDIA_REVIEWERS=marketing@company.com ``` ### Multiple reviewers: ```bash SOCIAL_MEDIA_REVIEWERS=marketing@company.com,social@company.com,ceo@company.com ``` ### Department-based: ```bash SOCIAL_MEDIA_REVIEWERS=marketing-team@company.com,brand-manager@company.com ``` ## Approval Workflow 1. **Generation**: AI creates posts daily at 9 AM 2. **Notification**: Reviewers receive email alerts 3. **Review**: Reviewers access admin interface 4. **Approval**: Posts are approved/rejected/edited 5. **Publishing**: Approved posts can be downloaded and shared ## API Endpoints for Custom Integration If you want to build custom approval interfaces: - `GET /api/social-posts` - List pending posts - `GET /api/social-posts/{id}` - Get specific post details - `POST /api/social-posts/{id}/approve` - Approve/reject posts - `DELETE /api/social-posts/{id}` - Delete posts ## Troubleshooting ### No emails received: 1. Check `SOCIAL_MEDIA_REVIEWERS` is set correctly 2. Verify email addresses are valid 3. Check spam/junk folders 4. Ensure SendGrid is configured properly ### No posts generated: 1. Check organizations have active users with AI settings enabled 2. Verify Gemini API key is configured 3. Check scheduler logs for errors 4. Ensure database migration was successful ### Access issues: 1. Verify users have admin permissions 2. Check organization membership 3. Ensure authentication tokens are valid ## Security Notes - Only admin users can approve/reject posts - Posts are organization-scoped (users only see their org's posts) - Email notifications respect organization boundaries - All API endpoints require authentication ## Support For technical support or configuration help, contact: support@scoutlysnap.com