> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Files

> Fetch specific SharePoint files by path, link, or id and return fresh download URLs that can be used for example to upload creatives to ads platforms

Fetch specific SharePoint files by path, link, or id and return fresh download URLs that can be used for example to upload creatives to ads platforms.

|                      |                         |
| -------------------- | ----------------------- |
| **App**              | Microsoft SharePoint    |
| **Operation ID**     | `sharepoint_get_files`  |
| **Type**             | Action                  |
| **Connection**       | `sharepoint` (required) |
| **Credits per run**  | 1                       |
| **Agent / MCP tool** | Yes                     |

## Inputs

| Field        | Type                                          | Required | Default | Description                                                                                                           |
| ------------ | --------------------------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
| `site`       | string or SelectItem                          | No       | -       | SharePoint site the document library belongs to, or 'me' for the user's own OneDrive.                                 |
| `drive`      | string or SelectItem                          | No       | -       | Document library (drive) the files live in. Not needed when every entry in file\_paths is a full SharePoint link.     |
| `file_paths` | array (also accepts a comma-separated string) | No       | -       | File paths inside the library, e.g. 'Creative Ads/banner.png', or full SharePoint file links copied from the browser. |
| `file_ids`   | array (also accepts a comma-separated string) | No       | -       | File ids, e.g. from a previous List Files or Search Files run.                                                        |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

## Output

**Type**: `List[Dict]`

Returns the requested files with fresh download URLs.

**Fields**: `file_id`, `file_name`, `file_url`, `file_type`, `is_folder`, `size`, `modified_at`, `download_url`
