Generate document summaries & Q&As from PDF/TXT using GPT-4o with Slack alerts
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Azure OpenAI Chat Model, Google Sheets and Slack.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Check If Uploaded File Is PDF (If): checks a condition and branches into true / false
- Check If Uploaded File Is TXT (If): checks a condition and branches into true / false
- Extract Text from PDF File (Extract from File): extracts data from a file (pdf)
- Extract Text from TXT File (Extract from File): extracts data from a file (text)
- Generate Summary & Q&A Using AI (AI Agent): runs an AI agent, with model: Provide LLM Engine for Document Analysis; memory: Store AI Memory for Document Analysis Session; output parser: Parse AI Summary and Q&A into Structured JSON
- Validate AI Output Before Processing (If): checks a condition and branches into true / false
- Unwrap AI Output Object (Code): runs custom JavaScript code
- Log Invalid AI Output to Google Sheet (Google Sheets): append
- Prepare Final Response Payload (Code): runs custom JavaScript code
- Send Final Summary & Q&A Response to Webhook (Respond to Webhook): sends the response back to the webhook caller
…plus 1 more step. See the full node list below.
Services it uses
Other Google Sheets + Slack templates (1,314) · Other Google Sheets + Azure OpenAI templates (88) · Other Slack + Azure OpenAI templates (47)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - Extract from File
n8n-nodes-base.extractFromFile - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Azure OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatAzureOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Respond to Webhook
n8n-nodes-base.respondToWebhook - Slack
n8n-nodes-base.slack
From the author
📘 Description This workflow automates document understanding by accepting uploaded PDF or TXT files, extracting their text, generating a structured summary and question–answer set using GPT-4o, validating the AI output, and returning a clean JSON response to…