Create powerful AI-generated content or images using the Replicate API and this robust n8n workflow. Features polling logic, error handling, and structured output.
Download this n8n workflow template and start using it instantly.
Automation engineers seeking reliable AI generation solutions.
Developers needing production-ready n8n templates for external APIs.
Users who want to integrate complex text-to-content models into their n8n workflow.
Anyone looking to leverage the Replicate platform within an n8n automation.
This powerful n8n workflow provides a complete solution for asynchronously generating AI content or images using the digitalhera/herathaisbragatto2 model hosted on Replicate. Since AI generation tasks often take time, this n8n automation is designed with a resilient polling loop. This approach solves the problem of simple HTTP requests timing out by continuously checking the prediction status until the process is marked as 'succeeded' or 'failed'. The result is a highly reliable n8n workflow that handles API authentication, complex input parameters, logging, and comprehensive error handling, making it a perfect foundation for various AI applications. This reusable n8n template can be easily adapted for other generation models on Replicate.
Manual Trigger n8n trigger, allowing for immediate execution and testing of the n8n workflow.Set API Token n8n node to define the required Replicate authentication key and then the Set Other Parameters n8n node to specify all generation inputs, such as the prompt, width, and height.Create Other Prediction n8n node sends a non-blocking POST request to the Replicate API, initiating the AI generation process and receiving a unique prediction ID.Log Request custom code n8n node records the prediction ID for monitoring purposes.Wait 5s).Check Status n8n node fetches the current state using the prediction ID.Is Complete? n8n node checks if the prediction status is 'succeeded'. If not, the Has Failed? n8n node checks if the status is 'failed'.Wait 10s) and then loops back to the Check Status n8n node. This ensures the n8n automation is resource-efficient.Success Response or Error Response n8n node, consolidating the final output URL or error details into a structured JSON response displayed by the Display Result n8n node.Set API Token n8n node.YOURREPLICATEAPITOKEN with your actual token obtained from Replicate.com. This token is essential for the HTTP Request n8n node connections.Set Other Parameters n8n node.prompt value (default: "Create something amazing") to define the content you wish to generate.width, height, or aspectratio as needed for your specific use case. This configuration flexibility makes this a powerful n8n template. Manual Trigger (n8n trigger): The starting n8n trigger for this automation, designed for immediate testing and execution control of the n8n workflow.
Set API Token (n8n node): Stores the Replicate API key in the workflow data, ensuring secure use across subsequent API calls.
Key Configuration: Defines the variable api_token.
Set Other Parameters (n8n node): Prepares the large input payload for the AI model.
Function: Aggregates input parameters like prompt, seed, width, and height.
Create Other Prediction (HTTP Request n8n node): Initiates the text-to-content generation request to Replicate.
Function: Sends a POST request to /v1/predictions. It sets the Authorization header using the Bearer token retrieved from the Set API Token n8n node.
Check Status (HTTP Request n8n node): Used inside the polling loop to retrieve the status of the running prediction.
Function: Sends a GET request to the prediction ID URL, continually checking for completion.
Is Complete? (If n8n node): Controls the flow of the n8n workflow.
Function: Checks if the API response status equals 'succeeded'.
Wait 10s (Wait n8n node): Provides the essential retry mechanism, pausing the n8n workflow execution before checking the status again, which is crucial for handling long-running AI tasks.
Use this powerful n8n workflow to automate high-speed AI image generation using the settyan/flash-v2.0 model on Replicate. This n8n template includes robust status polling logic.

Automate AI content generation using the settyan/flash-v2.0.0-beta.1 Replicate model. This reliable n8n workflow uses intelligent polling logic and flow control for guaranteed results.

Generate high-quality images using the cyberrealistic-pony-v125 model on Replicate. This automated n8n workflow features status polling and robust error handling.

Use this advanced n8n workflow to simulate a full creative design agency. An OpenAI O3-powered Creative Director delegates tasks to specialized GPT-4.1-mini agents for fast, cost-effective design generation.

Automate credit card payment reminders and tracking using this robust n8n workflow. Extracts data from bank emails/PDFs, schedules Google Calendar events, and logs data in Google Sheets.

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos







































