Implementing Auto-Publishing to Bluesky with Enhanced Metadata
TL;DR: I integrated auto-publishing to Bluesky with enhanced metadata, including post URIs and publication status. This involved updating the metadata.json file and modifying the content_generator.py script.
The Problem
When automating content generation, I encountered an issue with Bluesky auto-publishing. The current implementation lacked detailed metadata, making it difficult to track published posts and their URIs. The error messages were unclear, and the documentation did not provide a straightforward solution.
What I Tried First
Initially, I attempted to modify the bluesky_en.json and bluesky_es.json files directly. However, this approach led to inconsistencies and did not scale well for multiple projects. I then focused on updating the metadata.json file to include Bluesky URIs and publication status.
The Implementation
To solve this issue, I made the following changes:
Update metadata.json
I added the following fields to the metadata.json file:
"bluesky_published": true,
"bluesky_uris": {
"es": [
"at://did:plc:y5omxao2h2bnmixo7sigikex/app.bsky.feed.post/3mpmmqtf3eb2i",
"at://did:plc:y5omxao2h2bnmi..."
],
"en": [
"at://did:plc:y5omxao2h2bnmixo7sigikex/app.bsky.feed.post/3mpmmrjjuxg2m",
"at://did:plc:y5omxao2h2bnmi..."
]
}
This change allowed me to track the publication status and URIs for each post.
Modify content_generator.py
I updated the content_generator.py script to include the Bluesky URIs and publication status in the metadata:
import json
def generate_content(metadata):
# ...
metadata['bluesky_published'] = True
metadata['bluesky_uris'] = {
'es': [],
'en': []
}
# ...
def publish_to_bluesky(metadata):
# ...
bluesky_uri = 'at://did:plc:y5omxao2h2bnmixo7sigikex/app.bsky.feed.post/3mpmmqtf3eb2i'
metadata['bluesky_uris']['es'].append(bluesky_uri)
# ...
This modification enabled the script to auto-generate the Bluesky URIs and update the metadata accordingly.
Update notifier.py
I also updated the notifier.py script to send a notification with the publication status and URIs:
import json
def send_notification(metadata):
# ...
publication_status = metadata['bluesky_published']
bluesky_uris = metadata['bluesky_uris']
notification_message = f"Published to Bluesky: {publication_status} - URIs: {bluesky_uris}"
# ...
This change allowed me to receive notifications with the publication status and URIs.
Key Takeaway
The key takeaway from this experience is the importance of including detailed metadata in automation scripts. By tracking publication status and URIs, I can now efficiently manage content across multiple platforms.
What's Next
In the next iteration, I plan to integrate this auto-publishing feature with other platforms, such as Dev.to and Substack. This will enable me to manage content across multiple channels from a single interface.
vibecoding #buildinpublic #automation #bluesky #metadata #contentgeneration
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-07-01
#playadev #buildinpublic
Top comments (0)