Here's an example of what I tried... Sadly, I don't have a clar understanding of the API
[{"id":"318bc319.545c8c","type":"inject","z":"85ff7c27.d1f9e","name":"","topic":"","payload":"{}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":340,"wires":[["6127a9be.73ed48"]]},{"id":"8e46bf1d.9cec7","type":"http request","z":"85ff7c27.d1f9e","name":"POST /auth/token","method":"POST","ret":"txt","url":"http://localhost:1880/auth/token","tls":"","x":570,"y":340,"wires":[["8d950fde.e890c"]]},{"id":"6127a9be.73ed48","type":"change","z":"85ff7c27.d1f9e","name":"","rules":[{"t":"set","p":"payload.client_id","pt":"msg","to":"node-red-editor","tot":"str"},{"t":"set","p":"payload.grant_type","pt":"msg","to":"password","tot":"str"},{"t":"set","p":"payload.scope","pt":"msg","to":"*","tot":"str"},{"t":"set","p":"payload.username","pt":"msg","to":"CHANGE_ME","tot":"str"},{"t":"set","p":"payload.password","pt":"msg","to":"CHANGE_ME","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":340,"wires":[["8e46bf1d.9cec7"]]},{"id":"38985da.ce401a2","type":"change","z":"85ff7c27.d1f9e","name":"","rules":[{"t":"set","p":"token","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1120,"y":340,"wires":[["88e94d53.649b"]]},{"id":"8d950fde.e890c","type":"json","z":"85ff7c27.d1f9e","name":"","property":"payload","action":"","pretty":false,"x":770,"y":340,"wires":[["af3a2700.a4dc38"]]},{"id":"88e94d53.649b","type":"change","z":"85ff7c27.d1f9e","name":"","rules":[{"t":"delete","p":"headers","pt":"msg"},{"t":"set","p":"headers.Authorization","pt":"msg","to":"token.access_token","tot":"flow"},{"t":"set","p":"headers.Node-RED-Deployment-Type","pt":"msg","to":"reload","tot":"str"},{"t":"set","p":"headers.Node-RED-API-Version","pt":"msg","to":"v1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1340,"y":340,"wires":[["134799e1.f6e326"]]},{"id":"af3a2700.a4dc38","type":"function","z":"85ff7c27.d1f9e","name":"Bearer","func":"msg.payload.access_token = \"Bearer \" + msg.payload.access_token\nreturn msg;","outputs":1,"noerr":0,"x":930,"y":340,"wires":[["38985da.ce401a2"]]},{"id":"134799e1.f6e326","type":"http request","z":"85ff7c27.d1f9e","name":"POST /flows","method":"POST","ret":"txt","paytoqs":false,"url":"http://localhost:1880/flows","tls":"","persist":false,"proxy":"","authType":"","x":1550,"y":340,"wires":[["3d8d2c74.71d704"]]},{"id":"3d8d2c74.71d704","type":"debug","z":"85ff7c27.d1f9e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1730,"y":340,"wires":[]}]