Settyan Flash AI Content Generation via Replicate - n8n Workflow

Use this powerful n8n workflow to generate images or content instantly with the Settyan Flash model via Replicate. Features robust asynchronous polling logic.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Users looking for advanced n8n templates integrating external AI models like Replicate.
Developers needing a robust n8n workflow to handle asynchronous operations (like AI generation).
Content creators and marketers who want to quickly generate visual or written content using the Settyan Flash model.
Anyone interested in learning how to implement polling logic within an n8n node structure.

Overview

Generating large AI content or images often requires asynchronous processing, meaning the initial API call returns a job ID rather than the final result. This specific n8n workflow is designed to handle this complexity when integrating with Replicate, specifically utilizing the settyan/flash-v2.0.1-beta.10 model.

This n8n template provides a complete solution, from initiating the prediction request to continuously checking its status until completion. It solves the critical problem of waiting for long-running AI tasks by implementing a 'wait and check' polling loop using standard n8n node types, ensuring efficiency and reliability. Mastering this n8n workflow pattern is essential for any complex third-party API integration.

How it Works

The entire process is initiated by the manual n8n trigger, allowing for easy testing and debugging of the n8n workflow.


  1. Initialization: The workflow starts with the 'On clicking 'execute'' n8n trigger. This is immediately followed by the 'Set API Key' n8n node, which securely passes the Replicate API key token into the flow items.

  2. Prediction Creation: The 'Create Prediction' n8n node sends an HTTP POST request to Replicate, providing the prompt and model configuration (version 92078fec46fc705fceb16d17f8654b3b9aeea8b0b8ccaad08740b080e202aa10). This request initiates the generation process.

  3. ID Extraction: The resulting job response is processed by the 'Extract Prediction ID' n8n node (a Code node). This node extracts the unique prediction ID and constructs the necessary polling URL.

  4. Asynchronous Polling: The workflow enters a robust polling loop. It first hits the 'Wait' n8n node, pausing execution for 2 seconds. This is crucial for rate limiting and waiting for the AI model to process.

  5. Status Check: The 'Check Prediction Status' n8n node sends a subsequent HTTP GET request using the constructed URL to query the status of the job.

  6. Loop Control: The 'Check If Complete' n8n node evaluates the job status. If the status is succeeded, the n8n workflow proceeds to the final step. If the status is anything else (e.g., processing or starting), the workflow routes back to the 'Wait' n8n node, repeating the polling cycle.

  7. Result Processing: Once successful, the 'Process Result' n8n node cleans up the final JSON output, providing clear access to the generated content URL and associated metrics.

Installation Guide

To deploy and utilize this n8n workflow, follow these steps:


  1. Importing the n8n template: Copy the provided JSON data and paste it directly into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Replicate API Key Setup: Locate the 'Set API Key' n8n node (a Set node). You must replace the placeholder YOURREPLICATEAPIKEY with your actual token from Replicate. Note that this specific n8n workflow uses header authentication defined within the HTTP Request nodes.

  3. Configure Input: Navigate to the 'Create Prediction' n8n node. Inside the JSON body, modify the prompt value to define the content or image you wish to generate. Adjust parameters like width, height, and lorascale as needed for the settyan/flash model.

  4. Execution: Since this n8n workflow uses a manual n8n trigger ('On clicking 'execute''), you can run it immediately by clicking the 'Execute Workflow' button in the n8n interface.

  5. Activation: Once testing is complete, remember to set the workflow to 'Active' if you plan to integrate it with other n8n triggers or scheduled events.

Node Details

This n8n workflow utilizes several key n8n node types to achieve its powerful asynchronous functionality:

On clicking 'execute' (Manual n8n Trigger): Serves as the starting point for manual execution and testing of the n8n workflow.
Set API Key (Set n8n node): Temporarily stores the replicateapikey as an item field, enabling secure referencing in subsequent HTTP requests without hardcoding credentials repeatedly.
Create Prediction (HTTP Request n8n node): Initiates the AI generation request to the Replicate API using a POST method. Key Configuration: Uses the Bearer token derived from the 'Set API Key' node and specifies the Settyan model version.
Extract Prediction ID (Code n8n node): Custom JavaScript logic is used here to parse the initial response and output the predictionId and predictionUrl, structuring the data needed for the polling loop.
Wait (Wait n8n node): Pauses the n8n workflow execution for a defined period (2 seconds) before polling the status again, preventing unnecessary overload on the Replicate API.
Check Prediction Status (HTTP Request n8n node): Performs the necessary GET request to check the status of the ongoing AI job. This n8n node is the core of the polling mechanism.
Check If Complete (If n8n node): Routes the n8n workflow based on the status. It checks if the status field equals 'succeeded', routing back to 'Wait' if incomplete, or forward to 'Process Result' if finished.
Process Result (Code n8n node): Final processing n8n node that formats the successful output, specifically isolating the generated image URL and model metadata.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

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

Featured*