> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n

> Use SLNG in your n8n workflows with the n8n-nodes-slng community node.

The `n8n-nodes-slng` community node brings SLNG into your n8n workflows. It adds
two nodes: **SLNG**, an action node for text to speech, speech to text, and
outbound agent calls, and **SLNG Trigger**, which lets a voice agent call a
workflow as a tool during a call.

## Prerequisites

* A self-hosted n8n instance. n8n Cloud does not run unverified community nodes.
* An SLNG API key. Create one at
  [app.slng.ai/api-keys](https://app.slng.ai/api-keys), or see
  [Create your API key](/guides/get-started/quickstart#create-your-api-key).

## Install the node

<GitHub.Repo repo="slng-ai/n8n-nodes-slng" />

<Steps>
  <Step title="Open Community Nodes">
    In n8n, go to **Settings** then **Community Nodes** and click **Install**.
  </Step>

  <Step title="Install the package">
    Enter `n8n-nodes-slng` and confirm.
  </Step>

  <Step title="Restart n8n">
    Restart n8n so the nodes load. Do this again after each update.
  </Step>
</Steps>

## Add your SLNG credential

Both nodes authenticate with one credential.

<Steps>
  <Step title="Create the credential">
    Add a new **SLNG API** credential and paste your key. n8n validates it
    against `GET https://api.slng.ai/v1/me`.
  </Step>

  <Step title="Reuse it across nodes">
    The same credential covers the Voice API (`api.slng.ai`) and the Agents API
    (`api.agents.slng.ai`), so every SLNG node in a workflow can share it.
  </Step>
</Steps>

## The SLNG node

The **SLNG** node runs one operation per item.

| Resource       | Operation     | What it does                                                  |
| -------------- | ------------- | ------------------------------------------------------------- |
| Text to Speech | Generate      | Turns text into audio, returned as a binary file on the item. |
| Speech to Text | Transcribe    | Turns an audio file from a binary field into text.            |
| Agent          | Dispatch Call | Places an outbound call from a SLNG voice agent.              |

For **Dispatch Call**, the node confirms the agent has outbound telephony set up
before it places the call.

The **Model** and **Voice** fields are dropdowns filled live from the model
catalog, and the voice list follows the text to speech model you pick. Switch
either field to **By ID** to enter a model path or voice ID directly.

## The SLNG Trigger node

The **SLNG Trigger** node starts a workflow when a voice agent calls it as a
tool, mid-conversation. Use it to look something up, write to another system, or
run any logic while the call is live.

* **Tool type**: an **LLM tool** the agent chooses to call, or a **System tool**
  tied to a call lifecycle event.
* **Authentication**: verify incoming requests with **HMAC** or a **Bearer**
  token.
* **Response mode**: reply with **Using Last Node** to return a node's output to
  the agent, or **Immediately** to acknowledge and keep working.

Read the agent's arguments from `toolArguments`, not `$json.arguments`.

To wire a workflow up as an agent tool, see
[Use n8n for tools](/guides/agents/tools-and-mcp/n8n-for-tools).

## Next steps

* [Connect a phone number](/guides/agents/telephony/overview) and
  [dispatch outbound calls](/guides/agents/telephony/dispatch-calls) for agent
  calling.
* [Use n8n for tools](/guides/agents/tools-and-mcp/n8n-for-tools) to give an
  agent workflow-backed tools.
* The model catalog for [text to speech](/models/catalog/text-to-speech) and
  [speech to text](/models/catalog/speech-to-text).
