Word files to Qdrant library

:rocket: :robot: Hello, everyone. Could someone please help me understand how to deliver Word and PDF file vectors into a Qdrant database? :roll_eyes: :roll_eyes:

I’m building my workflow to generate insights and answer to the questions (via Telegram) based on documents stored in a Qdrant collection. All necessary documents are located in my Google Drive. It seems that processing PDF files is relatively straightforward in the workflow (although I’m still not very sure), but Word files are giving me trouble — I haven’t been able to properly detect or process them in n8n workflow.

I’ve tried:

  • Using the Extract from text file node
  • Involving the HTTP tool
  • Converting .docx files into Google Docs format

…but nothing seems to work. :robot: :robot: :robot:
AI assistant also couldn’t help.

I would be very grateful for any suggestions or guidance!
Thank you in advance. :raising_hands: :wink:

try if this works …

Overall Workflow:

  1. Get File: Fetch documents from Google Drive.
  2. Extract Text: Convert PDF/DOCX to plain text.
  3. Chunk Text: Break text into smaller pieces.
  4. Embed: Turn text chunks into numerical vectors.
  5. Store: Save vectors and original text/metadata in Qdrant.

Key Solutions for Text Extraction:

  • PDFs:
    • Use an n8n Community PDF to Text Node (best).
    • Or, send PDF to an External PDF API via HTTP Request.
  • Word (.docx) Files (Your Main Problem):
    1. Recommended (Self-hosted n8n): Install and use a Community DOCX to Text Node (e.g., n8n-docx-converter). This is the cleanest.
    2. Google Docs API (n8n Native):
    • Download DOCX from Drive.
    • Use Google Drive node to Copy File, setting Mime Type to application/vnd.google-apps.document (converts to Google Doc).
    • Download the new Google Doc using Google Drive node, setting Mime Type to text/plain (exports as text).
    • (Optional) Delete temporary Google Doc.
    1. Python Script (Advanced, Self-hosted n8n):
    • Download DOCX binary.
    • Use Write File node to save it temporarily.
    • Use Execute Command to run a Python script (with docx2txt library) to convert it to text.
    • Read File the output text.
    1. External Conversion API: Send DOCX to an external service (e.g., CloudConvert) via HTTP Request.

After Text Extraction:

  • Chunking: Use a Code Node (or a text splitter node if available) to break the text into manageable chunks (e.g., 500 characters with overlap).
  • Embeddings: Use an Embedding Node (e.g., OpenAI, Cohere, Google Gemini) to convert each text chunk into a vector.
  • Qdrant: Use the Qdrant Vector Store node to “Insert” these vectors, including the original text chunk and metadata (filename, page/section) as payload.

Thank you very much. I will try definatelly :wink: :raising_hands:

Unfortunatelly I couldn’t create this AI agent. Just impossible. I tryed everything, but something doesn’t work. I don’t know where is the problem, n8n side or Qdrant collections side. This is how it looks like visually. Mistakes all the time, hundreds, mainly 404. If you or somebody else can help me with this, I would be very thankful. After I will share it, maybe somebody it will help. This is my test work.

I see, i know how frustrating that can be.. maybe we could start with what environment you are working on so we can discover how your connections are that generate the 404 error. also can you provide an image of where the first error comes from? and the parameters set on it. have you tried debugging with postman or curl?

Thank you, TJM. Yes, it is just unbelievable, how frustrating it can be. I spent 6 full days on this. Becouse of two nodes and/or Qdrant collection. Im working on Cloud free trial period. Qdrant is the same - treial period with one test collection. Dimmension 1536. Yes, I tryed debug node as well, but nothing helped. Yes, sure - I can share with you errors, but I have no idea anymore, where I am at the moment. The last days I got only errors from last (Qdrant) node. Becose if some errors come from Code node output, I could resolve it with AI assistant. However, this of course, doesn’t mean, that the problem is only with last (Qdrant) node. It could be also with previous Code node and any before it. Therefore, may I ask you give me one example of codes for Code node (Javascript) and for Qdrant Upsert node (json), and then I can share with you the result of both of them. Otherwise, I don’t know even which code now I need to write in each of these nodes. I tryed hundreds with helping with AI assistant, but result is zero. I don’t have any IT bacground, therefore I spent a lot of time to understand how it works. Many things I could understand, but not all details. Thank you very much for your help.

I see, honestly it would be hard for me to understand it unless I see what kind of Code you are writing. Another thing to remember is most APIs have a code structure they need to be able to communicate. that is a prerequisite before you send out the request .

Here’s a link to their documentation. I hope you find some answers from here..

Thank you for your help.