I want to achieve a function which can set properties and create a realationship with the existed node when it is triggered by $createNodes params. but ,it seems don't work.
my code is as below:
Blockquote
call apoc.trigger.add('newMatch','unwind apoc.trigger.nodesByLabel($createdNodes,"η©ε") as node
match (m:ε―ηη©:εη±»)
where m.name=node.name
set node.burnPoint=m.burnPoint,node.type=m.type
create(node)-[r:isA]->(m)
with node,m
match(n:θ‘ι:εΊζ―{name:"θ‘ι"})
create(n)-[r1:include]->(node)',{phrase:"after"})
The problem is when I use this to create a new node ,there is no property modified and relationship built.
This is my first time to request help in neo4j community, I am looking forward to be replied.

@zhangjelly66
The problem is that apoc.trigger.nodesByLabel cannot be used together with $createdNodes.
it's supposed to be used with $assignedNode, assignedRelationshipProperties, $removedNode and $removedRelationshipProperties.
In fact, e.g. $assignedNode parameter is a Map<String, List<Node>>, where String is the label, and the function apoc.trigger.nodesByLabel just get the List<Node> to which the label has been assigned, and then you can unwind it.
Instead the $createdNodes parameter is already a List<Node>, therefore you can do directly the unwind.
This should work:
call apoc.trigger.add('newMatch','unwind $createdNodes as node
with node
where "η©ε" in labels(node)
match (m:ε―ηη©:εη±»)
where m.name=node.name
set node.burnPoint=m.burnPoint,node.type=m.type
create(node)-[r:isA]->(m)
with node,m
match(n:θ‘ι:εΊζ―{name:"θ‘ι"})
create(n)-[r1:include]->(node)',{phrase:"after"})
Thank you! It works and I understood the reason. 