"Add order line item" throws "This value is not a product variant GID"

I am trying to specify to have some product variants be auto-added via Shopify Flow.

What I have done is:

  • Start when: “order created”
  • Check if: “tags is equal to add_extra_product”
  • Do this: “Add order line item”

At the right panel, I am trying to specify “Product variant GID” with the existing product variant, but it always throws an error “This value is not a product variant GID”.

What is the GID you’re using?

I have tried both options: productID and variantID.

I have pasted these IDs from the below-formatted URLs.

https://.myshopify.com/admin/products/

https://.myshopify.com/admin/products//variants/

Try this format:

gid://shopify/ProductVariant/

You can also refer to this Developer Doc:
https://shopify.dev/api/examples/order-editing

I hope this helps!