Quick overview
This workflow takes a blog post title and content, generates a short Pexels search phrase with Anthropic Claude, downloads a matching stock photo from Pexels, uploads it to your WordPress media library, creates a draft WordPress post, and sets the uploaded image as the featured image.
How it works
- Runs when you manually execute the workflow.
- Sets a sample WordPress post title and HTML content to use as input.
- Sends the post title to Anthropic Claude to generate a short photo search phrase and cleans it for use as keywords.
- Searches the Pexels API for a landscape image matching the generated keywords and downloads the top result.
- Uploads the downloaded image to your WordPress site via the WordPress REST API as a media item.
- Creates a new WordPress post as a draft with the provided title and content, then updates the post to set the uploaded media item as its featured image.
Setup
- Add an Anthropic API credential and select a Claude model in the keyword-generation step.
- Create a Pexels API key and configure it as an HTTP Header Auth credential for the Pexels search request.
- Create a WordPress Application Password and configure the WordPress API credential, then replace https://your-site.com with your WordPress site URL in the media upload and post update requests.
- Replace the sample title and content with your own input source (or connect your content-generation step) and adjust the post status if you want to publish instead of saving drafts.
Requirements
- Pexels API key (free) and WordPress Application Passwords
Customization
- Searches Pexels for a landscape photo matching that phrase.
- Change post Status from Draft to Publish if you want fully automated publishing
Additional info
This is one piece of a larger daily content automation pipeline. For the full system (AI article generation, topic rotation, single CONFIG node, 9 documented production pitfalls): meridianiainc.gumroad.com/l/ai-blog-autopilot
Suggested title: "Auto-publish WordPress posts with a matching Pexels image"
(the auto-generated title overemphasizes the specific AI model used, which is
an implementation detail, not the core value of the workflow)