# Add a created group in a node tree exploiting python [duplicate]

I have created a node tree in a different blend file, and I just need to add it as a group exploiting a script. In the following figure there is the "manual" procedure.

I have tried to add it simply using nodes.new(type='ShaderNodeGroup') but I get an empty node and not the "Asteroid_mat" group that I need.

• How to create a new material: blender.stackexchange.com/questions/23433/… (forgot to post that before...) – brockmann Aug 14 '20 at 14:15
• I' ve solved three of the four problems!! The only thing that I can't do is to get the node with my group. I' ve tried with 'node_emission = nodes.new(type='ShaderNodeGroup')' (it is the type printed when I pass on it) but the result is an empty node. Do you have any suggestion? – Carmine Buonagura Aug 14 '20 at 15:03
• Cool, glad that helped. Sure, please roll back your edit and ask a new question about that. You're welcome to ask as many questions you like but only one per post. Also please add the current version of your code, thanks. How this site works: blender.stackexchange.com/tour – brockmann Aug 14 '20 at 17:36
• Did find one of my previous answers in the meantime: blender.stackexchange.com/q/150947/31447 it's for the compositor, principle is the same however... – brockmann Aug 14 '20 at 17:46