How to use webform submission data in a Rules Condition? I want to send an email when a user fills in a webform, but only if it is our review form and if the user gave the feedback higher than a 7.

So we are asking how good we are, and the user gives us a value from 1 - 10, we want to send an email if that number is higher than 7.

Basically, I have installed the Rules and the Webform_rules modules.
Now I can make a rule with an action: 'After a form has been submitted'

Next I made the nid equal to the nid of the specific webform.
And then I want make a second condition to compare the filled out value the be 7, 8, 9, or 10, so I make an data comparison condition. 
With the condition 'data' and the field name like: 'data:grade-value-raw' it just tells me there is no grade-value-raw

If I set the reaction to display the [data:grade-value-raw] on the page, it works.

Why can't I use it in the Rules Condition?
The "clue" to what you're trying to get to work, is that you have access to all labels and all values of any field of a webform, ie:


[data:MachineFieldName-title] contains the Label of a field with machine name MachineFieldName.
[data:MachineFieldName-value] contains the Value of a field with machine name MachineFieldName


So in your case, you should be able to get it to work using something like [data:grade-value].

For way more details on this, and a prototype rule about this, refer to the answer to "How to create a node from a Webform using rules?":


the 1st attempt relates to using "Entity has field" (which doesn't work for Webform)
the 2nd attempt explains what to do in case of Webform.


The above is a good start, but not sufficient to achieve your goal (= validate "... a second condition to compare the filled out value the be 7, 8, 9, or 10, so I make an data comparison condition", as in your question).
However, you can use a technique similar to what is described in my answer to "How to do a data comparison to submitted webform data when using the Rules module?". For short:


Add an extra Rules Action (yes, "Rules Action", not "Rules Condition" ...) to Add a variable, with a value assigned to it equal to your [data:grade-value-raw] (and with a data type which is probably integer).
Use the Conditional Rules module to perform the data comparison as in your question (if it is 7, 8, 9, or 10). However, in this data comparison you now refer to the value of the variable you just added (that's the clue!).


In this answer I'm using the Conditional Rules module, though you could also rework the Rules Action to performing Rules Components (in which you add the appropriate Rules Conditions), so that you don't need this extra module. For more details on that, refer to the answer to "What&#39;s the alternative to using the Conditional Rules module?".

PS: I'm assuming this question is about D7.