Content Publisher
When to Use
Trigger phrases:
- "content publisher"
- "Help me with content publisher"
Use cases:
- When the task matches this skill's domain expertise
When NOT to use:
- For tasks outside this skill's scope
Automates drafting and publishing articles to Substack and Medium with workflow automation.
When NOT to Use
- For one-off tasks that will never repeat
- When the process requires human judgment at every step
- When the cost of automation exceeds the cost of manual execution
Overview
Content Publisher automates workflow automation to reduce manual effort and increase reliability.
Workflow
# Example: Workflow automation
import schedule
import time
def run_workflow():
data = fetch_data()
processed = transform(data)
deliver(processed)
schedule.every().hour.do(run_workflow)
while True:
schedule.run_pending()
time.sleep(60)
- Define triggers — Set up events or schedules that initiate the automation
- Configure inputs — Specify data sources and parameters
- Design pipeline — Define the sequence of automated steps
- Add error handling — Set up retries, alerts, and fallback paths
- Test end-to-end — Validate the full automation with realistic data
- Deploy and monitor — Activate and track performance
Code Examples
Python: Medium Draft
import os, requests
def publish_medium(title, body, tags):
token = os.environ["MEDIUM_TOKEN"]
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
user = requests.get("https://api.medium.com/v1/me", headers=headers).json()["data"]["id"]
payload = {"title": title, "contentFormat": "markdown", "content": body,
"tags": tags[:5], "publishStatus": "draft"}
resp = requests.post(f"https://api.medium.com/v1/users/{user}/posts", headers=headers, json=payload)
resp.raise_for_status()
return resp.json()["data"]["url"]
Node.js: WordPress Post
export async function publishWP(title, content, tags) {
const auth = Buffer.from(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`).toString("base64");
const resp = await fetch(`${process.env.WP_URL}/wp-json/wp/v2/posts`, {
method: "POST", headers: { Authorization: `Basic ${auth}`, "Content-Type": "application/json" },
body: JSON.stringify({ title, content, status: "draft", tags }),
});
if (!resp.ok) throw new Error(`WP ${resp.status}`);
return (await resp.json()).link;
}
Configuration
- Set trigger conditions (schedule, webhook, event)
- Define input validation rules
- Configure notification channels for alerts
- Set retry policies and timeout limits
Best Practices
- Start with simple automations and iterate
- Add logging at every step for debugging
- Use idempotent operations where possible
- Test with edge cases before deploying
Common Issues & Troubleshooting
| Problem |
Solution |
| Medium 403 Forbidden |
Token expired. Regenerate in Settings → Security → Integration tokens. |
| Substack draft missing |
Session cookie expires ~24h. Re-authenticate and extract fresh SUBSTACK_SESSION. |
| WordPress 401 Unauthorized |
Wrong app password or URL. Verify WP_URL ends with /wp-json/wp/v2/. |
| Cross-post formatting differs |
Unsupported Markdown features. Strip footnotes and uncommon extensions before dispatch. |
| Medium tag limit (max 5) |
API rejects >5 tags. Truncate to tags[:5] in the request payload. |
Anti-Rationalization Table
| Rationalization |
Reality |
| "Manual is faster for one-off tasks" |
One-off tasks become recurring. Automate early, save time later. |
| "I will add error handling later" |
You never do. Handle errors from day one. |
| "Automation is overkill" |
If you do it twice, automate it. If you do it daily, it is critical infrastructure. |
Process
- Research — Analyze target audience, competitors, and trending topics
- Create — Generate content following brand guidelines and best practices
- Publish & Optimize — Distribute to target platforms, track performance, iterate
Monetization
- Content syndication service — Offer automated cross-publishing to bloggers and small businesses. Google Doc or Markdown → Substack + Medium + WP.
- Newsletter arbitrage — Repurpose top Medium articles to a paid Substack newsletter; auto-forward new Substack posts back to Medium for discovery traffic.
- SEO content agency — Combine automated publishing with SEO analysis as a "write once, rank everywhere" retainer service for clients.
- Publishing templates & scripts — Sell reusable publishing workflows, editorial calendar templates, and API integration scripts as digital products.
Verification
1---2name: content-publisher3description: Use when automating drafting and publishing articles to Substack and4 Medium with SEO optimization, editorial calendars, and cross-platform distribution.5domain: automation6author: oyi777license: Apache-2.08subdomain: workflow-automation9tags:10- automation11- content12- productivity13- publisher14- seo15- workflow16version: 1.0.017category: automation18metadata:19 source: https://skillmd.com/skills/oyi77/content-publisher20---2122# Content Publisher2324## When to Use2526**Trigger phrases:**27- "content publisher"28- "Help me with content publisher"2930**Use cases:**31- When the task matches this skill's domain expertise3233**When NOT to use:**34- For tasks outside this skill's scope353637Automates drafting and publishing articles to Substack and Medium with workflow automation.383940## When NOT to Use4142- For one-off tasks that will never repeat43- When the process requires human judgment at every step44- When the cost of automation exceeds the cost of manual execution454647## Overview4849Content Publisher automates workflow automation to reduce manual effort and increase reliability.5051## Workflow5253```python54# Example: Workflow automation55import schedule56import time5758def run_workflow():59 data = fetch_data()60 processed = transform(data)61 deliver(processed)6263schedule.every().hour.do(run_workflow)64while True:65 schedule.run_pending()66 time.sleep(60)67```68691. **Define triggers** — Set up events or schedules that initiate the automation702. **Configure inputs** — Specify data sources and parameters713. **Design pipeline** — Define the sequence of automated steps724. **Add error handling** — Set up retries, alerts, and fallback paths735. **Test end-to-end** — Validate the full automation with realistic data746. **Deploy and monitor** — Activate and track performance757677## Code Examples7879### Python: Medium Draft80```python81import os, requests8283def publish_medium(title, body, tags):84 token = os.environ["MEDIUM_TOKEN"]85 headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}86 user = requests.get("https://api.medium.com/v1/me", headers=headers).json()["data"]["id"]87 payload = {"title": title, "contentFormat": "markdown", "content": body,88 "tags": tags[:5], "publishStatus": "draft"}89 resp = requests.post(f"https://api.medium.com/v1/users/{user}/posts", headers=headers, json=payload)90 resp.raise_for_status()91 return resp.json()["data"]["url"]92```9394### Node.js: WordPress Post95```javascript96export async function publishWP(title, content, tags) {97 const auth = Buffer.from(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`).toString("base64");98 const resp = await fetch(`${process.env.WP_URL}/wp-json/wp/v2/posts`, {99 method: "POST", headers: { Authorization: `Basic ${auth}`, "Content-Type": "application/json" },100 body: JSON.stringify({ title, content, status: "draft", tags }),101 });102 if (!resp.ok) throw new Error(`WP ${resp.status}`);103 return (await resp.json()).link;104}105```106107## Configuration108109- Set trigger conditions (schedule, webhook, event)110- Define input validation rules111- Configure notification channels for alerts112- Set retry policies and timeout limits113114## Best Practices115116- Start with simple automations and iterate117- Add logging at every step for debugging118- Use idempotent operations where possible119- Test with edge cases before deploying120121## Common Issues & Troubleshooting122123| Problem | Solution |124|---|---|125| Medium 403 Forbidden | Token expired. Regenerate in Settings → Security → Integration tokens. |126| Substack draft missing | Session cookie expires ~24h. Re-authenticate and extract fresh `SUBSTACK_SESSION`. |127| WordPress 401 Unauthorized | Wrong app password or URL. Verify `WP_URL` ends with `/wp-json/wp/v2/`. |128| Cross-post formatting differs | Unsupported Markdown features. Strip footnotes and uncommon extensions before dispatch. |129| Medium tag limit (max 5) | API rejects >5 tags. Truncate to `tags[:5]` in the request payload. |130131## Anti-Rationalization Table132133| Rationalization | Reality |134|---|---|135| "Manual is faster for one-off tasks" | One-off tasks become recurring. Automate early, save time later. |136| "I will add error handling later" | You never do. Handle errors from day one. |137| "Automation is overkill" | If you do it twice, automate it. If you do it daily, it is critical infrastructure. |138139140## Process1411421. **Research** — Analyze target audience, competitors, and trending topics1431. **Create** — Generate content following brand guidelines and best practices1441. **Publish & Optimize** — Distribute to target platforms, track performance, iterate145146## Monetization147148- **Content syndication service** — Offer automated cross-publishing to bloggers and small businesses. Google Doc or Markdown → Substack + Medium + WP.149- **Newsletter arbitrage** — Repurpose top Medium articles to a paid Substack newsletter; auto-forward new Substack posts back to Medium for discovery traffic.150- **SEO content agency** — Combine automated publishing with SEO analysis as a "write once, rank everywhere" retainer service for clients.151- **Publishing templates & scripts** — Sell reusable publishing workflows, editorial calendar templates, and API integration scripts as digital products.152153## Verification154155- [ ] All steps executed successfully156- [ ] Results validated against acceptance criteria157- [ ] Error handling tested with edge cases158- [ ] Documentation updated with findings