Use this robust n8n workflow to generate high-quality text content automatically using the IBM Granite 3.3 8B Instruct model accessed through the Replicate API. This n8n template includes asynchronous polling logic.
Download this n8n workflow template and start using it instantly.
Integrating large language models (LLMs) often requires handling asynchronous requests, especially when the generation time exceeds standard timeouts. This powerful n8n workflow template solves this challenge by implementing a dedicated polling mechanism.
Instead of waiting for a single response that might time out, this n8n automation initiates the text generation task with the ibm-granite/granite-3.3-8b-instruct model on Replicate, extracts the prediction ID, and then continually checks the status until the job is complete. This ensures the execution of the n8n workflow is reliable, even for long-running AI tasks. Every component, from the initial n8n trigger to the final processing n8n node, is designed for maximum efficiency when generating custom text content.
The entire process of this n8n workflow begins when the 'On clicking execute' n8n trigger is manually activated.
Set API Key n8n node securely defines the replicateapikey. This key is dynamically passed as an Authorization bearer token in subsequent HTTP requests.Create Prediction n8n node (an HTTP Request POST) sends the request to the Replicate API, specifying the model version (ibm-granite/granite-3.3-8b-instruct) and input parameters like temperature and maxtokens. Since this is an asynchronous call, it returns an immediate prediction ID.Extract Prediction ID n8n node (a Code n8n node) parses the initial response to grab the unique predictionId and constructs the polling URL.Wait n8n node, which pauses the n8n workflow execution for 2 seconds to avoid overwhelming the API.Check Prediction Status n8n node (an HTTP Request GET) uses the prediction URL to fetch the current status of the AI task.Check If Complete n8n node (an If n8n node) evaluates the returned status. If the status equals 'succeeded', the n8n workflow exits the loop and proceeds. If the status is still 'processing' or 'starting', the workflow loops back to the Wait n8n node.Process Result n8n node (a final Code n8n node) extracts the generated text content (output) and essential metrics (e.g., completedat) for the final result.To deploy this powerful n8n workflow, follow these steps:
Set API Key n8n node. Edit the node and replace the placeholder value YOURREPLICATEAPIKEY with your actual Replicate API key.Create Prediction n8n node. This is where you configure the input prompt and generation parameters (e.g., maxtokens, temperature). Adjust the JSON body payload to suit your content generation needs.id and initial status needed to construct the URL for the subsequent polling requests in the n8n workflow.status equals 'succeeded'. If not, the flow is routed back to the Wait n8n node to re-check after the delay.Generate custom recipes and stunning restaurant-style food images directly via a Telegram bot. This powerful n8n workflow uses OpenRouter and Langchain AI Agents for instant culinary creation.

Automate custom logo generation using this powerful n8n workflow. It uses a webhook n8n trigger, captures website data via screenshot and content scraping, and leverages OpenAI and Google Gemini for sophisticated AI-driven image creation.

Use this comprehensive n8n workflow to generate high-quality images from text prompts using Stability AI SDXL via the Replicate API. Features status tracking and robust error handling.

Generate multiple random, high-entropy strings instantly using an interactive n8n form. This powerful n8n workflow utilizes the n8n crypto node for secure generation.

Use this powerful n8n workflow to automate the generation of daily financial PDF reports, combining Bitcoin on-chain metrics and NASDAQ data using custom n8n node scripts.

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







































