{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-index.sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"n8n Workflow: Parsing","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"#cdcefb","fontSize":"14px","fontWeight":"700","textTransform":"uppercase","letterSpacing":"0.05em","display":"block","marginBottom":"-30px"}},"children":["Get Started"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"n8n-workflow-parsing","__idx":0},"children":["n8n Workflow: Parsing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial shows a practical n8n workflow for asynchronous parsing with Anesya."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The goal is to:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a parsing"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Poll it until completion"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the parsing output in the next step"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This pattern works well for users who do not want to write code and need a reliable visual workflow."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"recommended-workflow-shape","__idx":1},"children":["Recommended workflow shape"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The safest n8n flow is:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Manual Trigger"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Webhook"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP Request"]}," - Create parsing"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Wait"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP Request"]}," - Retrieve parsing"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["If"]}," - Parsing final?"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Loop back to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Wait"]}," if not final"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["If"]}," - Parsing success or partial success?"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Next business step"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"option-a-start-from-a-public-url","__idx":2},"children":["Option A: Start from a public URL"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is the easiest version in n8n because it uses JSON only."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-parsing-node","__idx":3},"children":["Create parsing node"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Node type: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP Request"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recommended settings:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Method: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.anesya.app/v0/parsing"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Authentication: none"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Send headers: yes"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Header ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-Key"]},": your API key"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Send body: JSON"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Body:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"document\": \"={{$json.document_url}}\",\n  \"model\": \"PIGALLE\",\n  \"picture_description_enabled\": false,\n  \"table_verification_enabled\": false,\n  \"metadata\": {\n    \"source\": \"n8n\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The previous node must provide ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["document_url"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"option-b-start-from-a-stored-document-id","__idx":4},"children":["Option B: Start from a stored document ID"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If an earlier step already uploaded the file to Anesya or you already have a document ID, use this payload instead:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"document\": \"={{$json.document_id}}\",\n  \"model\": \"PIGALLE\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is usually simpler than sending the file content again."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"option-c-start-from-a-binary-file","__idx":5},"children":["Option C: Start from a binary file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If n8n already has the document as binary data:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST https://api.anesya.app/v0/parsing"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["switch the request body to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["multipart/form-data"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["add a form-data field named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["document"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["map that field to the binary property that contains your file"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add these extra form fields if needed:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["model"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["picture_description_enabled"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table_verification_enabled"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this only when you really need file upload from n8n. For many workflows, using a public URL or a stored document ID is simpler."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"retrieve-parsing-node","__idx":6},"children":["Retrieve parsing node"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the first request, save the returned parsing ID."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Node type: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP Request"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recommended settings:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Method: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["=https://api.anesya.app/v0/parsing/{{$json.id}}"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Header ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-Key"]},": your API key"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This node returns the current parsing state."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Important fields:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pages_success"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pages_failed"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"parsing-status-branch","__idx":7},"children":["Parsing status branch"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["If"]}," node after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Retrieve parsing"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Suggested conditions:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IN_QUEUE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IN_PROGRESS"]},": go back to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Wait"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FINISHED"]},": continue to the next step"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PARTIAL_FINISHED"]},": continue only if partial data is acceptable"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ERROR"]},": go to an error branch"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This branch is important. Do not treat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PARTIAL_FINISHED"]}," as a generic error unless your use case requires all pages."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"a-good-default-wait-time","__idx":8},"children":["A good default wait time"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A practical default is a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Wait"]}," node of about 3 seconds between polling attempts."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can increase it if your workflows are large or if you want fewer polling calls."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"recommended-downstream-steps","__idx":9},"children":["Recommended downstream steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the parsing is finished, common next actions are:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["create an extract"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["store the parsing ID for later use"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["review markdown or OCR output"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["continue with another HTTP call"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["branch on parsing quality before extraction"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-n8n-mistakes","__idx":10},"children":["Common n8n mistakes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These mistakes are common in visual workflows:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["expecting the first ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," call to return the final result"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["polling without a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Wait"]}," node"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["not branching on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ERROR"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ignoring ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PARTIAL_FINISHED"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["sending the wrong binary property in multipart mode"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-tutorials","__idx":11},"children":["Related tutorials"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tutorials/quickstart"},"children":["API quickstart"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tutorials/parsing"},"children":["Parsing guide"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tutorials/n8n/n8n-extract"},"children":["n8n Workflow: Extract"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tutorials/quickstart"},"children":["Parsing and extract status handling"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tutorials/agent-guide"},"children":["AI agent integration guide"]}]}]}]},"headings":[{"value":"n8n Workflow: Parsing","id":"n8n-workflow-parsing","depth":1},{"value":"Recommended workflow shape","id":"recommended-workflow-shape","depth":2},{"value":"Option A: Start from a public URL","id":"option-a-start-from-a-public-url","depth":2},{"value":"Create parsing node","id":"create-parsing-node","depth":3},{"value":"Option B: Start from a stored document ID","id":"option-b-start-from-a-stored-document-id","depth":2},{"value":"Option C: Start from a binary file","id":"option-c-start-from-a-binary-file","depth":2},{"value":"Retrieve parsing node","id":"retrieve-parsing-node","depth":2},{"value":"Parsing status branch","id":"parsing-status-branch","depth":2},{"value":"A good default wait time","id":"a-good-default-wait-time","depth":2},{"value":"Recommended downstream steps","id":"recommended-downstream-steps","depth":2},{"value":"Common n8n mistakes","id":"common-n8n-mistakes","depth":2},{"value":"Related tutorials","id":"related-tutorials","depth":2}],"frontmatter":{"seo":{"title":"n8n Workflow: Parsing"}},"lastModified":"2026-04-22T15:07:29.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/tutorials/n8n/n8n-parsing","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}