I would start by removing that action and using Log output. Put the liquid in there…it allows you to test without adding lineItems by accident to a bunch of orders.
Are you sure you want to loop here? You could add multiple line items to the order if that condition passes.
Finally, I don’t think you need “capture” or “assign” as that would not print out anything. Something like:
{{- lineItemsForeachitem.quantity | times: 10 -}}
If you need more complex math, you might want to look at “Run code”, which was just released. It makes doing math much easier in JavaScript
I am basically trying to see if they purchased a certain item. If they did I need to remove 10 products for each 1 they purchase. So if they purchase 3 of the same item I want to look 3 times and remove 3 x 10 products from inventory.
A single item is a line item. I think you should use a Run code action to do this instead. It will allow to write whatever logic you need in JavaScript. Something like:
Order created
Run code (to calculate #, and maybe how many to remove)
They logic you want is pretty complicated to show in a visual diagram and Flow’s built in math tools are fairly limited. I think you want a code action. It might not actually be very complicated if you can find someone who knows JavaScript.