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)
| Name | Description | Data Type | Required? | Example |
|---|---|---|---|---|
| Project name | Name of the Ahoy Data Intelligence project to receive the document. If a project with this name does not already exist, Wrk creates it automatically | Text (Short) | Yes | Wrk Product Knowledge |
| Source type | Select whether the source is a Wrk file or raw text | Choice list | Yes | File |
| File | File to upload when Source type is File. Supported formats: PDF, CSV, TXT, MD, common images, DOC/DOCX, PPT/PPTX, XLS/XLSX, HTML/XHTML | File | Conditional | SOP.pdf |
| Text | Text to convert to Markdown and upload when Source type is Text | Text (Long) | Conditional | Refund requests must be reviewed within 2 business days. |
| Document name | Filename for text-based documents when Source type is Text. Automatically appends .md if not provided | Text (Short) | Conditional | Support SOP.md |
| Description | Human-readable document description. Ahoy maximum length: 250 characters | Text (Long) | No | Customer support operating procedure |
| Metadata | JSON object supplied as a string. Invalid JSON is rejected before upload | Text (Long) | No | {"department":"support"} |
| Existing filename behavior | How 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 Skip | Choice list | No | Skip |
| Wait until processing finishes | When true, poll document status after upload. Defaults to true | True/False | No | true |
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)
| Name | Description | Data Type | Required? | Example |
|---|---|---|---|---|
| Document ID | ID of the uploaded or existing skipped document | Text (Short) | No | doc_456 |
| Filename | Filename returned by Ahoy or matched during Skip | Text (Short) | No | SOP.pdf |
| Upload status | Status returned for the upload | Text (Short) | No | accepted |
| Processing status | Latest processing status. Initial upload status is typically pending | Text (Short) | No | pending |
| Existing document skipped | True when Existing filename behavior is Skip and a matching document was found | True/False | Yes | false |
| Processing error | Latest processing error returned by document status | Text (Long) | No | |
| Failure reason | Terminal pre-processing failure reason when returned, such as expired_no_upload | Text (Long) | No |
Outcomes
| Name | Description |
|---|---|
| Success | This status is selected if the job has successfully completed. |
Requirements
- N/A