Actions20
Overview
This node integrates with the Tavus API to manage AI-driven personas, which are customizable AI characters defined by system prompts and other settings. The "Create Persona" operation allows users to create a new persona by specifying its name, system prompt, pipeline mode, and optional context, default replica ID, and layers configuration.
Use cases include:
- Creating AI personas for conversational agents or virtual assistants.
- Defining custom AI personalities with specific behaviors via system prompts.
- Setting up personas that can be used in video generation, conversations, or speech synthesis workflows.
For example, you might create a persona named "Support Agent" with a system prompt that instructs it to respond politely and helpfully, enabling automated customer support interactions.
Properties
| Name | Meaning |
|---|---|
| Persona Name | A name for the persona being created. |
| System Prompt | The system prompt text defining the persona's behavior and personality. |
| Pipeline Mode | The processing mode for the persona; options are: "Full" (complete processing) or "Echo". |
| Context | Optional additional context information for the persona. |
| Default Replica ID | Optional default replica identifier associated with the persona. |
| Layers | Optional JSON configuration defining layers for the persona's setup or behavior. |
Output
The node outputs a JSON object representing the newly created persona as returned by the Tavus API. This typically includes details such as the persona's unique ID, name, system prompt, pipeline mode, context, default replica ID, layers configuration, creation timestamps, and other metadata.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the Tavus API using an API key credential configured in n8n.
- The node depends on the
tavusApiRequesthelper function to make authenticated HTTP requests to the Tavus API endpoints. - Proper network access to the Tavus API endpoint is necessary.
Troubleshooting
- Invalid JSON in Layers: If the "Layers" property contains invalid JSON, the node will throw an error stating "Layers must be valid JSON". Ensure the JSON syntax is correct.
- Missing Required Fields: Omitting required fields like "Persona Name", "System Prompt", or "Pipeline Mode" will cause validation errors.
- API Authentication Errors: If the API key credential is missing or invalid, the node will fail to authenticate with the Tavus API.
- Network Issues: Connectivity problems to the Tavus API endpoint may result in request timeouts or failures.
- Unexpected API Errors: The node surfaces error messages from the Tavus API; review these messages for guidance on resolving issues.
Links and References
- Tavus API Documentation (for detailed API usage and persona configuration)
- n8n Documentation on Creating Custom Nodes