Using contains in Get product data query to find titles containing a character

Using contains in Get product data query to find titles containing a character

stikkimorey
Excursionist
13 1 2

I am trying to make a query in the get product data action so that it only contains products where the title field starts with or contains a #. 

 

Here are the products I expect it to work on, with products sorted by created, newest first. In testing, get product data does load these 2 items when the query field is blank.

 

stikkimorey_0-1742058571787.png

 

Here is the query I am trying:

stikkimorey_3-1742060921688.png

 

Here is the result of the step data for Get product data after I have run the flow

 

stikkimorey_2-1742060868867.png

 

Would somebody please be kind enough to let me know what I should type into the query box to restrict Get product data to product titles starting with (or containing) #.

 

Reply 1 (1)

paul_n
Shopify Staff
1744 192 407

I highly recommend you do not try to guess a query. The action links to docs on the filters available and the syntax. You should start by reading those. 

https://shopify.dev/docs/api/admin-graphql/latest/queries/products#argument-query-filter-title

https://shopify.dev/docs/api/usage/search-syntax

 

Partial matches may or may not work, so make sure to test it well. The query would look something like:

 

title:somestring*

This is no way to do includes in the query.  

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.