I cannot believe that I missed that typo - thanks so much. Thanks for the info on the HTML response also - I had no idea. The flow below seems to be working!
[
{
"id": "3dc2e06f.e9ba8",
"type": "tab",
"label": "Wekan => Habitica",
"disabled": false,
"info": ""
},
{
"id": "953f8efa.551c18",
"type": "function",
"z": "3dc2e06f.e9ba8",
"name": "Build create task request",
"func": "const text = msg.payload[\"card\"];\nconst alias = msg.payload[\"cardId\"];\nconst act = msg.payload[\"description\"];\n\nflow.set(\"sendURL\",`https://habitica.com/api/v3/tasks/user`);\n\nif (act == \"act-createCard\") {\n return {\n \"text\": text,\n \"type\": \"todo\",\n \"alias\": alias,\n \"priority\": 1.5\n }; \n} else {\n return console.error(\"Action type incorrect\")\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 340,
"wires": [
[
"322920ca.10b14"
]
]
},
{
"id": "4d198882.5869e8",
"type": "http request",
"z": "3dc2e06f.e9ba8",
"name": "Send request",
"method": "POST",
"ret": "obj",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"authType": "basic",
"x": 910,
"y": 320,
"wires": [
[
"e9c70b6d.5a0c88",
"f8ee93f8.e10b6"
]
]
},
{
"id": "59f5c229.32d94c",
"type": "switch",
"z": "3dc2e06f.e9ba8",
"name": "Case: Move, Create",
"property": "payload[\"description\"]",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "act-moveCard",
"vt": "str"
},
{
"t": "neq",
"v": "act-moveCard",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 320,
"y": 320,
"wires": [
[
"d55fb99.a191548"
],
[
"953f8efa.551c18"
]
]
},
{
"id": "d55fb99.a191548",
"type": "function",
"z": "3dc2e06f.e9ba8",
"name": "Build score task request",
"func": "const alias = msg.payload[\"cardId\"];\nconst act = msg.payload[\"description\"];\nconst list = msg.payload[\"listId\"];\n\nflow.set(\"sendURL\",`https://habitica.com/api/v3/tasks/${alias}/score/up`);\n\nif (act == \"act-moveCard\") {\n return {\n \"alias\": alias,\n }; \n} else {\n return console.error(\"Action type or list ID incorrect.\")\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 300,
"wires": [
[
"322920ca.10b14"
]
]
},
{
"id": "e9c70b6d.5a0c88",
"type": "debug",
"z": "3dc2e06f.e9ba8",
"name": "Log msg.payload",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1110,
"y": 320,
"wires": []
},
{
"id": "cb49b789.b5f0a8",
"type": "debug",
"z": "3dc2e06f.e9ba8",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 290,
"y": 360,
"wires": []
},
{
"id": "1645ddfc.cbcfca",
"type": "http in",
"z": "3dc2e06f.e9ba8",
"name": "Receive Wekan POST",
"url": "/POSTcards",
"method": "post",
"upload": false,
"swaggerDoc": "",
"x": 100,
"y": 320,
"wires": [
[
"59f5c229.32d94c",
"cb49b789.b5f0a8",
"cafd75c0.f46778"
]
]
},
{
"id": "322920ca.10b14",
"type": "change",
"z": "3dc2e06f.e9ba8",
"name": "",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "sendURL",
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 320,
"wires": [
[
"4d198882.5869e8",
"915bd03e.9cd54"
]
]
},
{
"id": "cafd75c0.f46778",
"type": "http response",
"z": "3dc2e06f.e9ba8",
"name": "",
"statusCode": "",
"headers": {},
"x": 270,
"y": 400,
"wires": []
},
{
"id": "915bd03e.9cd54",
"type": "debug",
"z": "3dc2e06f.e9ba8",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 890,
"y": 280,
"wires": []
},
{
"id": "f8ee93f8.e10b6",
"type": "http response",
"z": "3dc2e06f.e9ba8",
"name": "",
"statusCode": "",
"headers": {},
"x": 1070,
"y": 360,
"wires": []
}
]