This API endpoint handles PATCH requests triggered by the ‘Webhook3’. It manages task status updates, interacts with Postgres and ClickUp, and processes task data for the ‘MMQ’ system.
/play-pause through the Webhook3 node. The workflow primarily processes a task’s play or pause action, updating task status in ClickUp, managing database entries in Postgres, and coordinating with associated logic for task state management and logging.
/play-pause, responding with process control for task play/pause actions.path: "play-pause"httpMethod: "PATCH"responseMode: "responseNode"responseBody: Not specifically configured, default to response node"action" field in the incoming body.body.action = "pause", output branch "pause"body.action = "play", output branch "play"task_id, updates task status to "on hold".task_id: "{{ $json.id }}"status: "on hold"/play-pause.path: "play-pause"httpMethod: "PATCH"responseMode: "responseNode"id: "{{ $json.body.task_id }}"operation: "update"updateFields: { "status": "on hold" }TheSquad ClickUp API credentials.
"action" value.body.action = "pause", branch "pause"body.action = "play", branch "play"task_id: "{{ $json.task_id }}"status: "{{ $json.changes.to.status }}"active: truedue_date: "{{ $json.due_date.toDateTime('ms').format('yyyy-MM-dd') }}"mmq_log)data: JSON stringified object with relevant dataaction: either "play" or "pause" depending on the branchaccount: "{{ $('Postgres2').first().json.account }}"SquadData database credentials.
respondWith: "json"responseBody: {"tasks_found": false}Webhook3 trigger. It routes the action based on the "action" parameter, updating task statuses in ClickUp and Postgres, logging actions, and coordinating additional task management processes such as setting task parameters, updating related data, and responding back to the source. It ensures task state consistency across systems and handles logging and notifications as part of a comprehensive task control flow.