I want exactly like this Send notification e-mail after new content was added but the answer is not seems to be question specific. I have a webform where I get email id of the anonymous users and I want to send email to those ids when I save a new content.

I have combined Rules and webform rules for it. I created an

event -After saving new content

Condition -Content is of type

Actions -Fetch webform submissions of node ID n

Loop -fetched submissions

loop action -Send mail.

But i am stuck to move forward as I am not able to configure 'TO' field with email fields from fetched submissions.

  • Are you trying the replacement patterns?
    – nit3ch
    Apr 8, 2013 at 11:52
  • I tried data selector but it gives the error data does not match. Not sure which one to use Apr 9, 2013 at 9:54
  • your replacement pattern will look like [node:field-name_of_field]. Just put this in the "To" field.
    – nit3ch
    Apr 9, 2013 at 11:23
  • I couldn't find such a token in replacement pattern. I actually wanted to get the submitted email ids in the TO field. In loop, the current list item is current_submission and how can i get the email from that? Apr 9, 2013 at 11:29
  • 1
    then try fetching the data manually <?php print $data['components']['email']['value'][0]; ?> and please read the note on webform rules module.
    – nit3ch
    Apr 9, 2013 at 11:45

2 Answers 2


Enabled the PHP filter module and the list item is available in the PHP evaluation area. So fetch the email is as <?php print $list_item->data['component_id']['value'][0]; ?>. Works pretty well :)

  • Check the correct answer :)
    – nit3ch
    Apr 23, 2013 at 14:04

I don't think you have to "Enabled the PHP filter" (as in your own answer) to get this to work. Read on for an alternative solution ...

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 id of the anonymous users" 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.

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.