Skip to main content

Create a speech-to-text API with OpenAI GPT4o-mini transcribe

Workflow preview

Workflow preview
100%
Create a speech-to-text API with OpenAI GPT4o-mini transcribe preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Description This template provides a simple and powerful backend for adding speech to text capabilities to any application. It creates a dedicated webhook that receives an audio file, transcribes i...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.set, n8n-nodes-base.webhook, n8n-nodes-base.respondtowebhook, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Guillaume Duvernay.

Original n8n.io source

1.1 Workflow description

Title
Create a speech-to-text API with OpenAI GPT4o-mini transcribe
Workflow name
Create a speech-to-text API with OpenAI GPT4o-mini transcribe

Description

This template provides a simple and powerful backend for adding speech-to-text capabilities to any application. It creates a dedicated webhook that receives an audio file, transcribes it using OpenAI's gpt-4o-mini model, and returns the clean text.

To help you get started immediately, you'll find a complete, ready-to-use HTML code example right inside the workflow in a sticky note. This code creates a functional recording interface you can use for testing or as a foundation for your own design.

Who is this for?

  • Developers: Quickly add a transcription feature to your application by calling this webhook from your existing frontend or backend code.
  • No-code/Low-code builders: Embed a functional audio recorder and transcription service into your projects by using the example code found inside the workflow.
  • API enthusiasts: A lean, practical example of how to use n8n to wrap a service like OpenAI into your own secure and scalable API endpoint.

What problem does this solve?

  • Provides a ready-made API: Instantly gives you a secure webhook to handle audio file uploads and transcription processing without any server setup.
  • Decouples frontend from backend: Your application only needs to know about one simple webhook URL, allowing you to change the backend logic in n8n without touching your app's code.
  • Offers a clear implementation pattern: The included example code provides a working demonstration of how to send an audio file from a browser and handle the response—a pattern you can replicate in any framework.

How it works

This solution works by defining a clear API contract between your application (the client) and the n8n workflow (the backend).

  1. The client-side technique:

    • Your application's interface records or selects an audio file.
    • It then makes a POST request to the n8n webhook URL, sending the audio file as multipart/form-data.
    • It waits for the response from the webhook, parses the JSON body, and extracts the value of the Transcript key. You can see this exact pattern in action in the example code provided in the workflow's sticky note.
  2. The n8n workflow (backend):

    • The Webhook node catches the incoming POST request and grabs the audio file.
    • The HTTP Request node sends this file to the OpenAI API.
    • The Set node isolates the transcript text from the API's response.
    • The Respond to Webhook node sends a clean JSON object ({"Transcript": "your text here..."}) back to your application.

Setup

  1. Configure the n8n workflow:
    • In the Transcribe with OpenAI node, add your OpenAI API credentials.
    • Activate the workflow to enable the endpoint.
    • Click the "Copy" button on the Webhook node to get your unique Production Webhook URL.
  2. Integrate with the frontend:
    • Inside the workflow, find the sticky note labeled "Example Frontend Code Below". Copy the complete HTML from the note below it.
    • ⚠️ Important: In the code you just copied, find the line const WEBHOOK_URL = 'YOUR WEBHOOK URL'; and replace the placeholder with the Production Webhook URL from n8n.
    • Save the code as an HTML file and open it in your browser to test.

Taking it further

  • Save transcripts: Add an Airtable or Google Sheets node to log every transcript that comes through the workflow.
  • Error handling: Enhance the workflow to catch potential errors from the OpenAI API and respond with a clear error message.
  • Analyze the transcript: Add a Language Model node after the transcription step to summarize the text, classify its sentiment, or extract key entities before sending the response.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Transcribe with OpenAI

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 2 - Extract transcript

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Webhook containing audio to transcribe

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 4 - Respond to Webhook with transcript

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.3

Block 5 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Create a speech-to-text API with OpenAI GPT4o-mini transcribe
Complexity intermediate
Nodes 10
Categories Document Extraction, Multimodal AI
Author Guillaume Duvernay
Published 12 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5925/5925.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Create a speech-to-text API with OpenAI GPT4o-mini transcribe do?

Description This template provides a simple and powerful backend for adding speech to text capabilities to any application. It creates a dedicated webhook that receives an audio file, transcribes i...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, Multimodal AI use case.