# Asset Query

Asset Queries are available for **Set Attribute Value** and **Set Property** actions. With these actions we can perform a search through the current org's Asset Library, for specific assets that have a given set of metadata key-value pairs.

This functionality enables us to build automation with [Template Assets](/learn/workflows/template-assets.md), so that we can handle large sets of configurable 3D models and materials at scale. These setups typically work in conjunction with [Metadata Value Queries](/platform-documentation/project-data/logic/queries/metadata-value-query.md).

{% hint style="info" %}
The query will always return ONLY ONE asset - the last updated asset that matches the metadata provided, and of the type required by the action.

For example: a **Set Attribute Value** action on an attribute of type a**sset-texture** will only search for texture assets.
{% endhint %}

Let's take a look at an example of a [Template Material](/learn/workflows/template-assets.md#advanced-setup), where we are trying to populate three material properties with custom maps for the Cotton Red material option.&#x20;

In this scenario, the catalog item has two metadata fields on it - **Name** and **Family**.&#x20;

The texture assets also have the same metadata fields on them, generated perhaps using the [Apply Metadata Pattern tool](/tools/general-apps/apply-metadata-pattern.md).

We can then use the **Asset Query** option for the **Set Property** action inside the Template Material, in order to find the three texture assets and assign them automatically.

<figure><img src="/files/K34678eKY1dot3Miq4ol" alt=""><figcaption><p>Loading Textures automatically into a Template Material</p></figcaption></figure>

<figure><img src="/files/q5S1WbfospIl3ACzosYD" alt=""><figcaption><p>Using an Asset Query with the Set Property action</p></figcaption></figure>

{% hint style="info" %}
Take note that the Asset Query is currently labelled **Metadata Query** in the ThreeKit UI
{% endhint %}

The usage of the Asset Query with a **Set Attribute Value** action is exactly the same as shown above. The option is only available on attributes of type **asset**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://community.threekit.com/platform-documentation/project-data/logic/queries/asset-query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
