Well, you actually can use python to script the Unreal Editor: https://docs.unrealengine.com/en-US/…hon/index.html
Though, the API does not seem to be very useful for what you want to do (unless I’m missing something): Unreal Python API Documentation — Unreal Python 4.27 (Experimental) documentation
But you may know that copying blueprint are actually stringifyed. For example, if you copy some Blueprint nodes, and you paste it into a text editor, you’ll end up with something like that:
Begin Object Class=/Script/BlueprintGraph.K2Node_Knot Name="K2Node_Knot_2"
NodePosX=1056
NodePosY=704
NodeGuid=C9B9DA7741261731C22962AEEDF6F3A4
CustomProperties Pin (PinId=023CF8024C810D16C9C8C1BEC9C7A63A,PinName="InputPin",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,LinkedTo=(K2Node_Knot_1 E7AC41CE46EC1DE483F7A481581A5703,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=295D141F4591FFA5FBA41C88E2122A8A,PinName="OutputPin",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,LinkedTo=(K2Node_DynamicCast_0 3D30A2404F4D1B50A2C005918B90EE8D,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
So you might be able to generate stringifyed Blueprint that you’ll be able to copy/paste into the editor.
I actually didn’t find any documentation for this, so you may have to reverse engineer it a bit…