HumanFirst icon

HumanFirst

Call HumanFirst playbook API

Overview

The node integrates with the HumanFirst API to perform various operations related to playbooks, prompts, pipelines, and conversation data. Specifically, for the Import Document operation, it uploads a document file to a specified Conversation Source within a namespace and optionally triggers indexing of that document.

This operation is useful when you want to add new documents (e.g., PDFs, text files) into a conversation dataset managed by HumanFirst, enabling further processing such as search indexing or analysis.

Practical example:
You have a collection of customer support manuals in PDF format that you want to upload into your HumanFirst conversation source so that they become searchable and usable in your AI workflows. Using this node's Import Document operation, you can automate uploading these files directly from your workflow.


Properties

Name Meaning
Namespace The namespace under which the conversation source exists; a required identifier for scoping the import.
Conversation Source Name or ID Select or specify the target conversation source where the document will be imported.
File Name The name of the file being uploaded (e.g., "manual.pdf"); required for proper identification.
File to Upload (Binary Property) The binary property name on the input item that contains the file data to upload (default: "data").
Prevent Trigger Boolean flag indicating whether to prevent automatic indexing trigger after upload (true means no trigger).

Output

  • The output JSON contains the response from the HumanFirst API after uploading the document.
  • The structure typically includes metadata about the uploaded file and status information.
  • No binary output is produced by this operation.
  • Example output JSON might include confirmation of upload success and any relevant IDs or messages returned by the API.

Dependencies

  • Requires an API key credential for authenticating with the HumanFirst API.
  • The node uses HTTP requests to the HumanFirst REST endpoints.
  • The binary file data must be provided on the input item under the specified binary property.
  • No additional environment variables are needed beyond the API key credential configuration.

Troubleshooting

  • Error: "You must select a Conversation Source before importing a document."
    This occurs if the conversation source parameter is empty. Ensure you select or provide a valid conversation source ID.

  • Error: No binary property "X" found on the input item.
    The node expects the file data in a binary property named as specified (default "data"). Confirm the input item contains the binary data under the correct property name.

  • Upload failures due to authentication errors
    Verify that the API key credential is correctly configured and has sufficient permissions.

  • File format issues
    The node sets the content type as "application/octet-stream". If the API rejects the file, confirm the file is supported and not corrupted.


Links and References

Discussion