claude-plugin-wordpress-manager 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/.claude-plugin/plugin.json +8 -3
  2. package/CHANGELOG.md +25 -0
  3. package/agents/wp-distribution-manager.md +98 -0
  4. package/docs/GUIDE.md +126 -10
  5. package/docs/plans/2026-03-01-tier3-wcop-design.md +373 -0
  6. package/docs/plans/2026-03-01-tier3-wcop-implementation.md +915 -0
  7. package/hooks/hooks.json +18 -0
  8. package/package.json +9 -3
  9. package/servers/wp-rest-bridge/build/tools/buffer.d.ts +3 -0
  10. package/servers/wp-rest-bridge/build/tools/buffer.js +205 -0
  11. package/servers/wp-rest-bridge/build/tools/index.js +9 -0
  12. package/servers/wp-rest-bridge/build/tools/mailchimp.d.ts +3 -0
  13. package/servers/wp-rest-bridge/build/tools/mailchimp.js +265 -0
  14. package/servers/wp-rest-bridge/build/tools/sendgrid.d.ts +3 -0
  15. package/servers/wp-rest-bridge/build/tools/sendgrid.js +255 -0
  16. package/servers/wp-rest-bridge/build/types.d.ts +122 -0
  17. package/servers/wp-rest-bridge/build/wordpress.d.ts +9 -0
  18. package/servers/wp-rest-bridge/build/wordpress.js +112 -0
  19. package/skills/wordpress-router/references/decision-tree.md +4 -2
  20. package/skills/wp-content/SKILL.md +1 -0
  21. package/skills/wp-content-repurposing/SKILL.md +1 -0
  22. package/skills/wp-social-email/SKILL.md +152 -0
  23. package/skills/wp-social-email/references/audience-segmentation.md +173 -0
  24. package/skills/wp-social-email/references/buffer-social-publishing.md +124 -0
  25. package/skills/wp-social-email/references/content-to-distribution.md +156 -0
  26. package/skills/wp-social-email/references/distribution-analytics.md +208 -0
  27. package/skills/wp-social-email/references/mailchimp-integration.md +145 -0
  28. package/skills/wp-social-email/references/sendgrid-transactional.md +165 -0
  29. package/skills/wp-social-email/scripts/distribution_inspect.mjs +165 -0
  30. package/skills/wp-webhooks/SKILL.md +1 -0
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: wp-social-email
3
+ description: This skill should be used when the user asks to "publish to social media",
4
+ "schedule social posts", "send email campaign", "Mailchimp integration",
5
+ "Buffer scheduling", "SendGrid email", "content distribution",
6
+ "newsletter campaign", "email marketing", "social media management",
7
+ "distribute content", or mentions publishing WordPress content to social
8
+ and email channels.
9
+ version: 1.0.0
10
+ ---
11
+
12
+ # WordPress Social & Email Distribution Skill
13
+
14
+ ## Overview
15
+
16
+ Social and email distribution connects WordPress content to external marketing channels via three services: Mailchimp (email campaigns and audience management), Buffer (social media scheduling and publishing), and SendGrid (transactional email delivery). The WP REST Bridge provides 18 MCP tools across these services, enabling content distribution workflows directly from the WordPress authoring environment.
17
+
18
+ ## When to Use
19
+
20
+ - User wants to send a newsletter or email campaign from WordPress content
21
+ - User needs to schedule social media posts when a blog post is published
22
+ - User asks about Mailchimp audience management or subscriber lists
23
+ - User wants to connect Buffer for social media scheduling
24
+ - User needs transactional email delivery via SendGrid (welcome emails, confirmations)
25
+ - User asks about content distribution pipelines (blog → social → email)
26
+ - User wants to segment audiences for targeted campaigns
27
+ - User needs analytics on email open rates, click rates, or social engagement
28
+
29
+ ## Decision Tree
30
+
31
+ 1. **What channel or service?**
32
+ - "Mailchimp" / "audience" / "email campaign" / "newsletter" → Mailchimp integration (Section 1)
33
+ - "Buffer" / "social post" / "schedule tweet" / "social media" → Buffer social publishing (Section 2)
34
+ - "SendGrid" / "transactional email" / "email delivery" → SendGrid transactional (Section 3)
35
+ - "distribute content" / "blog to social" / "content pipeline" → Content-to-distribution workflow (Section 4)
36
+ - "audience segment" / "targeting" / "list management" → Audience segmentation (Section 5)
37
+ - "email analytics" / "open rate" / "click rate" / "campaign report" → Distribution analytics (Section 6)
38
+
39
+ 2. **Run detection first:**
40
+ ```bash
41
+ node skills/wp-social-email/scripts/distribution_inspect.mjs [--cwd=/path/to/project]
42
+ ```
43
+ This identifies configured distribution services and API credentials.
44
+
45
+ ## Service Overview
46
+
47
+ | Service | Tools | Auth Type | Use Case |
48
+ |---------|-------|-----------|----------|
49
+ | Mailchimp | 7 tools (`mc_*`) | API key | Email campaigns, audience management, subscriber lists |
50
+ | Buffer | 5 tools (`buf_*`) | Access token | Social media scheduling, queue management, analytics |
51
+ | SendGrid | 6 tools (`sg_*`) | API key | Transactional email, templates, contact management |
52
+
53
+ ## Distribution Sections
54
+
55
+ ### Section 1: Mailchimp Integration
56
+ See `references/mailchimp-integration.md`
57
+ - API key setup and WP_SITES_CONFIG configuration
58
+ - Audience management (list, get members, add subscribers)
59
+ - Campaign workflow: create → set content → send → report
60
+ - A/B testing and send time optimization
61
+
62
+ ### Section 2: Buffer Social Publishing
63
+ See `references/buffer-social-publishing.md`
64
+ - Access token setup and WP_SITES_CONFIG configuration
65
+ - Profile management and channel connections
66
+ - Post creation with media attachments and scheduling
67
+ - Queue management and posting analytics
68
+
69
+ ### Section 3: SendGrid Transactional Email
70
+ See `references/sendgrid-transactional.md`
71
+ - API key setup and WP_SITES_CONFIG configuration
72
+ - Transactional email for welcome, password reset, order confirmation
73
+ - Dynamic template management
74
+ - Contact management and email deliverability
75
+
76
+ ### Section 4: Content-to-Distribution Workflow
77
+ See `references/content-to-distribution.md`
78
+ - WordPress-to-channel pipeline (fetch post → format → distribute)
79
+ - Content adaptation per channel (blog → social, blog → newsletter)
80
+ - Scheduling strategies (immediate, drip, evergreen rotation)
81
+ - Multi-channel orchestration
82
+
83
+ ### Section 5: Audience Segmentation
84
+ See `references/audience-segmentation.md`
85
+ - Mailchimp list segmentation strategies
86
+ - SendGrid contact lists and custom fields
87
+ - Buffer profile-based targeting
88
+ - Building audience personas from WordPress user data
89
+
90
+ ### Section 6: Distribution Analytics
91
+ See `references/distribution-analytics.md`
92
+ - Mailchimp campaign reports (open rate, click rate, bounces)
93
+ - Buffer analytics (reach, engagement, clicks)
94
+ - SendGrid stats (deliverability, opens, clicks)
95
+ - Cross-channel performance comparison and KPIs
96
+
97
+ ## Reference Files
98
+
99
+ | File | Content |
100
+ |------|---------|
101
+ | `references/mailchimp-integration.md` | API setup, audiences, campaigns, A/B testing |
102
+ | `references/buffer-social-publishing.md` | Access token, profiles, posts, queue management |
103
+ | `references/sendgrid-transactional.md` | API setup, transactional email, templates, contacts |
104
+ | `references/content-to-distribution.md` | Content pipeline, adaptation, scheduling, multi-channel |
105
+ | `references/audience-segmentation.md` | List segmentation, custom fields, personas |
106
+ | `references/distribution-analytics.md` | Campaign reports, social stats, KPIs, benchmarks |
107
+
108
+ ## MCP Tools
109
+
110
+ ### Mailchimp Tools (7)
111
+
112
+ | Tool | Description |
113
+ |------|-------------|
114
+ | `mc_list_audiences` | List all Mailchimp audiences (lists) with member counts |
115
+ | `mc_get_audience_members` | Get subscribers for a specific audience with pagination |
116
+ | `mc_add_subscriber` | Add or update a subscriber in an audience |
117
+ | `mc_create_campaign` | Create a new email campaign (regular, plaintext, A/B test) |
118
+ | `mc_set_campaign_content` | Set the HTML or template content for a campaign |
119
+ | `mc_send_campaign` | Send or schedule a campaign for delivery |
120
+ | `mc_get_campaign_report` | Get campaign performance metrics (opens, clicks, bounces) |
121
+
122
+ ### Buffer Tools (5)
123
+
124
+ | Tool | Description |
125
+ |------|-------------|
126
+ | `buf_list_profiles` | List connected social media profiles (Twitter, Facebook, LinkedIn, etc.) |
127
+ | `buf_create_update` | Create a social media post with text, media, and optional schedule time |
128
+ | `buf_list_pending` | List posts in the Buffer queue awaiting publication |
129
+ | `buf_list_sent` | List previously published posts with engagement data |
130
+ | `buf_get_analytics` | Get analytics for a profile (reach, engagement, clicks) |
131
+
132
+ ### SendGrid Tools (6)
133
+
134
+ | Tool | Description |
135
+ |------|-------------|
136
+ | `sg_send_email` | Send a transactional email (plain, HTML, or template-based) |
137
+ | `sg_list_templates` | List available dynamic email templates |
138
+ | `sg_get_template` | Get template details including version and HTML content |
139
+ | `sg_list_contacts` | List contacts with optional search and filtering |
140
+ | `sg_add_contacts` | Add or update contacts with custom fields |
141
+ | `sg_get_stats` | Get email statistics (deliveries, opens, clicks, bounces) |
142
+
143
+ ## Recommended Agent
144
+
145
+ Use the **`wp-distribution-manager`** agent for complex multi-channel distribution workflows that span multiple services or require coordinated content adaptation.
146
+
147
+ ## Related Skills
148
+
149
+ - **`wp-content-repurposing`** — transform content formats before distribution
150
+ - **`wp-webhooks`** — trigger distribution on WordPress events (publish, update)
151
+ - **`wp-content`** — create and manage WordPress content for distribution
152
+ - **`wp-content-attribution`** — track content sources and attribution across channels
@@ -0,0 +1,173 @@
1
+ # Audience Segmentation
2
+
3
+ ## Overview
4
+
5
+ Audience segmentation divides your subscriber base into targeted groups for more relevant messaging. Effective segmentation improves open rates, click rates, and reduces unsubscribes. This reference covers segmentation strategies across Mailchimp, SendGrid, and Buffer.
6
+
7
+ ## Mailchimp List Segmentation
8
+
9
+ ### Segment by subscriber data
10
+
11
+ Mailchimp segments are dynamic filters applied to an audience. Subscribers matching the criteria are automatically included.
12
+
13
+ ```
14
+ Tool: mc_get_audience_members
15
+ Params:
16
+ audience_id: "abc123def4"
17
+ status: "subscribed"
18
+ # Filter by merge fields, tags, or activity in the Mailchimp UI
19
+ ```
20
+
21
+ ### Tag-based segmentation
22
+
23
+ Tags are the most flexible segmentation method via the API:
24
+
25
+ ```
26
+ Tool: mc_add_subscriber
27
+ Params:
28
+ audience_id: "abc123def4"
29
+ email: "user@example.com"
30
+ tags: ["wordpress-user", "product-interest-seo", "signup-2026-q1"]
31
+ ```
32
+
33
+ ### Common Mailchimp segments
34
+
35
+ | Segment | Criteria | Use Case |
36
+ |---------|----------|----------|
37
+ | New subscribers | Signup date < 30 days | Welcome series, onboarding |
38
+ | Engaged readers | Opened last 3 campaigns | Premium content, surveys |
39
+ | Inactive | Not opened in 90 days | Re-engagement campaign |
40
+ | Product interest | Tagged by category | Targeted product launches |
41
+ | High-value | Purchase history > $100 | VIP offers, early access |
42
+ | Location-based | Merge field `COUNTRY` | Localized content, events |
43
+
44
+ ### Merge fields for segmentation
45
+
46
+ Define custom merge fields to capture WordPress user data:
47
+
48
+ | Merge Tag | Type | WordPress Source |
49
+ |-----------|------|-----------------|
50
+ | `FNAME` | Text | `user.first_name` |
51
+ | `LNAME` | Text | `user.last_name` |
52
+ | `WP_ROLE` | Text | `user.role` (subscriber, customer, etc.) |
53
+ | `SIGNUP_SRC` | Text | Registration source (blog, checkout, popup) |
54
+ | `LAST_ORDER` | Date | Most recent WooCommerce order date |
55
+ | `ORDER_TOTAL` | Number | Lifetime order value |
56
+
57
+ ## SendGrid Contact Segmentation
58
+
59
+ ### Contact lists
60
+
61
+ SendGrid uses contact lists for static segmentation:
62
+
63
+ ```
64
+ Tool: sg_add_contacts
65
+ Params:
66
+ list_ids: ["list_new_users", "list_blog_subscribers"]
67
+ contacts:
68
+ - email: "user@example.com"
69
+ first_name: "Jane"
70
+ custom_fields:
71
+ signup_source: "blog_popup"
72
+ wp_user_id: "42"
73
+ ```
74
+
75
+ ### Custom fields
76
+
77
+ Define custom fields in SendGrid to mirror WordPress user data:
78
+
79
+ | Field Name | Type | Purpose |
80
+ |------------|------|---------|
81
+ | `wp_user_id` | Number | Link to WordPress user record |
82
+ | `signup_source` | Text | Track acquisition channel |
83
+ | `user_role` | Text | WordPress role for permission-based content |
84
+ | `last_purchase_date` | Date | Trigger post-purchase sequences |
85
+ | `content_preference` | Text | Category interest for targeted notifications |
86
+
87
+ ### SGQL queries for segmentation
88
+
89
+ ```
90
+ Tool: sg_list_contacts
91
+ Params:
92
+ query: "signup_source = 'blog_popup' AND last_purchase_date IS NULL"
93
+ ```
94
+
95
+ Common SGQL patterns:
96
+
97
+ | Query | Segment |
98
+ |-------|---------|
99
+ | `signup_source = 'checkout'` | Customers who bought |
100
+ | `last_purchase_date < '2026-01-01'` | Lapsed customers |
101
+ | `user_role = 'subscriber'` | Blog-only subscribers |
102
+ | `content_preference = 'tutorials'` | Tutorial readers |
103
+
104
+ ## Buffer Profile-Based Targeting
105
+
106
+ Buffer segments audiences by social profile rather than individual users. Each profile reaches a different audience.
107
+
108
+ ### Profile selection strategy
109
+
110
+ | Profile | Audience Type | Content Style |
111
+ |---------|--------------|---------------|
112
+ | Twitter/X | Tech-savvy, real-time | Short, punchy, hashtags |
113
+ | LinkedIn | Professional, B2B | Thought leadership, data-driven |
114
+ | Facebook | Broad, community | Storytelling, engagement prompts |
115
+ | Instagram | Visual-first, younger | Image-heavy, lifestyle |
116
+
117
+ ### Targeting by profile
118
+
119
+ ```
120
+ Tool: buf_create_update
121
+ Params:
122
+ profile_ids: ["linkedin_id"] # Only post to LinkedIn for B2B content
123
+ text: "Our latest research on WordPress performance..."
124
+ ```
125
+
126
+ Select profiles based on content type:
127
+ - **Product launches**: All profiles
128
+ - **Technical tutorials**: Twitter + LinkedIn
129
+ - **Behind-the-scenes**: Instagram + Facebook
130
+ - **Industry news**: Twitter + LinkedIn
131
+
132
+ ## Building Personas from WordPress Data
133
+
134
+ ### Data sources for persona building
135
+
136
+ | Source | Data | Tool |
137
+ |--------|------|------|
138
+ | WordPress users | Role, registration date, profile fields | `wp_list_users` |
139
+ | WooCommerce orders | Purchase history, AOV, frequency | `wc_list_orders` |
140
+ | Post analytics | Most-read categories, time on page | Site analytics |
141
+ | Form submissions | Stated interests, preferences | Contact form data |
142
+
143
+ ### Persona-to-segment mapping
144
+
145
+ | Persona | Characteristics | Mailchimp Tags | SendGrid Lists |
146
+ |---------|----------------|----------------|----------------|
147
+ | New Visitor | First 30 days, no purchase | `new-visitor` | `list_onboarding` |
148
+ | Blog Reader | Regular reader, no purchase | `blog-reader`, category tags | `list_blog` |
149
+ | First Buyer | 1 order, < $50 | `first-buyer` | `list_customers` |
150
+ | Loyal Customer | 3+ orders, > $200 | `loyal-customer`, `vip` | `list_vip` |
151
+ | Churning | No activity 60+ days | `at-risk` | `list_reengagement` |
152
+
153
+ ### Sync WordPress users to segments
154
+
155
+ Workflow to keep segments current:
156
+
157
+ ```
158
+ 1. wp_list_users → fetch all users with roles and metadata
159
+ 2. For each user, determine persona based on rules
160
+ 3. mc_add_subscriber → set tags matching persona
161
+ 4. sg_add_contacts → add to appropriate contact lists
162
+ 5. Schedule weekly sync to update segment membership
163
+ ```
164
+
165
+ ## Best Practices
166
+
167
+ - **Start simple**: Begin with 3-4 segments (new, active, inactive, customer); add granularity as data grows
168
+ - **Dynamic over static**: Prefer Mailchimp tag-based segments that update automatically over manually managed lists
169
+ - **Consistent field naming**: Use the same custom field names across Mailchimp and SendGrid for easier cross-channel management
170
+ - **Hygiene**: Remove hard bounces and unsubscribes from all platforms; sync removals across services
171
+ - **Privacy compliance**: Honor opt-out preferences across all channels; never re-add unsubscribed contacts
172
+ - **Test segments**: Before sending a campaign to a new segment, verify member count and sample members for accuracy
173
+ - **Document segments**: Maintain a segment registry with criteria, purpose, and last review date
@@ -0,0 +1,124 @@
1
+ # Buffer Social Publishing
2
+
3
+ ## Overview
4
+
5
+ Buffer is a social media scheduling platform that manages posting across Twitter/X, Facebook, Instagram, LinkedIn, and other channels. The WP REST Bridge provides 5 MCP tools (`buf_*`) for creating posts, managing queues, and retrieving analytics.
6
+
7
+ ## Setup
8
+
9
+ ### Access Token Configuration
10
+
11
+ Add Buffer credentials to `WP_SITES_CONFIG`:
12
+
13
+ ```json
14
+ {
15
+ "sites": [{
16
+ "name": "my-site",
17
+ "url": "https://example.com",
18
+ "distribution": {
19
+ "buffer": {
20
+ "access_token": "1/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
21
+ }
22
+ }
23
+ }]
24
+ }
25
+ ```
26
+
27
+ Obtain the access token from Buffer's developer portal (Settings → Apps → Access Token).
28
+
29
+ ## Profile Management
30
+
31
+ ### List connected profiles
32
+
33
+ ```
34
+ Tool: buf_list_profiles
35
+ Returns: Array of profiles with id, service (twitter, facebook, etc.),
36
+ formatted_username, avatar, schedules, counts
37
+ ```
38
+
39
+ Each profile represents a connected social account. A single Buffer account may have multiple profiles (e.g., @company on Twitter + Company Page on Facebook).
40
+
41
+ ## Post Creation
42
+
43
+ ### Create a social post
44
+
45
+ ```
46
+ Tool: buf_create_update
47
+ Params:
48
+ profile_ids: ["profile_abc123"]
49
+ text: "New blog post: 10 Tips for Better SEO — Read more at https://example.com/seo-tips"
50
+ scheduled_at: "2026-03-15T14:00:00Z" # Optional: omit for immediate queue
51
+ ```
52
+
53
+ ### Create a post with media
54
+
55
+ ```
56
+ Tool: buf_create_update
57
+ Params:
58
+ profile_ids: ["profile_abc123", "profile_def456"]
59
+ text: "Check out our latest product launch!"
60
+ media:
61
+ photo: "https://example.com/wp-content/uploads/2026/03/product-launch.jpg"
62
+ thumbnail: "https://example.com/wp-content/uploads/2026/03/product-launch-thumb.jpg"
63
+ ```
64
+
65
+ ### Post to multiple profiles
66
+
67
+ Pass an array of `profile_ids` to publish the same content across channels simultaneously. Buffer adapts character limits per platform.
68
+
69
+ ```
70
+ Tool: buf_create_update
71
+ Params:
72
+ profile_ids: ["twitter_id", "facebook_id", "linkedin_id"]
73
+ text: "We just published a comprehensive guide to WordPress performance optimization."
74
+ ```
75
+
76
+ ## Queue Management
77
+
78
+ ### List pending posts
79
+
80
+ ```
81
+ Tool: buf_list_pending
82
+ Params:
83
+ profile_id: "profile_abc123"
84
+ Returns: Array of queued posts with id, text, scheduled_at, media
85
+ ```
86
+
87
+ ### List sent posts
88
+
89
+ ```
90
+ Tool: buf_list_sent
91
+ Params:
92
+ profile_id: "profile_abc123"
93
+ count: 20
94
+ page: 1
95
+ Returns: Array of published posts with engagement metrics
96
+ ```
97
+
98
+ ## WordPress-to-Buffer Workflow
99
+
100
+ Typical flow for distributing a WordPress post to social media:
101
+
102
+ 1. **Fetch the post** using `wp_get_post` to get title, excerpt, permalink, featured image
103
+ 2. **Format for social**: Compose text from post title + excerpt (truncated to platform limits)
104
+ 3. **Attach media**: Use the featured image URL as the `media.photo` parameter
105
+ 4. **Schedule**: Set `scheduled_at` for optimal posting time or omit for queue placement
106
+ 5. **Post to profiles**: Select target profiles and call `buf_create_update`
107
+
108
+ ```
109
+ # Example: Blog post → Twitter + LinkedIn
110
+ Step 1: wp_get_post id=42 → { title, excerpt, link, featured_media_url }
111
+ Step 2: Compose text = "📝 {title}\n\n{excerpt}\n\nRead more: {link}"
112
+ Step 3: buf_create_update profile_ids=[twitter, linkedin] text=... media.photo={featured_media_url}
113
+ ```
114
+
115
+ ## Best Practices
116
+
117
+ - **Optimal posting times**: Analyze `buf_get_analytics` to identify when your audience is most active; schedule posts during those windows
118
+ - **Platform-specific formatting**: Twitter has 280 chars; LinkedIn allows 3000; tailor text length per profile rather than using identical copy
119
+ - **Hashtag strategy**: Use 1-2 relevant hashtags on Twitter, 3-5 on LinkedIn; avoid hashtags on Facebook
120
+ - **Image dimensions**: Use 1200x628px for link previews, 1080x1080px for square posts; Buffer will resize but starting with correct dimensions avoids cropping
121
+ - **Queue spacing**: Buffer's default schedule spaces posts throughout the day; avoid overriding with manual times unless needed
122
+ - **Evergreen content**: Re-queue high-performing posts using `buf_list_sent` to identify top performers, then `buf_create_update` to re-share
123
+ - **UTM parameters**: Append `?utm_source=buffer&utm_medium=social&utm_campaign={campaign}` to URLs for tracking in Google Analytics
124
+ - **Avoid duplicate content**: Check `buf_list_pending` before creating new posts to prevent queue duplication
@@ -0,0 +1,156 @@
1
+ # Content-to-Distribution Workflow
2
+
3
+ ## Overview
4
+
5
+ The content-to-distribution pipeline transforms WordPress content into format-appropriate messages for email and social channels. This reference covers the full workflow: fetching content, adapting it per channel, scheduling distribution, and orchestrating multi-channel campaigns.
6
+
7
+ ## WordPress-to-Channel Pipeline
8
+
9
+ ### Core flow
10
+
11
+ ```
12
+ WordPress Post → Fetch Content → Adapt Format → Distribute
13
+ (wp_get_post) (per channel) (mc_*/buf_*/sg_*)
14
+ ```
15
+
16
+ ### Step 1: Fetch the source content
17
+
18
+ ```
19
+ Tool: wp_get_post
20
+ Params:
21
+ id: 42
22
+ _embed: true # Include featured image, author, categories
23
+ Returns:
24
+ title, excerpt, content (HTML), permalink, featured_media_url,
25
+ author, categories, tags, date
26
+ ```
27
+
28
+ ### Step 2: Adapt for each channel
29
+
30
+ The same post requires different formatting per distribution target.
31
+
32
+ ### Step 3: Distribute via service tools
33
+
34
+ Route the adapted content to the appropriate MCP tool.
35
+
36
+ ## Content Adaptation Per Channel
37
+
38
+ ### Blog → Newsletter (Mailchimp)
39
+
40
+ | Element | Adaptation |
41
+ |---------|------------|
42
+ | Title | Campaign subject line (max 150 chars, add emoji or personalization) |
43
+ | Excerpt | Preview text (max 200 chars) |
44
+ | Content | Full HTML body, reformatted for email (inline CSS, max 600px width) |
45
+ | Featured image | Hero image at top of email (600px wide) |
46
+ | CTA | "Read the full post" button linking to permalink |
47
+
48
+ ```
49
+ 1. wp_get_post → extract title, content, featured_image
50
+ 2. mc_create_campaign → subject = post title, from_name = site name
51
+ 3. mc_set_campaign_content → html = email-formatted post content
52
+ 4. mc_send_campaign → deliver or schedule
53
+ ```
54
+
55
+ ### Blog → Social Post (Buffer)
56
+
57
+ | Platform | Adaptation |
58
+ |----------|------------|
59
+ | Twitter/X | Title + shortened excerpt (max 250 chars with URL) |
60
+ | LinkedIn | Title + full excerpt + 3-5 hashtags (max 700 chars) |
61
+ | Facebook | Title + excerpt + URL (no character pressure) |
62
+ | Instagram | Excerpt + 10-15 hashtags (image required) |
63
+
64
+ ```
65
+ 1. wp_get_post → extract title, excerpt, permalink, featured_image
66
+ 2. Compose platform-specific text variants
67
+ 3. buf_create_update → text, media.photo, profile_ids, scheduled_at
68
+ ```
69
+
70
+ ### Blog → Transactional Notification (SendGrid)
71
+
72
+ For notifying specific users about relevant new content:
73
+
74
+ ```
75
+ 1. wp_get_post → extract title, excerpt, permalink
76
+ 2. sg_list_contacts → find users matching content category
77
+ 3. sg_send_email → template with post title, excerpt, read-more link
78
+ ```
79
+
80
+ ## Scheduling Strategies
81
+
82
+ ### Immediate distribution
83
+
84
+ Publish to all channels as soon as the WordPress post goes live. Best for breaking news or time-sensitive content.
85
+
86
+ ```
87
+ 1. WordPress publish event triggers distribution
88
+ 2. mc_send_campaign (send now)
89
+ 3. buf_create_update (no scheduled_at → immediate queue)
90
+ 4. sg_send_email (immediate delivery)
91
+ ```
92
+
93
+ ### Staggered distribution
94
+
95
+ Spread distribution across hours or days to maximize reach across time zones and channel algorithms.
96
+
97
+ ```
98
+ Day 0, Hour 0: Blog post published
99
+ Day 0, Hour 1: buf_create_update → Twitter (immediate engagement)
100
+ Day 0, Hour 4: buf_create_update → LinkedIn (business hours)
101
+ Day 1, Hour 10: mc_send_campaign → Newsletter (Tuesday 10am optimal)
102
+ Day 3: buf_create_update → Facebook (extend reach)
103
+ Day 7: sg_send_email → Re-engagement for non-openers
104
+ ```
105
+
106
+ ### Evergreen rotation
107
+
108
+ Re-distribute high-performing content on a recurring schedule:
109
+
110
+ ```
111
+ 1. buf_list_sent → identify posts with highest engagement
112
+ 2. Filter for content older than 30 days (avoid fatigue)
113
+ 3. buf_create_update → re-share with updated text
114
+ 4. Track performance to retire content below threshold
115
+ ```
116
+
117
+ ## Multi-Channel Distribution Workflow
118
+
119
+ ### Full orchestration example
120
+
121
+ Distribute a new blog post across all three services:
122
+
123
+ ```
124
+ # 1. Fetch source content
125
+ wp_get_post id=42 → { title, excerpt, content, permalink, featured_image }
126
+
127
+ # 2. Email campaign (Mailchimp)
128
+ mc_create_campaign type="regular" audience_id=... subject="{title}"
129
+ mc_set_campaign_content campaign_id=... html="{formatted_content}"
130
+ mc_send_campaign campaign_id=... schedule_time="2026-03-15T10:00:00Z"
131
+
132
+ # 3. Social posts (Buffer)
133
+ buf_create_update profile_ids=[twitter] text="{short_text}" media.photo="{featured_image}"
134
+ buf_create_update profile_ids=[linkedin] text="{long_text}" scheduled_at="2026-03-15T14:00:00Z"
135
+
136
+ # 4. Notification email (SendGrid)
137
+ sg_send_email to="vip-subscribers" template_id="d-newpost" dynamic_template_data={title, excerpt, permalink}
138
+ ```
139
+
140
+ ### Coordination checklist
141
+
142
+ - [ ] Source content finalized and published on WordPress
143
+ - [ ] Email campaign created and content set (Mailchimp)
144
+ - [ ] Social posts queued for each target profile (Buffer)
145
+ - [ ] Transactional notifications sent to relevant user segments (SendGrid)
146
+ - [ ] UTM parameters appended to all outbound URLs
147
+ - [ ] Analytics tracking confirmed for each channel
148
+
149
+ ## Best Practices
150
+
151
+ - **Single source of truth**: Always fetch content from WordPress (`wp_get_post`) rather than duplicating content manually
152
+ - **URL tracking**: Append UTM parameters per channel (`utm_source=mailchimp`, `utm_source=buffer`, `utm_source=sendgrid`)
153
+ - **Content freshness**: Verify post status is `publish` before distributing; draft content should never reach channels
154
+ - **Error handling**: If one channel fails, proceed with others; log failures and retry individually
155
+ - **Preview before send**: Use Mailchimp preview and Buffer draft features to review formatting before live distribution
156
+ - **Audience overlap**: Be mindful that users may follow multiple channels; vary the messaging slightly to avoid fatigue