TL;DR
I automated content generation for multiple platforms using AI and the Craft API. The changes involved updating metadata, generating content for Medium and Substack, and fixing API endpoints.
The Problem
The content-automation project required generating content for various platforms, including Bluesky, Medium, and Substack. The initial issue was managing multiple content formats and API endpoints. Specifically, I encountered errors with the Craft API due to incorrect data types and missing endpoint parameters.
What I Tried First
My first approach was to manually generate content for each platform. However, this was time-consuming and prone to errors. I then attempted to use a single API endpoint for all platforms, but this resulted in incorrect data formats.
The Implementation
To resolve the issues, I made the following changes:
Updated Metadata Generation
I updated the metadata.json file to include flags for generated content:
{
"pull_requests": 0,
"releases": 0,
"closed_issues": 0,
"medium_generated": true,
"substack_generated": true
}
Automated Content Generation for Medium and Substack
I created templates for Medium and Substack content generation:
// medium_en.md
## Taming the Chaos: How I Automated Content Generation with AI
As I reflect on my journey as a developer, I realize that one of the most significant challenges I face is managing multiple content formats and API endpoints.
## Implementation Details
### Craft API Endpoint
I updated the `craft_publisher.py` file to use the correct endpoint and data formats:
python
import requests
def craft_publisher(blocks):
url = "https://api.craft.com/v1/blocks"
headers = {"Content-Type": "application/json"}
response = requests.post(url, headers=headers, json=blocks)
return response.json()
Example usage:
blocks = [
{
"type": "text",
"text": "This is a sample block."
}
]
response = craft_publisher(blocks)
print(response)
### Fixed API Endpoints and Data Formats
I updated the `bluesky_en.json` and `bluesky_es.json` files to reflect the correct data formats:
json
// bluesky_en.json
[
{
"type": "technical_learning",
"text": "One thing I learned today is to always check the API docs."
}
]
### Notifier Implementation
I updated the `notifier.py` file to send notifications for generated content:
python
import smtplib
def send_notification(subject, message):
# Email configuration
sender = "your_email@example.com"
receiver = "receiver_email@example.com"
password = "your_email_password"
# Send email
server = smtplib.SMTP("smtp.example.com", 587)
server.starttls()
server.login(sender, password)
server.sendmail(sender, receiver, f"Subject: {subject}\n{message}")
server.quit()
Example usage:
subject = "Content Generation Update"
message = "Automated content generation completed successfully."
send_notification(subject, message)
# Key Takeaway
The key takeaway from this experience is the importance of verifying API documentation and data formats to avoid errors. By automating content generation and fixing API endpoints, I was able to streamline the content creation process and reduce manual errors.
# What's Next
In the next iteration, I plan to integrate more AI models and explore additional content platforms. Specifically, I will:
* Investigate the use of Claude AI for content generation
* Expand support for other content platforms, such as Hashnode
* Continue to refine the automation process to reduce manual intervention
#vibecoding #buildinpublic #content-automation #AI #CraftAPI #Productivity
---
*Part of my [Build in Public](https://dev.to/zaerohell) series — sharing the real process of building SaaS projects from Playa del Carmen, México.*
*Repo: `zaerohell/content-automation` · 2026-06-25*
\#playadev #buildinpublic
Top comments (0)