Narratheque Text icon

Narratheque Text

Noeux qui permet d'interagir avec la Narrathèque et d'y ajouter un texte dans ses companies

Overview

This node allows users to send text content directly to the Narrathèque service by uploading it as a text file. It is useful for automating the addition of textual documents into the Narrathèque system without manual file handling. Typical use cases include archiving notes, transcripts, or any textual data into Narrathèque for further processing or storage.

For example, you can dynamically generate text content in a workflow and immediately upload it to Narrathèque with a custom filename, enabling seamless integration between your data sources and the Narrathèque repository.

Properties

Name Meaning
Narratheque Choice Selects the predefined Narrathèque API endpoint to use: "Europe" (https://api.narratheque.io) or "Canada" (https://api.narratheque.ca).
Custom Install Boolean toggle to decide whether to use a custom Narrathèque URL instead of the predefined options.
Custom URL If "Custom Install" is enabled, specify the full custom URL of the Narrathèque API endpoint here.
Text Content The actual text string to be uploaded to Narrathèque. This is required and represents the document content.
Filename (Optional) Optional custom filename for the uploaded text file. If provided, ".txt" will be appended if missing.

Output

The node outputs an array with one item per input. Each output item contains a json object with the following structure:

  • status: A string indicating the upload status, e.g., "Uploaded via dynamic text content".
  • filename: The final filename used for the uploaded text file, including an index suffix to ensure uniqueness.
  • response: The raw response data returned from the Narrathèque API after the upload request.

If no filename is provided, the node generates a default filename in the format import-text-n8n-{index}.txt, where {index} corresponds to the item number starting at 1.

The node does not output binary data; it uploads the text content as a UTF-8 encoded .txt file.

Dependencies

  • Requires an API authentication token credential to access the Narrathèque API.
  • Uses the Axios HTTP client to perform POST requests.
  • Uses FormData to construct multipart/form-data payloads for file upload.
  • Requires network access to the selected Narrathèque API endpoint (either predefined or custom).

Troubleshooting

  • Missing or invalid text content: The node throws an error if the "Text Content" property is empty or not a string. Ensure that valid text is provided.
  • API request failures: Errors during the HTTP POST request to the Narrathèque API will cause the node to throw an error specifying which item failed and the error message. Common causes include invalid API tokens, incorrect URLs, or network issues.
  • Filename issues: If a custom filename is provided without the .txt extension, the node appends it automatically. Avoid using unsupported characters in filenames.
  • Credential errors: Make sure the API token credential is correctly configured and has sufficient permissions to upload documents.

Links and References

Discussion