Use this robust n8n workflow to automate content generation with Replicate's moicarmonas/2ndmoises_generator AI model. Features automated status polling and secure API key handling.
Download this n8n workflow template and start using it instantly.
moicarmonas/2ndmoises_generator for automated content creation.Integrating external AI models often requires handling asynchronous operations—you initiate a task, and then you must periodically check if it's finished. This specific n8n workflow solves this by providing a reliable pattern for interacting with Replicate, a popular platform for running open-source AI models.
The automation initiates a generation request using the moicarmonas/2ndmoises_generator model. Instead of failing while waiting, the n8n workflow implements a vital polling loop using the 'Wait' n8n node and an 'If' n8n node, ensuring the system patiently checks the status until the generation succeeds before retrieving the final output. This robust design makes this n8n template essential for reliable AI operations.
The entire process is initiated by a manual n8n trigger for immediate execution or testing.
prompt, seed, etc.).To deploy this n8n workflow, follow these steps:
YOURREPLICATEAPIKEY with your actual Replicate API key.jsonBody to set the specific prompt and configuration parameters (like width, height, and lorascale) required for the moicarmonas/2ndmoises_generator model. On clicking 'execute' (Manual Trigger): The starting n8n trigger. Used for manual execution and testing of the n8n workflow.
Set API Key (Set): Function: Securely assigns the Replicate API key to an item variable (replicateapikey) accessible by subsequent HTTP request n8n nodes.
Create Prediction (HTTP Request): Function: Initiates the asynchronous generation task on the Replicate platform for the specified model. Key Configuration: Uses POST method to https://api.replicate.com/v1/predictions and includes the API key in the Authorization header.
Extract Prediction ID (Code): Function: A custom n8n node script that pulls the unique id from the creation response and constructs the polling URL for status checks. Key Configuration: Prepares data needed for the loop control.
Wait (Wait): Function: Pauses the n8n workflow execution for a defined time (2 seconds) before polling the status again, preventing excessive API calls.
Check Prediction Status (HTTP Request): Function: Checks the real-time status of the running AI job using a GET request to the specific prediction URL. Key Configuration: URL is dynamically set using expression ={{ $json.predictionUrl }}.
Check If Complete (If): Function: Implements the crucial decision logic. If the status is 'succeeded', it completes the loop; otherwise, it directs the flow back to the 'Wait' n8n node.
Process Result (Code): Function: Finalizes the output by structuring the completed prediction data, making the resulting generated content URL easily accessible for the rest of the n8n workflow.
Use this powerful n8n workflow template to initiate Qualys vulnerability scans and generate security reports directly from Slack shortcuts. Automate DevOps and security operations.

Use this powerful n8n workflow to instantly enhance real estate photos sent via Telegram using Google Nano Banana AI. This n8n workflow template handles file management and asynchronous API polling automatically.

Use this powerful n8n workflow to automatically enhance product photos uploaded to Google Drive using Google Gemini AI, ensuring studio-quality images for your e-commerce catalog.

Automate B2B lead enrichment using an n8n workflow, Azure OpenAI, and Bright Data MCP. Qualify leads, score fit, and update HubSpot CRM automatically with this robust n8n template.

Automate lead enrichment using this powerful n8n workflow. Scrape LinkedIn profiles, analyze data with GPT-4, and update Airtable CRM fields instantly using specialized n8n templates.

Use this comprehensive n8n workflow to automatically enrich company profile data via Airtop, calculate an Ideal Customer Profile (ICP) score, and seamlessly upsert the clean data into HubSpot. Leverage the n8n trigger for immediate execution.

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







































