Use this powerful n8n workflow to automatically generate featured images via Leonardo AI and instantly upload them to your WordPress media library. Perfect for automated content pipelines.
Download this n8n workflow template and start using it instantly.
Generating unique, high-quality images for blog posts can be a time-consuming manual step. This sophisticated n8n workflow solves this by fully automating the process using state-of-the-art AI generation.
The core value provided by this n8n template is seamless integration: an incoming request triggers an image generation job in Leonardo AI. Crucially, the n8n flow handles the required waiting period for the asynchronous AI job to complete, downloads the resulting image, and uses the WordPress API to upload the file, tagging it with a relevant filename (based on the provided slug). This specific n8n workflow dramatically accelerates content creation, ensuring every post has a unique featured image without manual intervention.
This automation is designed to be executed by another system or n8n workflow, making it highly modular. Here is the step-by-step logical flow:
prompt for the image and the content slug (for naming the output file) as inputs.img-{{ $('Code1').item.json.slug }}.jpg).guid.raw) and returns it, completing the primary function of this robust n8n template.To deploy and utilize this n8n template, follow these steps:
Execute Workflow Trigger: Acts as the primary n8n trigger when this workflow is called by another n8n workflow, accepting prompt and slug variables.
Code1 (Code n8n node): A simple intermediary code n8n node to structure the input data before sending the API call.
HTTP Request1 (Leonardo Generate): Initiates the image generation process, utilizing the input prompt. This n8n node sends a POST request to the Leonardo AI /generations endpoint.
Wait (n8n node): Pauses the execution for 1 minute, allowing the asynchronous image generation job to complete before moving to the polling step. This is vital core logic flow control.
HTTP Request2 (Leonardo Status Check): Polls the Leonardo API to retrieve the generation results using the generated job ID. This n8n node ensures the image is ready before downloading.
HTTP Request3 (Download Image): Fetches the generated image file data. This n8n node converts the data into binary format for the subsequent WordPress upload.
Upload image2 (HTTP Request n8n node): Uploads the binary image data to your WordPress media library using authorized WordPress API credentials. It uses dynamic data from the initial n8n trigger to set the filename.
Code (Code n8n node): Extracts and structures the final WordPress URL of the uploaded media file for easy consumption by subsequent n8n nodes or workflows.
Use this n8n workflow template to automate the transcription of videos using local OpenAI Whisper integration, translate subtitles via LibreTranslate, and deliver the final SRT files via Gmail.

Use this robust n8n workflow to generate, execute, and automatically debug PostgreSQL queries using GPT via OpenAI or OpenRouter. A powerful n8n template for developers.

Use this powerful n8n workflow to automatically generate and send multilingual spare parts price quotes using Gmail, Google Sheets, and Gemini AI. This highly functional n8n template streamlines sales operations.

Automate AI image generation from Google Sheets using this robust n8n workflow. Generate images via RapidAPI, upload them to Google Drive, and log results automatically using the n8n node structure.

Generate audio summaries for WordPress articles using this n8n workflow, integrating OpenAI, Eleven Labs Text-to-Speech, and direct WordPress media uploads.

AI and Automation developer. Im implementing n8n and ai tools to automate marketing and sales in companies







































