Actions3
- Write with Your Persona Actions
- Training Actions
Overview
The node integrates with the ToneClone API to upload text content for training a custom persona. This allows users to enhance their AI writing model by providing personalized training data, making the generated text better reflect their unique voice and style.
Typical use cases include:
- Uploading textual documents or notes to train a persona on specific writing styles or domain knowledge.
- Incrementally improving a persona's performance by adding new training content.
- Automating the process of feeding training data into ToneClone from various sources within an n8n workflow.
For example, a user might upload a set of blog posts or emails as training content to create a persona that writes in a consistent tone matching their brand voice.
Properties
| Name | Meaning |
|---|---|
| Persona Name or ID | Select the persona to train with this content. Built-in personas cannot be trained. Choose from the list or specify an ID using an expression. |
| Content | The text content to upload for training. Enter the actual text you want to use to train your persona. |
| Filename | Name for the training file. If the filename does not end with .txt, the node appends .txt automatically. |
Output
The node outputs a JSON object containing details about the uploaded training file and its association with the specified persona. Key fields include:
content: The original text content uploaded.filename: The name of the training file stored in ToneClone.personaId: The ID of the persona the content was uploaded to.operation: The string"uploadText"indicating the performed operation.associated: A boolean flag (true) confirming the file is linked to the persona.- Additional metadata returned by the ToneClone API (excluding internal keys like PK, SK, userId, s3Key).
No binary data output is produced for this operation.
Dependencies
- Requires an API key credential for authenticating with the ToneClone API.
- The node uses the ToneClone API base URL configured in credentials.
- The node expects the user to have created personas in the ToneClone system prior to uploading training content.
- Network access to the ToneClone API endpoints
/files/textand/personas/{personaId}/filesis necessary.
Troubleshooting
- Missing or invalid API credentials: The node will fail if the API key or base URL is not properly configured. Ensure credentials are set up correctly.
- Persona selection issues: Built-in personas cannot be trained. Make sure to select or specify a valid custom persona ID.
- API response missing file ID: If the API does not return a file identifier after uploading text, the node throws an error stating "ToneClone API did not return a fileId for uploaded text." Check the content format and API status.
- Filename formatting: The node appends
.txtif the provided filename lacks this extension. Providing a proper filename helps avoid confusion. - Network errors or timeouts: Verify network connectivity and API availability if requests fail.
Links and References
- ToneClone Official Website — For managing personas and training data.
- n8n Expressions Documentation — For using expressions to specify dynamic property values.