I need to create a Rule to create a autoresponder email for a Webform submission.

This is: the webform has only the "email" field. When the form is submitted the rule should fetch the the 'email account' entered in the email form field and send an email to that account. That's all.

I already enabled the Webform Rules module but I see to way to fetch the email value from the rule I created.

What am I missing here? enter image description here

1 Answer 1


You do 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:email-id] (assuming that's what corresponds to the "email field" in your case).

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 (= "When the form is submitted the rule should fetch the 'email account' entered in the email form field", 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 to Add a variable, with a value assigned to it equal to your [data:EmailAccountField-value-raw] (and with an appropriate data type). I'm assuming your eMail field in your webform has a machine name like EmailAccountField (adapt to fit your machine name).
  • In your subsequent Rules Actions you can refer to the value of this variable you just added (that's the clue!).

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.