TL;DR
I automated content generation for multiple platforms using AI and the Craft API. The changes involved updating metadata, generating content for various platforms, and fixing API integration issues.
The Problem
The problem was to streamline content generation across multiple platforms, including Bluesky, Medium, and Substack. The goal was to automate the process using AI and the Craft API.
What I Tried First
Initially, I focused on setting up the AI model to generate content. However, I encountered issues with the API integration, specifically with the Craft API. The error messages indicated that the API was expecting specific data types, which were not being provided.
The Implementation
To resolve the issues, I made several changes to the codebase.
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
I automated the generation of content for various platforms using AI. The craft_publisher.py file was updated to include the following code:
import requests
def generate_content():
# AI model generation code here
content = {
"title": "Automated Content",
"body": "This is an automated content piece."
}
return content
def publish_to_craft(content):
url = "https://api.craft.com/blocks"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers, json=content)
if response.status_code == 201:
print("Content published successfully.")
else:
print("Error publishing content:", response.text)
generate_content()
publish_to_craft(generate_content())
Fixed API Integration Issues
I fixed the API integration issues by updating the notifier.py file:
import requests
def send_notification(content):
url = "https://api.substack.com/v1/send-notification"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers, json=content)
if response.status_code == 201:
print("Notification sent successfully.")
else:
print("Error sending notification:", response.text)
send_notification({"title": "Automated Content", "body": "This is an automated content piece."})
Updated Changelog
I updated the changelog.md file to reflect the changes:
## 2024-06-24 content-automation
### Changed
- Automated generation of changelog and metadata for `content/2026/06/23/VS/`
- Updated `content/2026/06/23/VS/bluesky_es.json`
Key Takeaway
The key takeaway from this experience is the importance of checking API documentation and ensuring that the correct data types are being provided. This can save a significant amount of time and effort in debugging.
What's Next
The next step is to continue refining the AI model to generate more accurate and engaging content. Additionally, I plan to explore other platforms for content distribution and automate the process further.
vibecoding #buildinpublic #AI #Productivity #CraftAPI #ContentAutomation
Part of my Build in Public 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)