This workflow connects to Replicate’s API and uses the ibm-granite/granite-3.3-8b-instruct model to generate text.
1️⃣ On clicking 'execute'
2️⃣ Set API Key
YOUR_REPLICATE_API_KEY with your actual API key.✅ No coding needed to handle authentication.
✅ You can reuse the same setup for other Replicate models.
3️⃣ Create Prediction (HTTP Request)
temperature, max_tokens, top_k, top_p.4️⃣ Extract Prediction ID (Code)
5️⃣ Wait
6️⃣ Check Prediction Status (HTTP Request)
starting, processing, succeeded).7️⃣ Check If Complete (IF Condition)
✅ No need to manually refresh or check job status.
✅ Workflow keeps retrying until text is ready.
✅ Smart looping built-in with Wait + If Condition.
8️⃣ Process Result (Code)
What it does: Collects the final AI output , status, metrics, and timestamps.
Adds info like:
output → Generated textmodel → ibm-granite/granite-3.3-8b-instructmetrics → Performance dataWhy it’s useful: Gives you a neat, structured JSON result that’s easy to send to Sheets, Notion, or any app.
✅ Ready-to-use text output.
✅ Easy integration with any database or CRM.
✅ Transparent metrics (when it started, when it finished, etc.).
| Section | What happens |
|---|---|
| ⚡ Trigger & Setup | Start workflow + set Replicate API key. |
| 🤖 Model Request & Polling | Send request → get Prediction ID → loop until job completes. |
| 🟢 Process & Output | Extract clean AI-generated text + metadata for storage or further workflows. |
✅ No coding needed — just configure your API key.
✅ Reliable polling — the workflow waits until results are ready.
✅ Flexible — you can extend output to Google Sheets, Slack, Notion, or email.
✅ Beginner-friendly — clean separation of input, process, and output.
✨ With this workflow, you’ve turned Replicate’s IBM Granite LLM into a no-code text generator — running entirely inside n8n! ✨


