This API triggers the MMQ workflow using a PATCH request to handle updates to tasks related to the Queued/MMQ process. It primarily responds to webhook triggers and manages task state changes, including interacting with Postgres and external services like ClickUp.
"SELECT * FROM get_account_task_stats({{ $json.account }})" joined with the accounts table to verify current task load and capacity.
"SELECT * FROM get_account_task_stats({{ $json.account }}) JOIN accounts a ON a.account = {{ $json.account }}".query.id exists and query.account does not: route accordingly (e.g., to task handling)"SELECT {\"account\": \"{{ $json.query.account }}\"}"account.
account: "{{ $json.query.account }}"Postgres7, Postgres11, etc.)ClickUp, ClickUp1, ClickUp4)Postgres13, Postgres14)Postgres16, Postgres17)Switch4, Switch5, process “pause” or “play” actions coming from webhook payloads.{"tasks_found": false}action, task_id, position.status, dueDatePostgres16 for refreshing materialized viewsPostgres17 for executing complex SQL queries involving task status and date logicPostgres18 for converting images or files when neededPostgres13, Postgres14 for updating logs and queue ordering dynamicallyNote: The detailed node configurations, SQL queries, and execution data illustrate the workflow’s extensive data handling and conditional routing logic, ensuring precise task management aligned with external triggers and internal state changes.