Transform articles into engaging threads
Breaks down blog posts into engaging Twitter threads
What you will receive
Twitter Thread Ready
just now
Your thread is ready to post: 1/ I just published a deep dive on database indexing. Here's the TL;DR in 5 tweets: 2/ Most developers add indexes after things get slow. By then, you've already trained users to expect poor performance. 3/ The rule I follow: if you're going to query by it, index it. Before you write the query, not after. 4/ But here's the trap—over-indexing is just as bad. Every index slows down writes. Choose wisely. 5/ Read the full post: [link] --- Copy and post →
How it works
- 1Humrun fetches your latest blog post from your RSS feed
- 2AI breaks it into a Twitter/X thread format
- 3You get numbered tweets ready to post
You configure
https://yourblog.com/feed.xml
The RSS feed URL of your blog
sk-...
For generating thread content
View Python code
import requests
import feedparser
import os
BLOG_RSS_URL = os.environ.get("BLOG_RSS_URL")
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
# Fetch the latest post
feed = feedparser.parse(BLOG_RSS_URL)
if not feed.entries:
print("No posts found in feed")
else:
post = feed.entries[0]
title = post.get("title", "Untitled")
content = post.get("summary", post.get("description", ""))
link = post.get("link", BLOG_RSS_URL)
# Generate Twitter thread
prompt = f"""Transform this blog post into a Twitter thread.
Title: {title}
Content: {content[:2000]}
Link: {link}
Guidelines:
- Start with a hook tweet that makes people want to read more
- 5-7 tweets total
- Number each tweet (1/, 2/, etc.)
- Each tweet should be under 280 characters
- Last tweet links to the full post
- No hashtags, no emojis
- Conversational but insightful"""
response = requests.post(
"https://api.openai.com/v1/chat/completions",
headers={"Authorization": f"Bearer {OPENAI_API_KEY}"},
json={
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": prompt}],
"max_tokens": 500
}
)
thread = response.json()["choices"][0]["message"]["content"]
print("Twitter Thread Ready\n")
print(thread)
print(f"\n---\nBased on: {title}")Suggested schedule: Every week on Wednesday•Notifications: After every run