AI Agent Audit Articles - Automated Publishing Workflow
2026 Verification Notes
This document describes a powerful, pre-built workflow template. A system-wide scan confirms that the concepts, Artisan commands, and architectural patterns described herein are consistent with the current state of the application.
- Workflow Models: The
WorkflowTemplate,WorkflowTask, and related models exist inapp/Models. - Artisan Commands: The commands mentioned (e.g.,
workflows:list-templates) are consistent with the commands found inapp/Console/Commands. - File Paths: Please note that file paths like
/var/www/admin.ohm.events/...are specific to a production environment. For local development, source markdown files should be referenced from within the project's root directory (e.g.,docs/my-articles/).
Comprehensive workflow template for automatically publishing AI agent audit documentation as optimized WordPress articles with social media distribution.
📋 Overview
This workflow automates the entire process of converting AI agent audit markdown files into high-quality WordPress articles with maximum SEO optimization and social media distribution via Postiz.
Key Features
- ⏰ Scheduled Execution: Runs daily at 7 AM GMT+7
- 📁 Automated File Selection: Intelligently selects next MD file to publish
- 📝 MD to WordPress Conversion: Transforms documentation into engaging articles
- 🎨 AI-Generated Images: Creates featured images using Image Studio
- 🔍 SEO Optimization: Achieves 90+ Rank Math SEO score
- 📱 Social Media Distribution: Posts to all connected platforms via Postiz
- ⚙️ Fully Customizable: Every node has detailed configuration options
Workflow Duration
- Total Duration: 11 days (one article per day)
- Articles: 10 AI agent audit MD files
- Execution Time: 5-8 minutes per article
- Schedule: Every day at 7:00 AM Bangkok time (GMT+7)
🚀 Quick Start
1. Install the Workflow Template
php artisan db:seed --class=AiAgentAuditWorkflowSeeder2. Verify Template Installation
php artisan workflows:list-templates
# Should show: "AI Agent Audit Articles - Daily Publishing"3. Create Workflow from Template
Via UI:
- Navigate to Workflows → Templates
- Find "AI Agent Audit Articles - Daily Publishing"
- Click "Create Workflow"
- Customize settings (or use defaults)
- Save and activate
Via Artisan Command:
php artisan workflows:create-from-template \
--template="AI Agent Audit Articles - Daily Publishing" \
--name="My AI Agent Blog Series" \
--activate4. Verify Required MCP Servers
php artisan test:mcp-serversRequired MCP Servers:
- ✅ WordPress MCP
- ✅ SEO MCP (Rank Math)
- ✅ Postiz MCP
- ✅ Image Studio
📊 Workflow Architecture
Node Overview
graph LR
A[⏰ Daily Trigger] --> B[📁 Select MD File]
B --> C[📝 Convert to Article]
C --> D[🎨 Generate Image]
D --> E[📰 Publish to WordPress]
E --> F[🔍 Check SEO Score]
F --> G{Score >= 90?}
G -->|No| H[⚡ Optimize SEO]
G -->|Yes| I[📱 Publish to Social]
H --> I
I --> J[✅ Complete]Detailed Node Breakdown
| Node | Agent | Provider | Purpose | Customizable |
|---|---|---|---|---|
| Daily Trigger | System | - | Schedule execution at 7 AM GMT+7 | Time, timezone |
| Select MD File | Muse Mode | ShareAI | Choose next agent file to publish | Folder, pattern, strategy |
| Convert to Article | Marketing | ShareAI | Transform MD to engaging WordPress content | Tone, length, style |
| Generate Image | Marketing | ShareAI | Create featured image with Image Studio | Profile, format, dimensions |
| Publish to WordPress | WordPress | ShareAI | Publish article with categories and tags | Status, categories, author |
| Check SEO Score | SEO | ShareAI | Analyze Rank Math SEO score | Target score, factors |
| Optimize SEO | SEO | ShareAI | Improve SEO to 90+ score | Max attempts, priorities |
| Publish to Social | Marketing | ShareAI | Distribute to all social platforms | Platforms, timing, copy |
| Complete | System | - | Log results and send notifications | Notification channels |
⚙️ Configuration Guide
Global Settings
Schedule Configuration:
'config' => [
'schedule' => '0 7 * * *', // Daily at 7 AM
'timezone' => 'Asia/Bangkok', // GMT+7
'enabled' => true,
]Common Schedule Examples:
0 6 * * *- 6 AM daily0 9 * * *- 9 AM daily0 */6 * * *- Every 6 hours0 9 * * 1-5- 9 AM on weekdays only0 10 * * 0- 10 AM on Sundays only
Timezone Options:
America/New_York- EST/EDTEurope/London- GMT/BSTAsia/Tokyo- JSTAustralia/Sydney- AEST/AEDT
Node-Specific Configurations
📁 File Selection Node
Default Settings:
'config' => [
'ai_provider' => 'shareai',
'source_folder' => '/var/www/admin.ohm.events/docs/agents/audit/agents/',
'file_pattern' => '*_AGENT.md',
'selection_strategy' => 'sequential',
]Customization Options:
- Change Source Folder:
'source_folder' => '/path/to/your/markdown/files/',- Custom File Pattern:
'file_pattern' => 'ARTICLE_*.md', // Different naming- Selection Strategies:
'selection_strategy' => 'random', // Random order
'selection_strategy' => 'priority', // Use priority array
'selection_strategy' => 'date_based', // Newest first- Priority-Based Selection:
'file_priority' => [
'MARKETING_AGENT.md',
'SEO_AGENT.md',
'WORDPRESS_AGENT.md',
// ... custom order
]📝 Article Conversion Node
Default Settings:
'config' => [
'ai_provider' => 'shareai',
'min_word_count' => 1200,
'tone' => 'professional-yet-engaging',
'target_audience' => 'technical users, developers',
]Customization Options:
- Adjust Content Length:
'min_word_count' => 800, // Shorter articles
'max_word_count' => 3000, // Cap length- Change Tone:
'tone' => 'casual', // Friendly and conversational
'tone' => 'authoritative', // Expert and formal
'tone' => 'tutorial', // Educational step-by-step
'tone' => 'executive-summary', // High-level overview- Target Different Audiences:
'target_audience' => 'beginners, non-technical users',
'target_audience' => 'enterprise decision-makers',
'target_audience' => 'developers and engineers',- Content Structure Options:
'include_toc' => true, // Add table of contents
'add_author_bio' => true, // Include author section
'enable_faq_section' => true, // Add FAQ at end
'include_schema_markup' => true, // Structured data🎨 Image Generation Node
Default Settings:
'config' => [
'image_studio_profile' => 'default',
'image_dimensions' => ['width' => 1200, 'height' => 628],
'image_format' => 'wide',
]Customization Options:
- Use Custom Profile:
'image_studio_profile' => 'my_custom_profile',- Different Image Formats:
// Square format (Instagram-friendly)
'image_format' => 'square',
'image_dimensions' => ['width' => 1080, 'height' => 1080],
// Story format (vertical)
'image_format' => 'story',
'image_dimensions' => ['width' => 1080, 'height' => 1920],- Advanced Image Options:
'overlay_opacity' => 0.7, // Background blend
'enable_watermark' => true, // Add brand watermark
'watermark_position' => 'bottom-right',
'font_size_override' => ['title' => 72, 'subtitle' => 36],📰 WordPress Publishing Node
Default Settings:
'config' => [
'post_status' => 'publish',
'categories' => ['AI Agents', 'Documentation'],
'tags' => 'auto-generate',
'enable_comments' => true,
]Customization Options:
- Change Post Status:
'post_status' => 'draft', // Save as draft for review
'post_status' => 'pending', // Pending review
'post_status' => 'private', // Private (hidden)- Custom Categories:
'categories' => ['Technology', 'AI', 'Tutorials'],
'primary_category' => 'Technology', // Main category for SEO- Manual Tags:
'tags' => ['ai', 'automation', 'productivity', 'tech-guide'],- Additional Options:
'author_id' => 5, // Assign to specific user
'post_format' => 'standard', // Or: video, gallery, aside
'scheduled_date' => '+1 day', // Schedule for future
'custom_fields' => [
'estimated_read_time' => 'auto',
'difficulty_level' => 'intermediate',
],🔍 SEO Optimization Node
Default Settings:
'config' => [
'target_seo_score' => 90,
'min_acceptable_score' => 85,
'max_optimization_attempts' => 3,
]Customization Options:
- Adjust SEO Targets:
'target_seo_score' => 95, // Perfectionist mode
'min_acceptable_score' => 80, // Faster publishing- Optimization Priorities:
'optimization_priority' => [
'keyword_density' => 'high',
'readability' => 'high',
'internal_links' => 'medium',
'external_links' => 'low',
],- Skip Optimization:
'skip_optimization' => false, // Set true to skip SEO loop
'publish_immediately' => true, // Bypass checks- Advanced SEO Options:
'enable_seo_report_email' => true,
'seo_report_recipients' => ['[email protected]'],
'custom_seo_checklist' => [
'focus_keyword_in_url' => true,
'focus_keyword_in_h2' => true,
// ... custom requirements
],📱 Social Media Publishing Node
Default Settings:
'config' => [
'platforms' => 'all_connected',
'post_immediately' => true,
'generate_platform_specific_copy' => true,
]Customization Options:
- Select Specific Platforms:
'platforms' => ['facebook', 'twitter', 'linkedin'],
// Available: facebook, instagram, twitter, linkedin, google_business, tiktok, youtube- Schedule Social Posts:
'post_immediately' => false,
'schedule_delay_minutes' => 30, // 30 min after WP publish- Optimal Posting Times:
'optimal_times' => [
'facebook' => '09:00',
'instagram' => '11:00',
'twitter' => '13:00',
'linkedin' => '08:00',
],- Platform-Specific Settings:
'facebook_settings' => [
'post_to_groups' => true,
'group_ids' => ['123456', '789012'],
'enable_boost' => false,
],
'instagram_settings' => [
'post_to_story' => true,
'story_duration_hours' => 24,
],
'twitter_settings' => [
'create_thread' => true,
'thread_tweet_count' => 3,
],- Engagement Tracking:
'engagement_tracking' => true,
'track_metrics' => ['likes', 'shares', 'comments', 'clicks'],
'send_engagement_report' => true,
'report_frequency' => 'daily', // Options: daily, weekly🔧 Advanced Customization
AI Provider Configuration
Change AI Provider for All Nodes:
// In workflow template metadata
'ai_provider_override' => 'gemini', // Options: gemini, groq, anthropic, shareaiPer-Node Provider Override:
'config' => [
'ai_provider' => 'groq', // Fast and cost-effective
'ai_model' => 'llama-3.1-8b-instant',
]Provider Recommendations:
- Gemini: Best balance (default)
- ShareAI: Requested provider, good for complex tasks
- Groq: Fastest, best for simple tasks
- Anthropic: Highest quality, more expensive
Conditional Logic
Add Conditional Connections:
[
'from' => 'check_seo_score',
'to' => 'optimize_seo',
'condition' => 'seo_score < 90',
],
[
'from' => 'check_seo_score',
'to' => 'publish_to_social',
'condition' => 'seo_score >= 90',
],Custom Conditions:
'condition' => 'word_count > 1500 AND seo_score >= 85',
'condition' => 'publish_status == "publish"',
'condition' => 'featured_image_exists == true',Error Handling
Configure Failure Behavior:
'error_handling' => [
'on_failure' => 'continue', // Options: continue, stop, retry
'max_retries' => 2,
'retry_delay_seconds' => 60,
'notify_on_error' => true,
'fallback_action' => 'save_draft', // Save as draft if publish fails
],Notifications
Configure Notifications:
'notifications' => [
'channels' => ['email', 'slack', 'dashboard'],
'email_recipients' => ['[email protected]'],
'slack_webhook' => 'https://hooks.slack.com/...',
'notify_on_success' => true,
'notify_on_error' => true,
'include_summary' => true,
],📈 Monitoring & Analytics
Track Workflow Performance
Enable Analytics:
'analytics' => [
'track_execution_time' => true,
'track_api_costs' => true,
'track_seo_improvements' => true,
'track_social_engagement' => true,
'generate_weekly_report' => true,
],View Workflow Metrics
# View workflow execution history
php artisan workflows:history --workflow="AI Agent Audit Articles"
# Get performance metrics
php artisan workflows:metrics --workflow="AI Agent Audit Articles" --days=30
# Export analytics report
php artisan workflows:export-report --workflow="AI Agent Audit Articles" --format=pdf🐛 Troubleshooting
Common Issues
1. Workflow Not Triggering
Check schedule:
php artisan schedule:listVerify cron is running:
# Check system cron
crontab -l
# Should include:
* * * * * cd /var/www/admin.ohm.events && php artisan schedule:run >> /dev/null 2>&1Test trigger manually:
php artisan workflows:trigger --workflow="AI Agent Audit Articles"2. File Selection Fails
Verify file paths:
ls -la /var/www/admin.ohm.events/docs/agents/audit/agents/Check file permissions:
chmod 644 /var/www/admin.ohm.events/docs/agents/audit/agents/*.mdTest file reading:
php artisan tinker
>>> Storage::get('docs/agents/audit/agents/MARKETING_AGENT.md');3. SEO Optimization Stuck
Check Rank Math plugin:
- WordPress → Plugins → Rank Math is active
- Rank Math API is accessible
Lower target score temporarily:
'target_seo_score' => 85, // Instead of 90Skip optimization:
'skip_optimization' => true,4. Postiz Publishing Fails
Check Postiz credentials:
php artisan tinker
>>> app(PostizIntegrationService::class)->getConnectedPlatforms('tenant_id');Verify platforms connected:
- Navigate to Settings → Social Media
- Ensure platforms are connected and authorized
Test Postiz manually:
php artisan postiz:test-connection --tenant=brand_id📚 Related Documentation
💡 Tips & Best Practices
Content Quality
- Review first few articles manually to ensure quality
- Adjust tone and style based on audience feedback
- Monitor engagement metrics to optimize future content
SEO Strategy
- Research keywords before starting workflow
- Build internal linking structure as articles accumulate
- Update older articles with links to newer ones
Social Media
- Monitor social engagement in first hour
- Respond to comments quickly
- Experiment with posting times for your audience
Workflow Optimization
- Start with conservative settings (draft mode)
- Gradually increase automation (auto-publish)
- A/B test different configurations
- Track which agents/providers perform best
🚀 Next Steps
- Install the template (see Quick Start)
- Customize settings for your needs
- Test with one article manually
- Activate daily schedule
- Monitor first week of executions
- Optimize based on results
- Create custom variations for other content
📧 Support
For issues or questions:
- Check troubleshooting section
- Review workflow documentation
- Check logs:
storage/logs/workflow-*.log - Contact support with workflow execution ID
Last Updated: January 2, 2026Template Version: 1.0