Skip to content

Commit 6d04e20

Browse files
Add n8n integration documentation
Co-Authored-By: Ryan Seams <ryan.seams@gmail.com>
1 parent e95a3a3 commit 6d04e20

File tree

3 files changed

+267
-0
lines changed

3 files changed

+267
-0
lines changed

fern/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ navigation:
333333
path: pages/06-integrations/zapier.mdx
334334
- page: Make
335335
path: pages/06-integrations/make.mdx
336+
- page: n8n
337+
path: pages/06-integrations/n8n.mdx
336338
- page: Postman
337339
path: pages/06-integrations/postman.mdx
338340
- section: Meeting transcriber tools

fern/pages/06-integrations/index.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ AssemblyAI seamlessly integrates with a variety of tools and platforms to enhanc
5959
>
6060
Build complex automation scenarios with Make's visual workflow builder.
6161
</Card>
62+
<Card
63+
title="n8n"
64+
icon="diagram-project"
65+
href="/docs/integrations/n8n"
66+
>
67+
Automate workflows with n8n's fair-code automation platform and integrate AssemblyAI.
68+
</Card>
6269
<Card
6370
title="Activepieces"
6471
icon="puzzle-piece"

fern/pages/06-integrations/n8n.mdx

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
---
2+
title: "n8n Integration with AssemblyAI"
3+
description: "Use AssemblyAI with n8n to transcribe and analyze audio in your automation workflows."
4+
hide-nav-links: true
5+
---
6+
7+
[n8n](https://n8n.io/) is a powerful workflow automation tool that allows you to connect various services and build complex automations without extensive coding. With n8n's HTTP Request node, you can integrate AssemblyAI's speech-to-text and audio intelligence capabilities into your workflows to transcribe audio files, analyze conversations, and extract insights.
8+
9+
n8n offers both a cloud-hosted version and a self-hosted option, giving you flexibility in how you deploy your automations.
10+
11+
## Prerequisites
12+
13+
Before you begin, you'll need:
14+
15+
- An [AssemblyAI API key](https://www.assemblyai.com/app/api-keys)
16+
- An n8n account (either [n8n Cloud](https://app.n8n.cloud/register) or a self-hosted instance)
17+
18+
## Quickstart
19+
20+
This guide shows you how to transcribe an audio file using AssemblyAI in an n8n workflow.
21+
22+
<Steps>
23+
<Step>
24+
25+
Create a new workflow in n8n or open an existing one. Add an HTTP Request node to your workflow canvas.
26+
27+
</Step>
28+
29+
<Step>
30+
31+
Configure the HTTP Request node to submit a transcription request to AssemblyAI:
32+
33+
1. Set **Method** to `POST`
34+
2. Set **URL** to `https://api.assemblyai.com/v2/transcript`
35+
3. Under **Authentication**, select **Generic Credential Type** and choose **Header Auth**
36+
4. Create a new credential:
37+
- Set **Name** to `authorization`
38+
- Set **Value** to your AssemblyAI API key
39+
5. Under **Body**, select **JSON** and add your transcription parameters:
40+
41+
```json
42+
{
43+
"audio_url": "https://example.com/your-audio-file.mp3"
44+
}
45+
```
46+
47+
</Step>
48+
49+
<Step>
50+
51+
Add a second HTTP Request node to poll for the transcript result:
52+
53+
1. Set **Method** to `GET`
54+
2. Set **URL** to `https://api.assemblyai.com/v2/transcript/{{$json["id"]}}`
55+
- This uses the transcript ID from the previous step
56+
3. Use the same **Header Auth** credential you created earlier
57+
58+
</Step>
59+
60+
<Step>
61+
62+
Add a **Wait** node between the two HTTP Request nodes to give AssemblyAI time to process the audio. Configure it to wait for a reasonable amount of time based on your audio length (e.g., 30 seconds for short files).
63+
64+
Alternatively, you can use a **Loop** node with a condition to poll the transcript status until it's `completed` or `error`.
65+
66+
</Step>
67+
68+
<Step>
69+
70+
Test your workflow. The final HTTP Request node will return the completed transcript with the transcribed text and any additional features you enabled.
71+
72+
</Step>
73+
</Steps>
74+
75+
## Using AssemblyAI Features
76+
77+
You can enable various AssemblyAI features by adding parameters to the JSON body in your initial transcription request:
78+
79+
### Speaker Diarization
80+
81+
Identify different speakers in your audio:
82+
83+
```json
84+
{
85+
"audio_url": "https://example.com/your-audio-file.mp3",
86+
"speaker_labels": true
87+
}
88+
```
89+
90+
### Sentiment Analysis
91+
92+
Analyze the sentiment of the transcribed text:
93+
94+
```json
95+
{
96+
"audio_url": "https://example.com/your-audio-file.mp3",
97+
"sentiment_analysis": true
98+
}
99+
```
100+
101+
### Auto Chapters
102+
103+
Automatically segment your audio into chapters:
104+
105+
```json
106+
{
107+
"audio_url": "https://example.com/your-audio-file.mp3",
108+
"auto_chapters": true
109+
}
110+
```
111+
112+
### PII Redaction
113+
114+
Redact personally identifiable information:
115+
116+
```json
117+
{
118+
"audio_url": "https://example.com/your-audio-file.mp3",
119+
"redact_pii": true,
120+
"redact_pii_policies": ["medical_condition", "credit_card_number", "ssn"]
121+
}
122+
```
123+
124+
### Entity Detection
125+
126+
Extract entities like names, organizations, and locations:
127+
128+
```json
129+
{
130+
"audio_url": "https://example.com/your-audio-file.mp3",
131+
"entity_detection": true
132+
}
133+
```
134+
135+
## Common Workflow Patterns
136+
137+
### Transcribe and Store in Google Sheets
138+
139+
1. Use the HTTP Request nodes to transcribe audio with AssemblyAI
140+
2. Add a Google Sheets node to append the transcript to a spreadsheet
141+
3. Map the transcript text and metadata to your sheet columns
142+
143+
### Transcribe and Send via Email
144+
145+
1. Transcribe audio using AssemblyAI
146+
2. Add a Gmail or Send Email node
147+
3. Include the transcript text in the email body
148+
149+
### Transcribe and Analyze with AI
150+
151+
1. Transcribe audio with AssemblyAI
152+
2. Add an OpenAI or other LLM node
153+
3. Use the transcript as input for further analysis, summarization, or question answering
154+
155+
### Process Audio from Cloud Storage
156+
157+
1. Add a trigger node for Google Drive, Dropbox, or S3
158+
2. When a new audio file is uploaded, get its public URL
159+
3. Submit the URL to AssemblyAI for transcription
160+
4. Store or process the results as needed
161+
162+
## Polling for Transcript Completion
163+
164+
Since transcription is asynchronous, you need to poll for the result. Here's a recommended approach:
165+
166+
1. Submit the transcription request and capture the transcript ID
167+
2. Use a **Loop** node with the following configuration:
168+
- Add an HTTP Request node inside the loop to check the transcript status
169+
- Add an **IF** node to check if `status` equals `completed` or `error`
170+
- If not complete, add a **Wait** node (e.g., 5 seconds) before the next iteration
171+
- Exit the loop when the status is `completed` or `error`
172+
173+
## Using Webhooks for Completion Notifications
174+
175+
For a more efficient approach, you can use webhooks instead of polling:
176+
177+
<Steps>
178+
<Step>
179+
180+
Add a **Webhook** node to your workflow and copy the webhook URL.
181+
182+
</Step>
183+
184+
<Step>
185+
186+
In your initial transcription request, add the webhook URL:
187+
188+
```json
189+
{
190+
"audio_url": "https://example.com/your-audio-file.mp3",
191+
"webhook_url": "https://your-n8n-instance.com/webhook/your-webhook-id"
192+
}
193+
```
194+
195+
</Step>
196+
197+
<Step>
198+
199+
When the transcription is complete, AssemblyAI will send a POST request to your webhook with the transcript ID. You can then retrieve the full transcript using another HTTP Request node.
200+
201+
</Step>
202+
</Steps>
203+
204+
## Uploading Local Files
205+
206+
If your audio file is not publicly accessible, you can upload it to AssemblyAI first:
207+
208+
<Steps>
209+
<Step>
210+
211+
Add an HTTP Request node to upload the file:
212+
213+
1. Set **Method** to `POST`
214+
2. Set **URL** to `https://api.assemblyai.com/v2/upload`
215+
3. Use **Header Auth** with your API key
216+
4. Under **Body**, select **Binary File** and select your audio file
217+
218+
</Step>
219+
220+
<Step>
221+
222+
The upload will return an `upload_url`. Use this URL as the `audio_url` in your transcription request.
223+
224+
</Step>
225+
</Steps>
226+
227+
## Error Handling
228+
229+
Add error handling to your workflow to manage failed transcriptions:
230+
231+
1. Use the **IF** node to check if the transcript status is `error`
232+
2. Add nodes to handle the error case (e.g., send a notification, log the error)
233+
3. Access the error message in `$json["error"]`
234+
235+
## Additional Resources
236+
237+
- [n8n AssemblyAI Integration Page](https://n8n.io/integrations/assemblyai/)
238+
- [n8n HTTP Request Node Documentation](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)
239+
- [AssemblyAI API Reference](/api-reference)
240+
- [n8n Workflow Templates](https://n8n.io/workflows/)
241+
242+
## Example Use Cases
243+
244+
### Meeting Transcription Pipeline
245+
246+
Automatically transcribe meeting recordings uploaded to cloud storage, extract action items using sentiment analysis and entity detection, and send summaries to team members.
247+
248+
### Podcast Processing
249+
250+
Transcribe podcast episodes, generate chapters automatically, create searchable transcripts, and publish them to your CMS.
251+
252+
### Customer Support Analysis
253+
254+
Transcribe support calls, analyze sentiment, detect PII for compliance, and store insights in your CRM or database.
255+
256+
### Content Moderation
257+
258+
Transcribe user-generated audio content, use content moderation to flag inappropriate content, and automatically filter or review flagged items.

0 commit comments

Comments
 (0)