Hi,
For such task, I would have export flow, extract the "definition.json" file, move actions, overwrite file back in zip and import flow.
For that condition:

The definition is:
"Condition": {
"actions": {
"Compose_3":{"runAfter":{},"metadata":{"operationMetadataId":"033a53d2-df00-4e6d-9814-d6d806296111"},"type":"Compose","inputs":"test"},
"Compose_5":{"runAfter":{"Compose_3":["Succeeded"]},"metadata":{"operationMetadataId":"14ca73be-7ce9-44c2-93bf-c5f3c35b3e72"},"type":"Compose","inputs":"test"}
},
"runAfter":{},
"else":{
"actions":{
"Compose_4":{"runAfter":{},"metadata":{"operationMetadataId":"db7f9abc-71ce-48d6-92ac-2ba300f188a1"},"type":"Compose","inputs":"test"}
}
},
"expression":{"contains":["@triggerOutputs()['headers']['x-ms-user-name-encoded']","Samuel"]},
"metadata":{"operationMetadataId":"411d4503-0c68-4c17-b079-5b244f795e5f"},
"type":"If"
}
______________________________________________________________
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.