> For the complete documentation index, see [llms.txt](https://docs.corpdev.ai/corpdev.ai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.corpdev.ai/corpdev.ai-docs/excel-add-in/document-functions.md).

# DOCUMENT Functions

### Function List

* CORPDEV.GRDIVE\_INDEX
* CORPDEV.GRDIVE\_DOCUMENT\_QUESTION
* CORPDEV.GRDIVE\_DOCUMENT\_EXTRACT\_FIELD
* CORPDEV.GRDIVE\_DOCUMENT\_EXTRACT\_TEXT
* CORPDEV.GRDIVE\_DOCUMENT\_SUMMARIZE

***

### `CORPDEV.GRDIVE_INDEX(folderId)`

**Description:**\
Provides an index (like a Due Diligence document index) of documents and subfolders from a specified Google Drive folder.

**Parameters:**

* `folderId` (string): The ID of the Google Drive folder.

**Returns:**\
An index of documents and subfolders.

***

### `CORPDEV.GRDIVE_DOCUMENT_QUESTION(document_id, question)`

**Description:**\
Asks a question about a document and retrieves the answer.

**Parameters:**

* `document_id` (string): The ID of the document.
* `question` (string): The question to ask.

**Returns:**\
The answer to the question.

***

### `CORPDEV.GRDIVE_DOCUMENT_EXTRACT_FIELD(document_id, field_name, instructions, batch)`

**Description:**\
Extracts a specific field from a document.

**Parameters:**

* `document_id` (string): The ID of the document.
* `field_name` (string): The field to extract.
* `instructions` (string): Additional instructions.
* `batch` (number): Batch number.

**Returns:**\
The extracted field value.

***

### `CORPDEV.GRDIVE_DOCUMENT_EXTRACT_TEXT(document_id)`

**Description:**\
Extracts text from a specified document.

**Parameters:**

* `document_id` (string): The ID of the document.

**Returns:**\
The extracted text.

***

### `CORPDEV.GRDIVE_DOCUMENT_SUMMARIZE(document_id, instructions)`

**Description:**\
Summarizes a document and returns the summary.

**Parameters:**

* `document_id` (string): The ID of the document.
* `instructions` (string, optional): Instructions for summarization.

**Returns:**\
The summary of the document.

***
