Speech-to-Text Conversion using IBM Granite 3.3 8B via Replicate - n8n Workflow

Convert audio files to text automatically using this powerful n8n workflow template. Integrate IBM Granite 3.3 8B model via Replicate API with robust status polling and error handling in n8n.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

A Markdown-formatted string describing the ideal user persona:
Automation specialists looking for reliable Speech-to-Text (STT) solutions.
Developers needing to integrate advanced AI models like IBM Granite into their existing systems.
Users seeking ready-made n8n templates for asynchronous API polling and handling large AI tasks.
Data engineers who process large volumes of audio data and require automated transcription using a repeatable n8n workflow.

Overview

Leveraging state-of-the-art AI for speech processing can be complex, especially when dealing with asynchronous APIs that require continuous status checks. This specialized n8n workflow solves this challenge by providing a complete, production-ready solution for using the ibm-granite/granite-speech-3.3-8b model via Replicate.

This n8n workflow encapsulates all necessary logic: authentication setup, input parameter configuration (like audio URLs and generation settings), initiating the prediction, and implementing a smart polling loop. The result is a highly reliable n8n template that ensures your transcription tasks are completed, gracefully handling delays, successes, and failures. This robust n8n template saves significant development time by providing pre-built error resilience and flow control logic within the n8n environment.

How it Works

This automation is initiated by an n8n trigger and proceeds through several critical steps to manage the asynchronous Replicate API call:


  1. Initialization: The Manual Trigger starts the flow. The subsequent Set API Token n8n node securely defines the Replicate API key, which is essential for authentication.

  2. Configuration: The Set Text Parameters n8n node defines the necessary inputs for the IBM Granite model, including the link to the audio file (audio parameter) and generation controls (like temperature, topk, and maxtokens).

  3. Prediction Initiation: The Create Text Prediction n8n node (an HTTP Request) sends a POST request to Replicate, passing the parameters. Since this is an asynchronous task, it immediately returns a prediction ID, which is logged by the Log Request n8n node.

  4. Polling Loop Setup: After an initial Wait 5s n8n node delay, the Check Status n8n node begins polling the Replicate API using the received prediction ID.

  5. Flow Control: The Is Complete? n8n node checks if the status is 'succeeded'.

If Succeeded: The flow is routed to Success Response, which formats the final transcription output.
If Not Succeeded: The Has Failed? n8n node checks for 'failed' status.

  1. Error Handling and Retry: If the status is 'failed', it routes to Error Response. If the status is neither 'succeeded' nor 'failed' (meaning it is still processing), the flow enters a retry loop via the Wait 10s n8n node, looping back to the Check Status n8n node until the transcription job is complete. This pattern is a crucial example of effective asynchronous task management in an n8n workflow.

  2. Final Output: The Display Result n8n node compiles the structured success or error message.

Installation Guide

To utilize this powerful n8n workflow template, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' button -> 'Import from JSON'.

  2. Obtain Replicate Credentials: Sign up or log in to Replicate and retrieve your API token.

  3. Configure API Token: Locate the Set API Token n8n node and replace the placeholder YOURREPLICATEAPI_TOKEN with your actual token value.

  4. Adjust Parameters (Optional but Recommended): Review the Set Text Parameters n8n node. While a sample audio URL is provided, you should replace it with the path to the audio file you wish to transcribe.

  5. Execute the n8n Workflow: Click the Manual Trigger n8n node to test the process, or activate the n8n template to run it on a scheduled or webhook basis.

Node Details

Every n8n node plays a vital role in this highly functional n8n workflow:

Manual Trigger (n8n trigger): The starting point for executing this n8n workflow manually during development or testing.
Set API Token (n8n node): Essential configuration step. It sets the apitoken variable used for authorization headers in subsequent HTTP Request nodes.
Set Text Parameters (n8n node): Defines the model inputs. Key configuration includes the audio parameter, which is set to a sample WAV file URL, and parameters like temperature (0.6) and maxtokens (512).
Create Text Prediction (n8n node - HTTP Request): Sends the initial transcription request.
Function: Starts the asynchronous process on the Replicate side.
Key Configuration: Uses the POST method to https://api.replicate.com/v1/predictions and includes the Authorization: Bearer {{ $json.api_token }} header.
Check Status (n8n node - HTTP Request): Used within the polling loop.
Function: Fetches the prediction status using the ID returned from the creation step. The URL uses an expression: =https://api.replicate.com/v1/predictions/{{ $('Create Text Prediction').item.json.id }}.
Wait 5s / Wait 10s (n8n node): Implements crucial waiting periods to prevent API rate limiting while waiting for the AI model to finish processing.
Is Complete? / Has Failed? (n8n node - If): These n8n nodes provide the core flow control and decision-making logic, directing the n8n workflow based on the status field (succeeded or failed).


  • Success Response / Error Response (n8n node - Set): Formats the final, clean output object, providing clarity on the result (the generated text or the error message).

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*