workflow_select_sql=f'select * from `rule_define` where brand_id = {workflowData.brandId} and status != 3 and tpl_id = "{workflowData.workflow_parent_template_id}" and child_rule = 0'
insert_rule_raw='{"ruleId":"cp5ccqct7rnv226qoavg","tplId":"cj6d0n6ein6dsof86ng0","brandId":6052,"eventId":"cmk9m1n73uvgh1rfmho0","ruleName":"Triage button and assign to different teams","ruleDescribe":"When a customer opens a new conversation, it is assigned according to the type selected by the user, and the issue information is collected synchronously, add the tag.","status":1,"ruleLogic":{"logicIf":{"ruleCond":{"condType":2,"robId":"cmk9m1n73uvgh1rfmho0","objName":"ChatBotIncomingMessage","objType":"bool","compOperatorType":"eq","compOperatorValue":"true","extendedAttributes":"{\\"x\\":212,\\"y\\":212,\\"nodeId\\":\\"Triggers_35705406543421204\\"}"},"result":[{"extendedAttributes":"{\\"showType\\":\\"next\\",\\"nodeId\\":\\"Actions_7500242750723225\\"}","resultType":2,"inner":[{"ruleId":"cp5ccqct7rnv226qoavg","robId":"cjhg9iuein687habss50","objName":"ChatBotMulReply","objType":"string","objKind":2,"objValue":"{\\"contentList\\":\\"Hi👋~\\",\\"attachmentList\\":[]}","showType":"mulInput","showKind":"chatBotReply","extendedAttributes":"{\\"title\\":\\"Message content\\",\\"nodeId\\":\\"Actions_7500242750723225\\",\\"x\\":658.2869318181818,\\"y\\":270.7599431818181}","resultType":1}]}],"index":1}}}'
workflow_insert_sql=f"""INSERT INTO willdesk.rule_define (rule_id,tpl_id,brand_id,event_id,rule_name,rule_describe,rule_dsl,rule_raw,sorts,parent_ruleid,child_rule,dsl_version,json_version,status,create_at,update_at) VALUES