LeapFun for n8n
A community node that turns text into speech inside any n8n workflow, with the same engines, voices and director's note as the app. Install it in a minute, paste one key, and the MP3 arrives as a binary item ready for Drive, Telegram, a CMS or the next node.
Package n8n-nodes-leapfun. Works on every LeapFun plan, Free included.
Install and connect
- Install the nodeIn n8n open Settings → Community Nodes, choose Install and enter
n8n-nodes-leapfun. Accept the community-node notice; the LeapFun node shows up in the node panel.
- Create a keyIn the LeapFun app open Settings → Developer API and create a key. It starts with
lf_sk_ and is shown once.
- Add the credentialIn n8n add a LeapFun API credential and paste the key. Base URL stays at its default,
https://api.leapfun.ai/v1. The credential test calls GET /v1/usage and shows your balance.
Self-hosted n8n works today: community nodes are enabled by default, and if the install option is missing your administrator has turned them off. On n8n Cloud, community nodes appear once n8n has verified them; LeapFun's verification is in review.
Operations
| Resource → Operation | What it does | Output |
| Speech → Generate | Turns the text of each incoming item into speech. Required: Text, Engine (Ultra, Pro, Expressive, Turbo), Voice (picked from your catalog, cloned and designed voices included). | One binary item per input item (MP3 by default) plus JSON: jobId, creditsUsed, engine, voice, durationSeconds |
| Voice → Get Many | Lists the voices your workspace can use, with id, name, languages and engines. Filter by engine or language to feed a dropdown or a Switch node. | One JSON item per voice |
| Usage → Get | Reads the credit balance and this period's spend, app and API together. Useful as a guard before a large batch. | One JSON item: creditsRemaining, creditsUsedThisPeriod, plan |
Options on Speech → Generate
Every option is optional; the engine decides which ones apply. Ultra and Pro voices read the director's note, Expressive reads emotion tags in the text, Turbo takes speed only.
| Option | What it does | Example |
| Speed | Playback rate of the read. | 0.9 for a slower audiobook pace |
| Emotion | The overall feeling of the read. | cheerful, calm, serious |
| Style | The kind of delivery. | conversational, documentary narrator, ad read |
| Pace | How the speaker moves through the lines, as a direction rather than a number. | unhurried, pause after each question |
| Accent | Regional accent for the voice. | light Irish, neutral American |
| Director's Note | Free-text direction that can hold all of the above in one sentence, the way you would brief a voice actor. | warm and unhurried, like reading to a friend |
| Exaggeration | How strongly emotion tags are performed (Expressive). | 0.5 default, up to 1 |
| Output Format | The audio container. | mp3 (default) or wav |
| Put Output File in Field | The binary property that receives the audio. | data (default) |
| File Name | The file name on the binary item; expressions welcome. | {{ $json.title }}.mp3 |
Up to 5,000 characters per item. Longer scripts: split with a Code node or the Split Out node, then merge the audio.
Three workflows to start from
Each one is in the repository as an importable JSON file: n8n-nodes-leapfun/examples. Import, pick your credential, swap the folder or chat, run.
RSS→Script→LeapFun Ultra→Google Drive
News feed to daily audio brief
An RSS Trigger watches a feed. A Code node trims each article to its title and first paragraphs and writes a short spoken intro. Speech → Generate reads it on Ultra with the note brisk morning-news delivery, clear and friendly. The MP3 is uploaded to a dated Google Drive folder; the file name comes from the article title.
Google Sheets→LeapFun Pro→Drive link back
Spreadsheet of lines to voiced files
A Google Sheets node reads the rows of a sheet with columns for text, voice and language. Each row becomes one Speech → Generate call on Pro, with the voice mapped from the row. The audio goes to Drive, and a second Sheets node writes the shareable link back into the same row, so the sheet becomes the delivery list.
Telegram→LeapFun Turbo→Voice reply
Text message in, voice message out
A Telegram Trigger receives a text message. Speech → Generate reads it on Turbo, the fastest tier, with output format set to the voice-note friendly default. A Telegram node sends the audio back as a reply in the same chat. Add a Switch on the message language to pick a voice per language.
Error messages
The node turns API errors into plain sentences in the n8n execution log. Turn on Continue On Fail on the node to keep a batch running past a single bad item.
| Status | Message shown in n8n | What to do |
| 401 | The API key was not accepted. Check the LeapFun credential. | Paste the key again; a revoked key stays revoked. |
| 402 | Not enough credits for this request. Top up at app.leapfun.ai/billing. | Add credits or wait for the monthly refill; a Usage → Get node before the batch avoids this. |
| 403 | LeapFun refused this request for your plan or workspace role. Check leapfun.ai/pricing or ask a workspace admin. | Every plan includes the API; a 403 means your workspace role cannot generate audio. |
| 413 | The text is longer than 5,000 characters. Split it into smaller items. | Use Split Out or a Code node to cut the text before the LeapFun node. |
| 429 | LeapFun rate limit reached. Add a Wait node or reduce parallel items. | Creator allows 30 requests a minute, Pro 120, Team 300. A Wait node of two seconds between items keeps Creator under the limit. |
Using the node as an AI Agent tool
The LeapFun node can be attached to an AI Agent node as a tool, so an agent can decide to speak a result. Two things to know:
- On self-hosted n8n, community nodes are only offered as tools when the instance starts with
N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true. Without it the node runs in normal workflows but does not appear in the tool list.
- The agent receives only the JSON output of the node (
jobId, creditsUsed, engine, voice, durationSeconds), not the audio. Keep the binary item flowing to a later node, for example a Telegram or Drive node after the agent, to deliver the file.
Agents can call a tool many times in one run. Pair the tool with a Usage → Get check or a Wait node when the agent handles long lists, so one conversation cannot spend a month of credits.
Give your workflow a voice
Create a key, install the node, and your first MP3 is three nodes away.
Create an API key