Multiple runs due to length but only returning 1 runs' output in Information Extractor

Describe the problem/error/question

Hello,

I’m using the information extractor to get data from emails. These emails can be quite long over 10k tokens but under the context length (I’m using Deepseek Chat for the extraction). For some reason it breaks the extraction into 2 runs but only returns the output from 1. It should output about 50 results from both runs but is outputting only 2. See screenshots. I want it to output everything in a single array. Any help is much appreciated.


Please share your workflow

{
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "output": "fields",
        "fields": [
          "flag",
          "from",
          "hasAttachments",
          "importance",
          "sentDateTime",
          "subject",
          "sender",
          "body",
          "bodyPreview"
        ],
        "filters": {},
        "options": {
          "downloadAttachments": true
        }
      },
      "type": "n8n-nodes-base.microsoftOutlookTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "f9d40b10-8f37-4e4d-afbd-e82af4c23efc",
      "name": "Microsoft Outlook Trigger",
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "id": "PKgKZ9HBuMP4nJsc",
          "name": "Microsoft Outlook account"
        }
      }
    },
    {
      "parameters": {
        "inputText": "={{ $json.body.content }}",
        "categories": {
          "categories": [
            {
              "category": "load offer",
              "description": "Loads that are available. Freight brokers are offering potential loads."
            },
            {
              "category": "anything else",
              "description": "Any other emails besides a load offer."
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "typeVersion": 1,
      "position": [
        300,
        0
      ],
      "id": "a8748ea4-0044-41a3-a580-10129c5ce0c1",
      "name": "Text Classifier"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {
          "temperature": 0
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        320,
        200
      ],
      "id": "aeb095ee-adda-4694-8bc9-237ef4287fdd",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "Kn0x2guNBXgMPaMJ",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
      
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1,
      "position": [
        720,
        -620
      ],
      "id": "0573c0a0-73a3-4064-8758-cd83e31c768b",
      "name": "Information Extractor1"
    },
    {
      "parameters": {
        "options": {
          "temperature": 0
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "typeVersion": 1,
      "position": [
        780,
        -420
      ],
      "id": "9774e089-e0a4-4a9b-95ae-df8da8c3a0fd",
      "name": "DeepSeek Chat Model1",
      "credentials": {
        "deepSeekApi": {
          "id": "46nVECmXop1wUrVF",
          "name": "DeepSeek account"
        }
      }
    }
  ],
  "connections": {
    "Microsoft Outlook Trigger": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "Information Extractor1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "6974b71d9f8a578d3662841d0c4783cb933744670b6a75c396dd569a8748ac96"
  }
}

Share the output returned by the last node

Only returns 2 but should return

[
  {
    "output": [
      {
        "stops": [
          {
            "type": "pickup",
            "stopOrder": 0,
            "schedule": {
              "dateOnly": true,
              "appointmentDatetime": "2025-03-05"
            },
            "city": "Phoenix",
            "state": "AZ"
          },
          {
            "type": "delivery",
            "stopOrder": 1,
            "schedule": {
              "dateOnly": true,
              "appointmentDatetime": "2025-03-05"
            },
            "city": "Phoenix",
            "state": "AZ"
          }
        ],
        "rate": 0,
        "equipment": [
          "Power Only"
        ],
        "mode": "TL",
        "reference": "5000152235",
        "hazmat": true,
        "value": 100000
      },
      {
        "stops": [
          {
            "type": "pickup",
            "stopOrder": 0,
            "schedule": {
              "dateOnly": true,
              "appointmentDatetime": "2025-03-05"
            },
            "city": "ALBERTVILLE",
            "state": "AL"
          },
          {
            "type": "delivery",
            "stopOrder": 1,
            "schedule": {
              "dateOnly": true,
              "appointmentDatetime": "2025-03-05"
            },
            "city": "NEW BRAUNFELS",
            "state": "TX"
          }
        ],
        "rate": 0,
        "equipment": [
          "Van"
        ],
        "mode": "TL",
        "reference": "5000149788",
        "value": 100000
      }
    ]
  }
]

Information on your n8n setup

  • n8n version: 1.81.4
  • Database (default: SQLite): NA
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default. hosted by n8n
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • Operating system: macos

Solved. I had to increase the output tokens in Deepseek.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.