sort and split pdf into images and extract zip file
Configured with Agent, Aggregate, Airtable, Airtable Tool, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Transform
- Web / API
- Code
- Files / media
- AI & models
- Data store
- Routing
- Subworkflow
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| Sort Pages | Transform | Sort | See node parameters |
| Split PDF into Images | Web / API | HTTP Request | POST |
| Extract Zip File | Transform | Compression | See node parameters |
| Images To List | Code | Code | See node parameters |
| Resize Images For AI | Files / media | Edit Image | resize |
| Combine All Pages | Transform | Aggregate | See node parameters |
| Default Data Loader | Files / media | Document Default Data Loader | See node parameters |
| Recursive Character Text Splitter | Transform | Text Splitter Recursive Character Text Splitter | See node parameters |
| OpenAI Chat Model | AI & models | OpenAI Chat Model | See node parameters |
| OpenAI Chat Model2 | AI & models | OpenAI Chat Model | See node parameters |
| Embeddings OpenAI | AI & models | Embeddings Open Ai | See node parameters |
| Delete Existing Vectors | Web / API | HTTP Request | POST |
| Continue With Pages Only | Transform | Merge | See node parameters |
| Update Pitchdecks Table | Data store | Airtable | upsert |
| Search Pending Rows | Data store | Airtable | search |
| Get Row | Transform | Edit Fields | See node parameters |
| Prequisites Met | Routing | If | See node parameters |
| Execute Workflow | Subworkflow | Execute Workflow | See node parameters |
| No Operation, do nothing | Routing | No Op | See node parameters |
| Execute Workflow Trigger | Trigger | Execute Workflow Trigger | See node parameters |
| Extract from File | Transform | Extract From File | binaryToPropery |
| Convert to File | Transform | Convert To File | toBinary |
| OpenAI Chat Model1 | AI & models | OpenAI Chat Model | See node parameters |
| Vector Store Tool | AI & models | Tool Vector Store | See node parameters |
| OpenAI Chat Model3 | AI & models | OpenAI Chat Model | See node parameters |
| Embeddings OpenAI1 | AI & models | Embeddings Open Ai | See node parameters |
| OpenAI Chat Model4 | AI & models | OpenAI Chat Model | See node parameters |
| Generate Report | AI & models | Information Extractor | See node parameters |
| Download Deck From Airtable | Web / API | HTTP Request | See node parameters |
| Airtable Trigger For Pending Rows | Trigger | Airtable Trigger | See node parameters |
| Transcribe to Markdown | AI & models | Chain LLM | See node parameters |
| Identify Companies In Question | AI & models | Information Extractor | See node parameters |
| Qdrant Vector Store | Data store | Vector Store Qdrant | See node parameters |
| Ask Questions About Pitchdecks | AI & models | Agent | See node parameters |
| Window Buffer Memory | Data store | Memory Buffer Window | See node parameters |
| Check Pitch Deck Exists | Data store | Airtable Tool | search |
| When chat message received | Trigger | Chat Trigger | See node parameters |
| Pitchdecks Vector Store | Data store | Vector Store Qdrant | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
airtableTokenApiopenAiApiqdrantApi
Workflow notes
3. Split PDF Pages into Seperate Images
3. Split PDF Pages into Seperate Images
Currently, the vision model we'll be using can't accept raw PDFs so we'll have to convert our PDF to a image in order to use it. To achieve this, we'll use the free Stirling PDF webservice for convenience but if we need data privacy (recommended!), we could self-host our own Stirling PDF instance instead. Alternatively, feel free to swap this service out for one of your own as long as it can convert PDFs into images!
We will ask the PDF service to return each page of our statement as separate images, which it does so as a zip file. Next steps is to just unzip the file and convert the output as a list of images.
Privacy Warning!
Privacy Warning!
This example uses a public third party service. If your data is senstive, please swap this out for the self-hosted version!
4. Convert PDF Pages to Markdown Using Vision Model
4. Convert PDF Pages to Markdown Using Vision Model
Learn more about using the Basic LLM node
Pitch decks are fundamentally extravagant sales documents and as such, are incredibly varied in how they are styled, structured and presented. Traditional OCR has often struggled with parsing these kinds of documents as layers and graphical elements and when extracting their contents typically yields poor results; either garbled or missing texts.
Multimodal LLMs are a solution as they use AI vision to "read" the pitch deck and can reason about it's layout and intent. Images can be understood and described with context and charts and graphs can also be interpreted. In this demonstration, we'll ask our LLM to transcribe each page in the pitch deck into markdown ensuring it also describes any images or charts it sees.
5. Extract Key Data Confidently From Statement
5. Extract Key Data Confidently From Statement
Read more about the Information Extractor
With our generated markdown, we can use an information extractor node to extract required information or data point from the pitch deck. This can be useful to generate reports and later compare pitch decks against each other. Here, we'll retain the extracted data by updating the relevant row in our Airtable database.
6. Build a Vector Store Collection for the Pitch Deck
6. Build a Vector Store Collection for the Pitch Deck
Read more about Qdrant Vector Store
When it comes to pitch deck, it may not be enough to capture static attributes in table. Wouldn't it be cool if we could also ask questions about the pitch deck itself? Well, thanks for n8n's first class support for vector stores, you can and quite easily too!
In this demonstration, we'll use the Qdrant Vector Store which you can either sign-up for a free instance at https://qdrant.tech or self-host via docker. Next, it's a simple case of just funneling our transcribed pages into the vector store using the Qdrant Vector Store node.
6. Offer a Pitch Deck Q&A Chatbot to your Team
6. Offer a Pitch Deck Q&A Chatbot to your Team
Learn more about using AI Agents
Take your workflows to the next level with n8n's AI Agents! This step demonstrates how powerful and yet simple it is to spin up an AI-powered chatbot and RAG implementation over the pitch decks. This AI Agent connects to our Pitch deck vector store and because it able to filter by company, it is capable of answering any questions about any relevant pitch decks the user is enquirying about. This makes for a powerful workflow which goes beyond just reporting and is a way to engage all stakeholders!
2. Download the Pitch Deck
2. Download the Pitch Deck
Learn more about Execute Workflow Trigger
In step 1 we triggered the subworkflow with the name and Airtable asset URL of the pitch deck. We'll use the HTTP request node to download the PDF of the pitch deck. Important to note that this template only handles PDF pitch decks and if you have pitchdecks in other formats such as PPT, you'll have to convert them to PDF.
1. Trigger Workflow From Airtable
1. Trigger Workflow From Airtable
Read more about using Airtable
This workflow uses Airtable as the database to find and track which pitch decks are available and which need to be processed. You can find the example Airtable here: https://airtable.com/appCkqc2jc3MoVqDO/shrS21vGqlnqzzNUc. This workflow is also designed to run through multiple pitch decks using seperate executions. To do this, we'll send each pitch deck through the "execute workflow" to start a new subworkflow execution.
Try It Out!
Try It Out!
This n8n template imports Pitch Decks and generates a report into Airtable as well as creates an AI Chatbot to ask questions about each Pitch Deck.
- Airtable is used as the pitch deck database and PDF decks are downloaded from it.
- An AI Vision model is used to transcribe each page of the pitch deck into markdown.
- An Information Extractor is used to generate a report from the transcribed markdown and update required information back into pitch deck database.
- The transcribed markdown is also uploaded to a vector store to build an AI chatbot which can be used to ask questions on the pitch deck.
Check out the sample Airtable here: https://airtable.com/appCkqc2jc3MoVqDO/shrS21vGqlnqzzNUc
How To Use
- This template depends on the availability of the Airtable - make a duplicate of the airtable (https://airtable.com/appCkqc2jc3MoVqDO/shrS21vGqlnqzzNUc) and its columns before running the workflow.
- When a new pitchdeck is received, enter the company name into the Name column and upload the pdf into the File column. Leave all other columns blank.
- If you have the Airtable trigger active, the execution should start immediately once the file is uploaded. Otherwise, click the manual test trigger to start the workflow.
- When manually triggered, all "new" pitch decks will be handled by the workflow as separate executions.
Need Help?
Change Me!
Change Me!
Remember to update Airtable nodes to point to your own.
Change Me!
Change Me!
You'll need to update the Qdrant URL in the "Delete Existing Vectors" node.
sort and split pdf into images and extract zip file
sort and split pdf into images and extract zip file
Purpose and structure
This folder contains the sort and split pdf into images and extract zip file workflow. Its executable nodes use agent, aggregate, airtable, airtableTool, airtableTrigger, chainLlm, chatTrigger, code, compression, convertToFile, documentDefaultDataLoader, editImage, embeddingsOpenAi, executeWorkflow, executeWorkflowTrigger, extractFromFile, httpRequest, if, informationExtractor, lmChatOpenAi, manualTrigger, memoryBufferWindow, merge, noOp, set, sort, textSplitterRecursiveCharacterTextSplitter, toolVectorStore, vectorStoreQdrant. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’, Execute Workflow Trigger, Airtable Trigger For Pending Rows, When chat message received
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/0600_Code_Extractfromfile_Create_Webhook.json MIT; preserve source notices.