Workflow 3 of 4 · Retail packing

Retail pack release rule

Hold Space or Ctrl and drag to move the canvas

n8n workflow JSON

Retail pack release rule

Paste this into an n8n editor to import the workflow. Credentials and endpoints are placeholders.

{
  "nodes": [
    {
      "name": "Unit reached packing",
      "notes": "The line posts here when a unit arrives at packing.",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        300
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "line/packing"
      }
    },
    {
      "name": "Request retail pack (Trigger.dev)",
      "notes": "Starts the Trigger.dev job that builds labels, certificate, manual, and barcode.",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        240,
        300
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.trigger.dev/api/v1/tasks/retail-pack/trigger"
      }
    },
    {
      "name": "Wait for pack job",
      "notes": "Pauses until Trigger.dev calls back with the finished pack.",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        480,
        300
      ],
      "parameters": {
        "resume": "webhook"
      }
    },
    {
      "name": "All four documents?",
      "notes": "True closes the carton; false keeps it open.",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        700,
        300
      ],
      "parameters": {}
    },
    {
      "name": "Mark carton packed",
      "notes": "Marks the carton packed on the Odoo transfer.",
      "type": "n8n-nodes-base.odoo",
      "typeVersion": 1,
      "position": [
        940,
        180
      ],
      "parameters": {
        "resource": "custom",
        "customResource": "stock.picking",
        "operation": "update"
      }
    },
    {
      "name": "Hand off to Zapier",
      "notes": "Passes the packed carton to Zapier for the retailer portal.",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1160,
        180
      ],
      "parameters": {
        "method": "POST",
        "url": "https://hooks.zapier.com/hooks/catch/retailer-portal"
      }
    },
    {
      "name": "Keep carton open",
      "notes": "Tells packing which document is missing.",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        940,
        420
      ],
      "parameters": {
        "resource": "message",
        "operation": "post"
      }
    }
  ],
  "connections": {
    "Unit reached packing": {
      "main": [
        [
          {
            "node": "Request retail pack (Trigger.dev)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request retail pack (Trigger.dev)": {
      "main": [
        [
          {
            "node": "Wait for pack job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for pack job": {
      "main": [
        [
          {
            "node": "All four documents?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "All four documents?": {
      "main": [
        [
          {
            "node": "Mark carton packed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Keep carton open",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark carton packed": {
      "main": [
        [
          {
            "node": "Hand off to Zapier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}