I'm trying to create a daily eMail of the body of a node (which actually contains the results of two views via the "insert_view" module) to be sent out to users of a selected role. I have the node created, and I have the rule created to send a daily eMail to users of a particular role. The only thing that's stumping me is how to get the contents of a node (or frankly just the body of the node) into the eMail. Alternatively, I'd be just as happy to insert the results of the two views into the body of the eMail.

Anybody have any ideas on how I could do this?

Thanks, Shawn

Comments

sdsheridan’s picture

OK so figured out a way to hack the workflow_ng_system.inc include to do what I want to do with views, by leveraging the "insert_view" module. Right after all the extract( workflow_ng_token_replace_all(array('message' => 'message') + $names, $settings, $arguments, $log) ); calls, I've place the following snippet:

  if ( module_exists( "insert_view" ) ) {
    $message = insert_view_filter( "process", 0, -1, $message );
  }

That seems to be working for me, and leverages all the "insert_view" functionality now in workflow_ng eMail capabilities. Sweet!

Shawn