Using Feed Import, I am creating multiple nodes simultaneously via MailHandler.
I have a Views Bulk Operations view setup to display a single node of a specific type of status published.

I am attempting to create a rule to load the VBO view and email the single result to the original sender and then unpublish the node that was returned in the view. Basically, I would like each node created during the Feed Import to go through this process separately so that each one receives a different result.

Currently, if multiple nodes are imported simultaneously, it sends them all the same VBO result. I assume I need some kind of loop here, but have been unsuccessful in doing so. Below is an export of my current rule.

{ "rules_test" : {
"LABEL" : "Test",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "views_bulk_operations", "rules" ],
"ON" : { "node_insert--wireless_voucher_request" : { "bundle" : "wireless_voucher_request" } },
"DO" : [
{ "views_bulk_operations_action_load_list" : {
"USING" : { "view" : "random_wireless_voucher|page" },
"PROVIDE" : { "entity_list" : { "entity_list" : "A list of entities" } }
}
},
{ "mail" : {
"to" : "[node:field-voucher-requestor]",
"subject" : "Wireless Voucher",
"message" : [ "entity-list:0:title" ],
"language" : [ "" ]
}
},
{ "node_unpublish" : { "node" : [ "entity-list:0" ] } },
{ "entity_save" : { "data" : [ "entity-list:0" ], "immediate" : "1" } }
]
}
}

Comments

boulwarek created an issue. See original summary.

boulwarek’s picture

Issue summary: View changes
TR’s picture

Version: 7.x-2.9 » 7.x-2.x-dev
Status: Active » Fixed
Issue tags: -feeds import, -multiple values, -mailhandler, -Views Bulk Operations

The documentation for creating and using loops may be found at https://www.drupal.org/node/1300058

There's a link to a video tutorial in that documentation.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.