how can we transcribe a video from the url in n8n, is that possible?
- User
how can we transcribe a video from the url in n8n, is that possible?
- Assistant
Yes, it's possible to transcribe a video from a URL in n8n, but it requires a few steps because n8n itself doesn't have a built-in video transcription node. Instead, you typically:
- Download or access the video/audio from the URL.
- Extract or convert audio if necessary.
- Send the audio to a transcription service (like OpenAI Whisper via API, Google Speech-to-Text, AssemblyAI, etc.).
- Receive and use the transcription result.
Step-by-step approach in n8n
1. Download Video or Audio from URL
- Use the HTTP Request node to download the video file from the given URL.
- Alternatively, if the video is hosted on a platform like YouTube, you might need an external service or custom code (e.g., youtube-dl) to get the direct audio URL or download audio.
2. Extract Audio (Optional)
- If you only need the audio (many transcription services accept audio files), you might need an external service or run a custom script (via the Execute Command or Function node if you have FFmpeg installed on the server).
- Unfortunately, n8n itself doesn’t have native video/audio conversion nodes yet.
3. Send Audio to Transcription Service
- Use the HTTP Request node to call a transcription API.
- For example, if using OpenAI Whisper (via the OpenAI API), you can upload the audio file or link it depending on API details and get the transcription back.
- Other services offer dedicated endpoints for audio transcription.
4. Handle Transcription Response
- The response from the API usually contains the transcribed text.
- You can process this text in n8n as needed.
Example: Using OpenAI Whisper API in n8n
Assuming you have the audio file:
- Use HTTP Request node (
POST) to request transcription:
POST https://api.openai.com/v1/audio/transcriptions Headers: Authorization: Bearer YOUR_OPENAI_API_KEY Form Data: file: (attach audio file) model: whisper-1- Process the JSON response for the transcription text.
Summary
- n8n can orchestrate downloading, processing, and sending to transcription services.
- Direct video transcription from URL inside n8n alone is rarely feasible; external steps/tools are usually necessary.
- Common workflow: HTTP Request (download) → possibly convert → HTTP Request (transcribe) → use transcription.
If you give the exact video URL source and transcription preference, I can help craft a more specific n8n workflow.
- User
its a youtube video url ,can't download
- Assistant
YouTube videos are typically protected from direct downloads due to platform policies, so downloading them within n8n using only native nodes isn’t straightforward. However, you can still transcribe YouTube videos by using external services or tools to extract audio or by integrating youtube-dl (or yt-dlp), then sending the audio to a transcription API.
Here are some options to achieve this transcription in n8n:
Option 1: Use a Hosted Service to Extract YouTube Audio + Transcribe
Example services:
- AssemblyAI offers direct YouTube audio URL transcription.
- Deepgram supports direct YouTube URLs.
- Other speech-to-text APIs might have YouTube URL support.
Workflow:
- Use an HTTP Request node in n8n to send the YouTube URL to the transcription API.
- Service processes audio extraction and transcription.
- Receive transcription result in n8n to process/use.
Pros: Easy, no manual download required.
Cons: Usually paid services, limited free tier or need sign-up.
Option 2: Use a Custom External Script with yt-dlp & FFmpeg, Then Integrate with n8n
If you can run scripts on the same server as n8n or have a server where you can execute commands:
- Use yt-dlp (a YouTube downloader fork) to download and extract audio:
yt-dlp -x --audio-format mp3 -o 'audio.%(ext)s' <youtube-url>-
Then use FFmpeg if needed to convert, trim, etc.
-
In n8n, use the Execute Command node to run yt-dlp and extract audio.
-
Next, upload the audio file from your server using the HTTP Request node to your transcription service (OpenAI, AssemblyAI, etc.).
Pros: Full control, no third party limitation on downloads.
Cons: Requires server access, yt-dlp & FFmpeg installed, command line knowledge.
Option 3: Use a Third-Party Service to Get Transcript of YouTube Video
Some third-party websites or APIs provide on-demand transcription of YouTube videos (e.g., Otter.ai, sonix.ai).
You might:
- Manually generate transcript via these services.
- Or explore if they have APIs you can call from n8n.
Summary for your use case (YouTube URL + transcription in n8n):
Step Recommended Action Download Audio Use yt-dlpexternally or via Execute Command node (if server allows)Transcribe Audio Call transcription API (OpenAI Whisper, AssemblyAI, Deepgram) with audio file upload Get Transcript Parse API response and use in n8n workflow
Sample minimal n8n workflow (assuming audio available):
- Execute Command node — run
yt-dlpto download audio. - Read Binary File node — read downloaded audio.
- HTTP Request node — POST audio to transcription API.
- Set or Function node — process transcription text.
- Further usage (e.g., send email, save data).
If you don’t have server rights or can’t install yt-dlp, I'd suggest using a transcription API that supports direct YouTube URL input, such as AssemblyAI. You then just pass the YouTube URL in a request and get transcript back, no manual downloads required.
If you want, I can help you build an example n8n workflow with AssemblyAI or OpenAI Whisper depending on which approach you prefer. Just let me know!
- User
format this json: {video_id: "https://www.youtube.com/watch?v=niMkgYRZfMk&t=43s", format: true}
- Assistant
Here is the properly formatted JSON with correct syntax (keys and string values quoted):
{ "video_id": "https://www.youtube.com/watch?v=niMkgYRZfMk&t=43s", "format": true }