HumanFirst icon

HumanFirst

Call HumanFirst playbook API

Overview

The "Import CSV File" operation of this HumanFirst node allows users to import CSV data into a conversation set within a specified namespace. This is useful for ingesting structured conversational data, such as chat logs or transcripts, into the HumanFirst platform for further analysis, training, or processing.

Typical scenarios include:

  • Uploading customer-agent conversation records for training AI models.
  • Importing historical chat data to enrich conversation sources.
  • Feeding metadata-enriched utterances for improved analytics.

For example, a user might have a CSV export of support chat transcripts with columns for timestamps, speaker roles, and message text. Using this node, they can import that CSV directly into a designated conversation source in HumanFirst, optionally specifying which columns correspond to IDs, dates, roles, and text.

Properties

Name Meaning
Namespace The namespace under which the conversation set exists. Required to identify the target environment.
Conversation Source Name or ID Select or specify the conversation source dataset where the CSV will be imported.
File Data (Raw or Base64 Gzipped) The CSV file content encoded as a base64 string, optionally gzipped. This is the actual data to import.
File Name The name of the CSV file being uploaded. Used for identification and logging.
Format The format of the import file. Currently supports only "Simple CSV".
Header Included Boolean indicating if the first row of the CSV contains column headers.
Import Only As Utterances If true, imports the CSV data solely as utterances without additional metadata mapping.
ID Column Index (If not importing only utterances) The zero-based index of the column containing unique IDs for each row.
Date Column Index (If not importing only utterances) The zero-based index of the column containing date/time information.
Date Column Format (If not importing only utterances) The format of the date column. Options include: Date First, Month First, RFC3339, Slash Month First, Unix Milliseconds, Unix Seconds. Defaults to Unix Milliseconds.
Source Role Column Index (If not importing only utterances) The zero-based index of the column indicating the role/source of the speaker (e.g., client or agent).
Client Role Name (If not importing only utterances) The string label used to identify the client role in the conversation.
Agent Role Name (If not importing only utterances) The string label used to identify the agent role in the conversation.
Text Column Index The zero-based index of the column containing the main text content of each row. Required.
Metadata Columns Indexes (Comma-Separated) Optional comma-separated list of zero-based column indexes to treat as metadata fields. If left blank, the node attempts to auto-derive metadata columns by excluding known columns like ID, date, source, and text.
Delimiter The delimiter character used in the CSV file (default is comma).

Output

The node outputs an array of JSON objects representing the response from the HumanFirst API after uploading the CSV file. Each output item contains a json field with the API's response data, which typically includes status information about the import operation.

No binary data is output for this operation.

Dependencies

  • Requires an API key credential for the HumanFirst API to authenticate requests.
  • The node uses the HumanFirst REST API endpoints to upload files and manage conversation sets.
  • The CSV file data must be provided as a base64-encoded string, optionally gzipped.
  • The node internally decompresses gzipped input if necessary before uploading.

Troubleshooting

  • Missing Conversation Source: If no conversation source is selected, the node throws an error prompting the user to select one.
  • Invalid File Data: If the file data is missing or improperly encoded, the import will fail.
  • Incorrect Column Indexes: Specifying invalid or out-of-range column indexes for ID, date, source role, or text may cause incorrect parsing or errors.
  • Date Format Mismatch: Using the wrong date format option for the date column can lead to failed date parsing.
  • API Authentication Errors: Ensure the API key credential is valid and has sufficient permissions.
  • File Name Extension: The node appends .csv.gz to the filename if not already present to indicate gzip compression; incorrect naming might cause issues on the server side.

Links and References

Discussion