I would like to pass values to Rules (eg an array of words) and then do some Rules magic with them (eg create new nodes if they dont exist already).

I found one solution here How to reference existing term if it exists or create new one if not exist via Inline Entity Form module? that mentions creating custom tokens. Looks like the token approach can be involving as per https://www.drupal.org/node/1143842, although there is this module as well Custom Tokens.

Would there be any other way? Perhaps calling a url, and passing the values as GET variables or adding entity properties?

  • Have you looked at adding custom php code as part of the action? Would that help?
    – rrirower
    May 25, 2016 at 14:52
  • I want that as the last resort. Using the php module is a nightmare to debug. I was just thinking about using entity property info.
    – giorgio79
    May 25, 2016 at 18:08
  • As an aside, it's really not that difficult to debug if you have the right IDE.
    – rrirower
    May 25, 2016 at 18:13
  • Where is the "array of words" coming from? Knowing the source of values that you would like to pass to the rule would help in suggesting a viable solution.
    – oksana-c
    Jun 15, 2016 at 0:41
  • Frankly anywhere except Drupal :) Plain PHP code, or a json feed.
    – giorgio79
    Jun 15, 2016 at 13:48


Your Answer

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

Browse other questions tagged or ask your own question.