> For the complete documentation index, see [llms.txt](https://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/plugin-back-end-actions/firestore-backend/get-a-single-document.md).

# Get a single document

This action performs a query to get a single document from a Firestore collection, from a given ID.

***

## <mark style="color:blue;">Inputs and Settings</mark>

<div align="left"><figure><img src="/files/hOLFaIeyorFKw0AMN82O" alt=""><figcaption></figcaption></figure></div>

### Collection

The name or ID of the collection you want to get the document from.

### Document ID

The ID of the document you want to get data from.

### Fields (1, 2, 3, ...)

The name or path (in dot notation) of the field you want to extract from the document.

For instance, if you you want to extract the content of the field "description" on the document, that's the name you should put on this setting.

<figure><img src="/files/bvEYOklYMHJyY2XqdpJH" alt=""><figcaption></figcaption></figure>

If the field is of type Map, you can use "dot notation" to extract the value of a specific key on the map. In the example below, a field of name "links" has two keys, "pt-br" and "en-us". To get the value from the "pt-br", the Field would be "links.pt-br".

<div align="left"><figure><img src="/files/7OWW1Gvh6Cw5HFfrJVnD" alt=""><figcaption></figcaption></figure> <figure><img src="/files/0VwYuI20aSKFbL2WI1Vj" alt=""><figcaption></figcaption></figure> <figure><img src="/files/2RV8n8nLjRwuhj22kYAn" alt=""><figcaption></figcaption></figure></div>

If you don't specify a path and only provide "links" as a path, the entire Map JSON structure can be used as a text. This JSON text can be used in another Data Extractor to get specific fields from it too.

<div align="left"><figure><img src="/files/XoDoFqdEhXVfVdgesUma" alt=""><figcaption></figcaption></figure> <figure><img src="/files/hN5xlyBzpMHLNE7DZpfD" alt=""><figcaption></figcaption></figure></div>

### Field Types (1, 2, 3, ...)

Choose between the Bubble's basic data types, so that the value of the Field you're extracting can be translated to it.&#x20;

Some data types on Firestore must be treated as texts on Bubble if you want to display them or use them elsewhere, like "Maps" or "References".

{% hint style="info" %}
"Reference" types will be displayed as a text showing the path to the document, like so: collection\_name/document\_id&#x20;

(e.g. tasks/6KXLqGVsvGdytOI5pB8F or users/6n6tlWXTDwUp3f7yQ95mpITUUmZ2)
{% endhint %}

***

## <mark style="color:blue;">Returned Values</mark>

<div align="left"><figure><img src="/files/t2J2RPlkGQvtLzxiZFYL" alt=""><figcaption></figcaption></figure></div>

### Doc

The document JSON structure as text.

### Field Values (1, 2, 3...)

The values of each field you chose to retrieve from the document.
