How can I manage discount code flow order for specific orders?

Greetings,

i’m trying to create a flow that will be activated when someone used a specific discount code in the checkout, and after that will send an email, although i have set variables such as the name of the customer and the discount code that was used for the order, when i add the amount of money used in this order with this discount code the variable returns the amount of the discount code used ever, but i want only for this specific order and not to count all the orders, and second which variable i must use to display the products used in the order?

Thanks in advance!

I think you want order / totalDiscountSet / shopMoney / amount

https://shopify.dev/docs/api/admin-graphql/2023-07/objects/order#field-order-totaldiscountsset

Products are located at order / lineItems / product / …