Skip to main content

Add a document

Add a file or text document to an Ahoy Data Intelligence project for indexing and question answering.

API documentation: https://www.ahoyams.com/marketplace/cbe0812f-2def-46ec-a73c-788f97ff2c2a#description/introduction

Application

  • Ahoy Data Intelligence

Inputs (what you have)

NameDescriptionData TypeRequired?Example
Project nameName of the Ahoy Data Intelligence project to receive the document. If a project with this name does not already exist, Wrk creates it automaticallyText (Short)YesWrk Product Knowledge
Source typeSelect whether the source is a Wrk file or raw textChoice listYesFile
FileFile to upload when Source type is File. Supported formats: PDF, CSV, TXT, MD, common images, DOC/DOCX, PPT/PPTX, XLS/XLSX, HTML/XHTMLFileConditionalSOP.pdf
TextText to convert to Markdown and upload when Source type is TextText (Long)ConditionalRefund requests must be reviewed within 2 business days.
Document nameFilename for text-based documents when Source type is Text. Automatically appends .md if not providedText (Short)ConditionalSupport SOP.md
DescriptionHuman-readable document description. Ahoy maximum length: 250 charactersText (Long)NoCustomer support operating procedure
MetadataJSON object supplied as a string. Invalid JSON is rejected before uploadText (Long)No{"department":"support"}
Existing filename behaviorHow to handle an existing document with the same filename. Add keeps existing matches; Skip avoids duplicate indexing; Replace removes matching documents before adding. Defaults to SkipChoice listNoSkip
Wait until processing finishesWhen true, poll document status after upload. Defaults to trueTrue/FalseNotrue

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data Library section. These variables in the Data Library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

NameDescriptionData TypeRequired?Example
Document IDID of the uploaded or existing skipped documentText (Short)Nodoc_456
FilenameFilename returned by Ahoy or matched during SkipText (Short)NoSOP.pdf
Upload statusStatus returned for the uploadText (Short)Noaccepted
Processing statusLatest processing status. Initial upload status is typically pendingText (Short)Nopending
Existing document skippedTrue when Existing filename behavior is Skip and a matching document was foundTrue/FalseYesfalse
Processing errorLatest processing error returned by document statusText (Long)No
Failure reasonTerminal pre-processing failure reason when returned, such as expired_no_uploadText (Long)No

Outcomes

NameDescription
SuccessThis status is selected if the job has successfully completed.

Requirements

  • N/A