This application automates the process of creating blog posts, selecting featured images, and publishing to Webflow. It uses CREW-AI powered content generation, image search and selection, and direct publishing to streamline the blogging workflow.
- AI-powered blog post generation using CrewAI
- Image search and selection using Pixabay API
- Markdown to HTML conversion
- Review system for content and images before publishing
- Direct publishing to Webflow
- Cleanup functionality for generated files
- Python 3.7+
- Pixabay API key
- Webflow API token
- SERPER API key
-
Clone this repository:
git clone https://github.com/niuguy/crewblogger cd blog-creator-publisher -
Install required packages:
pip install -r requirements.txt -
Set up environment variables:
export PIXABAY_API_KEY="your_pixabay_api_key" export WEBFLOW_API_TOKEN="your_webflow_api_token" export OPENAI_API_KEY="your_openai_api_key" export SERPER_API_KEY="your_serper_api_key"
To generate a blog post, select an image, and publish to Webflow:
python main.py "Your Blog Topic" --subtopics "Subtopic 1" "Subtopic 2" "Subtopic 3"
--review: Review the generated content and selected image before publishing--regenerate: Force regeneration of content even if a draft exists--cleanup: Remove all generated files and exit
-
Generate a post with review:
python main.py "AI in Healthcare" --subtopics "Diagnosis" "Treatment" "Ethics" --review -
Regenerate an existing post:
python main.py "AI in Healthcare" --subtopics "Diagnosis" "Treatment" "Ethics" --regenerate -
Clean up generated files:
python main.py --cleanup
- The script generates a blog post based on the given topic and subtopics.
- It searches for relevant images on Pixabay.
- You can review the generated content and select an image.
- If approved, the post is published to Webflow.
- Modify the
create_blog_postfunction to adjust the AI content generation process. - Update the
post_to_webflowfunction to change how content is formatted for Webflow.