Help with Integrating Azure Document Intelligence API After Form Submission

Hi everyone,

I’m working on an automation in n8n where a user submits a form with the following fields:

  • Name
  • Surname
  • ID Number
  • ID Document (uploaded file)
  • Proof of Address (uploaded file)
  • Selfie ID (uploaded file)

After the form is submitted, I want to send the uploaded ID Document to Azure Document Intelligence API using the prebuilt-idDocument model to extract key data like the full name, ID number and DOB.

I tested the API in Postman , and it returns a raw JSON response successfully — but it’s not structured with clear fields, just a general content field. I was hoping to extract the fields (e.g., Name, DOB, ID Number) directly in n8n , but:

  • When I send the same request via HTTP Request node in n8n, it does not return structured data or fails entirely .
  • Even when trying to replicate the Postman setup, it doesn’t seem to work in n8n.
  • The API expects a POST request with a binary file (PDF/image), and I believe the issue might be around sending the file properly from the form upload to Azure via the HTTP node .

Has anyone successfully connected Azure’s Document Intelligence with n8n for ID extraction? Thanks in advance!

Hi, how did you send the PDF documents to Azure Documents Intelligence?

Hello
Were you able yl resolve the same ?!

Regards,

Not a solution to your problem but alternative, you can use Azure DI SDK (via code and langchain node in n8n) OR REST API, in my case i used code node (javascript) + REST API rather then using HTTP node, i followed Leverage Azure Document Intelligence in Langflow and n8n

Hi Vito246,

I see you have the raw JSON coming back from Azure’s prebuilt-idDocument model in Postman but hit issues when you send the file from n8n. Here’s what’s possible: with a single HTTP Request node and a short Code node you can get structured fields (Name, DOB, ID) straight after the form submits.

  1. Make sure the HTTP node sends the file as binary:
  2. • Set “Send Binary Data” to true.
  3. • In the body parameters choose the binary property that stores your uploaded PDF/image (e.g. document).
  4. • Add the header Content-Type: application/pdf or the correct mime-type.
    1. Azure expects the API-key header plus the model URL:
  5. • URL: https://{region}.api.cognitive.microsoft.com/documentintelligence/documentModels/prebuilt-idDocument/analyze?api-version=2023-10-31
  6. • Headers: Ocp-Apim-Subscription-Key: {{ yourKey }} and x-ms-useragent: n8n.
    1. The response comes back as an async operation. Grab the operation-location header, wait 2-3 seconds, then do a second HTTP node (GET) to that URL. That call returns the JSON with documents[0].fields where Name, IDNumber, DateOfBirth live.
    1. Use a Set or Code node to map those fields:
  7. `{ name: item.json.documents[0].fields.customerName.content,
  8.   idNumber: item.json.documents[0].fields.documentNumber.content,
    
  9.   dob: item.json.documents[0].fields.dateOfBirth.content }`
    
    1. Finally push the parsed data wherever you need (DB, email, etc.).
      In similar KYC workflows we cut manual data entry by 80 % and processed hundreds of IDs per hour by chaining those two HTTP nodes with a simple Wait.

The key is enabling Send Binary Data and doing the follow-up GET to the operation URL – that’s the piece Postman hides but n8n needs explicitly.

Have you already tried the two-step (POST ➜ GET) pattern, or adjusting the mime-type header?

Based on my experience – consult experts for specific advice. Hope this unblocks your ID extraction!

Cheers