# Firestore Query - Subcollection

**URL:** <https://community.n8n.io/t/firestore-query-subcollection/25247>\
**Category:** Questions\
**Tags:** firestore\
**Created:** [April 16, 2023, 4:29pm UTC](https://community.n8n.io/t/firestore-query-subcollection/25247 "2023-04-16T16:29:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Cvitanovic](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/alex_cvitanovic/32/24342_2.png) [@Alex\_Cvitanovic](https://community.n8n.io/u/Alex_Cvitanovic)\
**Post date:** [April 16, 2023, 4:29pm UTC](https://community.n8n.io/t/firestore-query-subcollection/25247/1 "2023-04-16T16:29:47Z")

</div>

Hi all,

Hoping someone with firestore experience can help me understand the method to query a subcollection?

I’m attaching a sample query from the firestore console in the screenshot below.

 ![Screenshot 2023-04-16 at 10.21.33 AM](https://europe1.discourse-cdn.com/n8n/original/3X/a/e/ae56546a93cc1dcf6979a41a7eb734a2bee1fca3.png)

Here is the json I have so far. I suspect I am using the incorrect value in collectionId, however I am unsure where else to specify the path.

```auto
{
  "structuredQuery": {
    "where": {
      "fieldFilter": {
        "field": {
          "fieldPath": "url"
        },
        "op": "EQUAL",
        "value": {
          "stringValue": "{{ $json.url }}"
        }
      }
    },
    "from": [
      {
        "collectionId": "/vendors/8uCp1o4T4RHRswzNVc0d/catalogs"
      }
    ]
  }
}

```

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [April 19, 2023, 12:44pm UTC](https://community.n8n.io/t/firestore-query-subcollection/25247/2 "2023-04-19T12:44:08Z")

</div>

Hi @Alex_Cvitanovic, you should be able to use your full JSON payload in the respective field, similar to what I’ve suggested [over here](http://community.n8n.io/t/firestore-json-where-query-and-condition/23471/2). Are you seeing any issues with this?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 18, 2023, 12:44pm UTC](https://community.n8n.io/t/firestore-query-subcollection/25247/3 "2023-07-18T12:44:39Z")

</div>

Closed on July 18, 2023, 12:44pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
