Ready flow - Read a Word document and fill in an Excel spreadsheet

I need help, I have already created several flows and I can’t reach the end. Here is the prompt/flow I am putting together.

I have an attached Word file that contains information on several legal cases. I need to extract this data to fill an Excel spreadsheet. The ultimate goal is to create a list of properties eligible for auction. Extraction Rules: 1. Restrictive Filter: Analyze each case in the document sequentially. ONLY extract data and add to the list the cases that explicitly mention the existence of PROPERTIES; if you cannot find the case number, do not add it to the spreadsheet, meaning each row is unique and must refer to a single case. Completely discard any case that does not have a property. 2. Chronological Order: The first row of the Excel table must correspond to the first eligible case found in the Word file, strictly following the order of the document. 3. Consistency: Do not invent data. If any required information is not clear in the case text, fill the field as “Not informed”. Output Format: Excel spreadsheet. Use the following standard columns (adjust if you need more fields): - Case Number - Type of Property (House, Apartment, Land, etc.) - Property Address / Location - Appraisal Value (if any) - Brief Description of the Asset Execution Instruction, Claimant, Respondent, Claimant’s Lawyer, Phone, Email, Website, Referral, Notes.

Hi @Ronaldo_Alves, welcome!

The thing blocking you is the Word file. n8n’s Extract from File node doesn’t read .docx, only formats like PDF, text, CSV and XLSX. So save the document as PDF first, then use Extract from PDF to pull the text.

Then feed that text into an Information Extractor node, set Schema Type to Generate From JSON Example, and paste a structure like this so each case is its own object:

{
  "cases": [
    {
      "case_number": "",
      "property_type": "",
      "address": "",
      "appraisal_value": "",
      "description": "",
      "execution_instruction": "",
      "claimant": "",
      "respondent": "",
      "lawyer": "",
      "phone": "",
      "email": "",
      "website": "",
      "referral": "",
      "notes": ""
    }
  ]
}

Keep your rules (skip cases with no property or no case number, never invent data, use “Not informed”) in the node’s prompt. Then add a Split Out node on the cases array so each case becomes a row, and finish with Convert to File set to XLSX.

Hi @Ronaldo_Alves

Which node is failing or what error message you are seeing?
Please share your workflow

Hi @Ronaldo_Alves, welcome to the n8n community!

these templates will help you, just adapt them to your needs.
Analyze Legal Documents with GPT & o4-mini plus Gmail & Google Sheets | n8n workflow template
:sparkles::kitchen_knife: Advanced AI powered document parsing & text extraction with Llama Parse | n8n workflow template

The PDF conversion approach from achamm works well. If you’re self-hosting n8n and want to skip the conversion step, you can also read the .docx directly using a Code node with the mammoth package - add NODE_FUNCTION_ALLOW_EXTERNAL=mammoth to your environment variables, then use mammoth.extractRawText({buffer: Buffer.from($binary.data, 'base64')}) to get the text. From there, pipe it into an Information Extractor node with your schema and it handles the structured output cleanly.