Back to Integrations
integrationWebhook node
integrationS3 node

Webhook and S3 integration

Save yourself the work of writing custom integrations for Webhook and S3 and use n8n instead. Build adaptable and scalable Development, Core Nodes, and Data & Storage workflows that work with your technology stack. All within a building experience you will love.

How to connect Webhook and S3

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Webhook and S3 integration: Create a new workflow and add the first step

Step 2: Add and configure Webhook and S3 nodes

You can find Webhook and S3 in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Webhook and S3 nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Webhook and S3 integration: Add and configure Webhook and S3 nodes

Step 3: Connect Webhook and S3

A connection establishes a link between Webhook and S3 (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Webhook and S3 integration: Connect Webhook and S3

Step 4: Customize and extend your Webhook and S3 integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Webhook and S3 with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Webhook and S3 integration: Customize and extend your Webhook and S3 integration

Step 5: Test and activate your Webhook and S3 workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Webhook to S3 or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Webhook and S3 integration: Test and activate your Webhook and S3 workflow

Upload images to an S3 bucket via a Slack bot

Upload Public-Facing Images to an S3 Cloudflare Bucket via Slack Modal

🛠 Who is this for?

This workflow is for teams that use Slack for internal communication and need a streamlined way to upload public-facing images to an S3 Cloudflare bucket. It's especially beneficial for DevOps, marketing, or content management teams who frequently share assets and require efficient cloud storage integration.

💡 What problem does this workflow solve?

Manually uploading images to cloud storage can be time-consuming and disruptive, especially if you're already working in Slack. This workflow automates the process, allowing you to upload images directly from Slack via a modal popup. It reduces friction and keeps your workflow within a single platform.

🔍 What does this workflow do?

This workflow connects Slack with an S3 Cloudflare bucket to simplify the image-uploading process:
Slack Modal Interaction**: Users trigger a Slack modal to select images for upload.
Dynamic Folder Management**: Choose to create a new folder or use an existing one for uploads.
S3 Integration**: Automatically uploads the images to a specified S3 Cloudflare bucket.
Slack Confirmation**: After upload, Slack sends a confirmation with the uploaded file URLs.

🚀 Setup Instructions

Prerequisites
Slack Bot with the following permissions:
commands
files:write
files:read
chat:write
Cloudflare S3 Credentials: Create an API token with write access to your S3 bucket.
n8n Instance: Ensure n8n is properly set up with webhook capabilities.

Steps
Configure Slack Bot:
Set up a Slack app and enable the Events API.
Add your n8n webhook URL to the Events Subscription section.
Add Credentials:
Add your Slack API and S3 Cloudflare credentials to n8n.
Customize the Workflow:
Open the Idea Selector Modal node and update folder options to suit your needs.
Update the Post Image to Channel node with your Slack channel ID.
Deploy the Workflow:
Activate the workflow and test by triggering the Slack modal.

🛠 How to Customize This Workflow

Adjust the Slack Modal
You can modify the modal layout in the Idea Selector Modal node to add additional fields or adjust the styling.

Change the Bucket Structure
Update the Upload to S3 Bucket node to customize the folder paths or change naming conventions.

🔗 References and Helpful Links
Slack API Documentation
Cloudflare S3 Setup
n8n Documentation

📓 Workflow Notes
Key Features:
Slack Integration**: Uses Slack modal interactions to streamline the upload process.
Cloud Storage**: Automatically uploads to a Cloudflare S3 bucket.
User Feedback**: Sends a Slack message with file URLs upon successful upload.

Setup Dependencies:
Slack API token
Cloudflare S3 credentials
n8n webhook configuration

Sticky Notes Included
Sticky notes are embedded within the workflow to guide you through configuration and explain node functionality.

🌟 Why Use This Workflow?

This workflow keeps your image-uploading process intuitive, efficient, and fully integrated with tools you already use. By leveraging n8n's flexibility, you can ensure smooth collaboration and quick sharing of public-facing assets without switching contexts.

Nodes used in this workflow

Popular Webhook and S3 workflows

+5

Generate M&A due diligence reports with Decodo, OpenAI and Pinecone

Turn unstructured pitch decks and investment memos into polished Due Diligence PDF reports automatically. This n8n workflow handles everything from document ingestion to final delivery, combining internal document analysis with live web research to produce analyst-grade output in minutes. The Problem It Solves Reviewing a single deal manually reading the deck, cross-checking claims online, formatting the summary easily takes half a day. Multiply that by 10–20 inbound deals per week, and your team is buried in low-leverage work before any real analysis begins. This workflow compresses that cycle into a single automated pipeline. How It Works Upload: Send a PDF, DOCX, or PPTX to the webhook endpoint. Parse: LlamaParse extracts clean Markdown from complex layouts, preserving tables and financial data. Enrich: The workflow identifies the target company, then pulls supplementary data from the open web (corporate pages, risk signals) using Decodo's search and scraping APIs to verify and contextualize claims made in the source documents. Analyze: An AI Agent runs six targeted retrieval queries against the combined dataset: revenue history, key risks, business model, competitive landscape, management profile, and deal terms. Deliver: Results render into a branded HTML template, convert to PDF via Puppeteer, upload to Cloudflare R2, and return a download link. Each deal gets a unique namespace in Pinecone, so documents are isolated and repeat uploads skip redundant parsing. What You Need | Service | Role | | --- | --- | | n8n | Workflow orchestration | | LlamaIndex Cloud | Document parsing (LlamaParse) | | Pinecone | Vector storage & retrieval | | OpenAI API | Embeddings (text-embedding-3-small) & LLM analysis (GPT-5.4) | | Decodo API | Web search & page scraping | | Cloudflare R2 | Report file storage (S3-compatible) | Quick Start Import the workflow JSON into your n8n instance. Add credentials for OpenAI, Pinecone, LlamaIndex (Header Auth), Decodo, and Cloudflare R2 (S3-compatible). Update the R2 base URL in the "Build Public Report URL" node. Fire a test POST with a sample deck to the webhook. Customization Ideas Swap the HTML template to match your firm's branding and report structure. Extend the AI Agent prompt to cover additional dimensions like ESG scoring or technical debt. Route the finished PDF to Slack, email, or your CRM instead of (or alongside) R2. Troubleshooting | Symptom | Likely Fix | | --- | --- | | Parsing times out | Increase the Wait node duration; check file size against LlamaParse limits | | Thin or generic analysis | Verify the source PDF is text-based, not a scanned image, enable OCR if needed | | Broken PDF layout | Simplify CSS in the HTML render node; older Puppeteer builds handle basic layouts better | Created by: Khmuhtadin Category: Business Intelligence | Tags: AI, RAG, Due Diligence, Decodo Portfolio • Store • LinkedIn • Medium • Threads

Generate AI images via Telegram with WaveSpeed, credit system, PIX and S3

🤖 Generate images via Telegram using an AI bot with a credit system and S3 storage A complete, production-ready Telegram bot for AI-powered image generation and editing, featuring a built-in credit system, payment integration, and cloud storage. ✨ Features 🎨 AI Image Generation Text-to-Image: Generate stunning images from text prompts using the **Nano Banana Pro Ultra model via WaveSpeed API Image-to-Image Editing**: Edit existing images by sending a photo with a caption describing the desired changes Multiple Resolutions: Support for both **4K and 8K output quality Flexible Aspect Ratios**: Choose from 10 different aspect ratios (1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9) 💳 Credit Management System Per-generation billing**: Different costs for 4K vs 8K resolution Balance tracking**: Real-time credit balance displayed to users Initial credits**: New users receive starter credits automatically Insufficient balance handling**: Graceful messages when credits run out Here's the adjusted payment section: 💰 Payment Integration (Mercado Pago PIX) > About PIX: PIX is Brazil's instant payment system, launched by the Central Bank of Brazil in 2020. It allows instant money transfers 24/7, 365 days a year, using QR codes or copy-paste codes. It has become the most popular payment method in Brazil due to its speed and zero fees for individuals. This workflow includes a fully integrated PIX payment flow as a reference implementation. You can adapt it to your local payment provider. Features: Multiple deposit options**: Pre-configured credit packages (R$ 3, R$ 6, R$ 10) QR Code generation**: Automatic PIX QR code sent directly to users via Telegram Copy-paste code**: PIX code provided for manual payment Webhook confirmation**: Real-time payment status updates via Mercado Pago webhooks Auto credit top-up**: Credits added automatically upon payment approval Payment status handling**: Supports approved, pending, and rejected states > 💡 Tip: To adapt this for other regions, replace the Mercado Pago nodes with your preferred payment gateway (Stripe, PayPal, etc.) while keeping the same credit update logic. ⚙️ User Configuration Resolution settings**: Users can set their preferred default resolution Aspect ratio preferences**: Save preferred aspect ratio for future generations Custom default prompts**: Set a default prompt that's automatically appended to all generations Persistent settings**: All preferences stored in n8n Data Tables 📦 Cloud Storage (S3/MinIO) Automatic upload**: Generated images are automatically uploaded to S3-compatible storage Persistent URLs**: Images remain accessible via permanent links Edit from storage**: Reference previously uploaded images for editing 🛠️ Tech Stack | Component | Technology | |-----------|------------| | Bot Platform | Telegram Bot API | | AI Generation | WaveSpeed API (Nano Banana Pro) | | Storage | S3-compatible (MinIO/AWS S3) | | Database | n8n Data Tables | | Payments | Mercado Pago PIX | | Automation | n8n | 📋 Prerequisites Before using this workflow, you'll need: Telegram Bot Token - Create a bot via @BotFather WaveSpeed API Key - Sign up at WaveSpeed S3-compatible Storage - MinIO, AWS S3, or any S3-compatible service Mercado Pago Account (optional) - For payment integration n8n Data Table - Create a table with the required schema 📊 Data Table Schema Create a Data Table with the following columns: | Column | Type | Description | |--------|------|-------------| | chat_id | String | Telegram chat ID (primary key) | | username | String | Telegram username | | status | String | Current user state in the flow | | credits | String | User's credit balance | | resolution | String | Preferred resolution (4k/8k) | | aspect_ratio | String | Preferred aspect ratio | | user_default_prompt | String | Custom default prompt | | number_images | Number | Total images generated | | number_videos | Number | Total videos generated | | demo_sended | Boolean | Welcome demo sent flag | ⚡ Quick Setup Import the workflow into your n8n instance Configure the Global Environment node with your settings: botName: Your bot's display name botToken: Your Telegram bot token dataTableId: Your n8n Data Table ID bucketName: Your S3 bucket name initialCredits: Credits given to new users generateImageCost4k: Cost per 4K image generateImageCost8k: Cost per 8K image Set up credentials: Telegram API credentials WaveSpeed API credentials S3 credentials Mercado Pago credentials (if using payments) Activate the workflow 🎮 Bot Commands | Command | Description | |---------|-------------| | /start | Initialize bot and receive welcome message | | menu | Return to main menu | | config | Open settings menu | | Any text | Generate image from prompt (when in generation mode) | | Photo + caption | Edit the photo based on the caption | 🔄 Workflow Flow User Message → Telegram Trigger → Route by Status ↓ ┌───────────────────┼───────────────────┐ ↓ ↓ ↓ New User Generate Image Edit Image ↓ ↓ ↓ Welcome Flow Check Credits Check Credits ↓ ↓ ↓ Create User Submit to WaveSpeed Upload to S3 ↓ ↓ ↓ Show Menu Poll for Result Submit Edit ↓ ↓ Download Image Poll for Result ↓ ↓ Send to User ←←←←←←←←←←←←←┘ 📝 Notes The workflow uses polling to check generation status - WaveSpeed processes may take up to 1 minute Credits are deducted when the task is submitted and refunded if generation fails All user states are managed through the Data Table for persistence across restarts 📄 License Free to use and modify. Attribution appreciated but not required.
+5

Generate AI-powered investment due diligence PDF reports with OpenAI, LlamaParse and Decodo

Transform raw investment memorandums and financial decks into comprehensive, professional Due Diligence (DD) PDF reports. This workflow automates document parsing via LlamaParse, enriches internal data with real-time web intelligence using Decodo, and utilizes an AI Agent to synthesize structured financial analysis, risk assessments, and investment theses. Why Use This Workflow? Time Savings:** Reduces initial deal screening and report generation from 6–8 hours of manual analysis to under 5 minutes. Accuracy & Depth:** Employs a multi-query RAG (Retrieval-Augmented Generation) strategy that cross-references internal deal documents with verified external web evidence. Cost Reduction:** Eliminates the need for expensive junior analyst hours for preliminary data gathering and document summarization. Scalability:** Effortlessly processes multiple deals simultaneously, maintaining a consistent reporting standard across your entire pipeline. Ideal For Venture Capital & Private Equity:** Rapidly assessing incoming pitch decks and CIMs (Confidential Information Memorandums). M&A Advisory Teams:** Automating the creation of standardized target company profiles and risk summaries. Investment Analysts:** Generating structured data from unstructured PDFs to feed into internal valuation models. How It Works Trigger: A webhook receives document uploads (PDF, DOCX, PPTX) via a custom portal or API. Data Collection: LlamaParse converts complex document layouts into clean Markdown, preserving tables and financial structures. Processing: The workflow generates a unique "Deal ID" based on filenames to ensure data isolation and implements a caching layer via Pinecone to avoid redundant parsing. Intelligence Layer: Web Enrichment: The workflow derives the target company name and uses Decodo to scrape official websites for "About" and "Commercial Risk" data. Multi-Query RAG: An OpenAI-powered agent executes six specific retrieval queries (Financials, Risks, Business Model, etc.) to gather evidence from all sources. Output & Delivery: Analysis is mapped to a structured template, rendered into a professional HTML report, and converted to a high-quality PDF using Puppeteer. Storage & Logging: The final report is uploaded to Cloudflare R2, and a public, secure URL is returned to the user instantly. Setup Guide Prerequisites | Requirement | Type | Purpose | | --- | --- | --- | | n8n instance | Essential | Core automation and workflow orchestration | | LlamaIndex Cloud | Essential | High-accuracy document parsing (LlamaParse) | | Pinecone | Essential | Vector database for document and web evidence storage | | OpenAI API | Essential | LLM for embeddings and expert analysis (Embedding Small & GPT-5.2) | | Decodo API | Essential | Real-time web searching and markdown scraping | | R2 Bucket | Essential | Secure storage for the generated PDF reports | Installation Steps Import the JSON file to your n8n instance. Configure credentials: OpenAI: Add your API key for embeddings and the Chat Model. Pinecone: Enter your API Key and Index name (default: poc). LlamaIndex: Add your API key under Header Auth (Authorization: Bearer YOUR_KEY). Decodo: Set up your Decodo API credentials for web search and scraping. AWS S3: Configure your bucket name and access keys. Update environment-specific values: In the "Build Public Report URL" node, update the baseUrl to match your S3 bucket's public endpoint or CDN. Test execution: Send a POST request to the webhook URL with a binary file (e.g., a Pitch Deck) to verify the end-to-end generation. Technical Details Core Nodes | Node | Purpose | Key Configuration | | --- | --- | --- | | LlamaParse (HTTP) | Document Conversion | Uses the /parsing/upload and /job/result endpoints for high-fidelity markdown | | Pinecone Vector Store | Context Storage | Implements namespace-based isolation using the unique dealId | | Decodo Search/Scrape | Web Intelligence | Dynamically identifies the official domain and extracts corporate metadata | | AI Agent | Strategic Analysis | Configured with a "Senior Investment Analyst" system prompt and 6-step retrieval logic | | Puppeteer | PDF Generation | Renders the styled HTML report into a print-ready A4 PDF | Workflow Logic The workflow uses a Multi-Query Retrieval strategy. Instead of asking one generic question, the AI Agent is forced to perform six distinct searches against the vector database (Revenue History, Key Risks, etc.). This ensures that even if a document is 100 pages long, the AI doesn't "miss" critical financial tables or risk disclosures buried in the text. Customization Options Basic Adjustments Report Styling:** Edit the "Render DD Report HTML" node to match your firm's branding (logo, colors, fonts). Analysis Scope:** Modify the AI Agent's prompt to include specific metrics (e.g., "ESG Score" or "Technical Debt Assessment"). Advanced Enhancements Slack/Email Integration:** Instead of just an S3 link, have n8n send the PDF directly to a #new-deals Slack channel. CRM Sync:** Automatically create a new record in HubSpot or Salesforce with the structured JSON output attached. Troubleshooting | Problem | Cause | Solution | | --- | --- | --- | | Parsing Timeout | File is too large for synchronous processing | Increase the "Wait" node duration or check LlamaParse job limits | | Low Analysis Quality | Insufficient context in documents | Ensure documents are text-based PDFs (not scans) or enable OCR in LlamaParse | | PDF Layout Broken | CSS incompatibility in Puppeteer | Simplify CSS in the HTML node; avoid complex Flexbox/Grid if Puppeteer version is older | Use Case Examples Scenario 1: Venture Capital Deal Screening Challenge: A VC associate receives 20 pitch decks a day and spends hours manually summarizing company profiles. Solution: This workflow parses the deck and web-scrapes the startup's site to verify claims. Result: The associate receives a 3-page PDF summary for every deck, allowing them to reject or move forward in seconds. Scenario 2: Private Equity Due Diligence Challenge: Analyzing a 150-page CIM (Information Memorandum) for specific financial "red flags." Solution: The AI Agent is programmed to specifically hunt for customer concentration and margin fluctuations. Result: Consistent risk identification across all deals, regardless of which analyst is assigned to the project. Created by: Khmuhtadin Category: Business Intelligence | Tags: Decodo, AI, RAG, Due Diligence, LlamaIndex, Pinecone Need custom workflows? Contact us Connect with the creator: Portfolio • Store • LinkedIn • Medium • Threads
+5

Generate due diligence reports with LlamaIndex, Pinecone, and GPT-5-mini

Streamline M&A due diligence with AI. This n8n workflow automatically parses financial documents using LlamaIndex, embeds data into Pinecone, and generates comprehensive, AI-driven reports with GPT-5-mini, saving hours of manual review and ensuring consistent, data-backed insights. Why Use This Workflow? Time Savings: Reduces manual document review and report generation from days to minutes. Cost Reduction: Minimizes reliance on expensive human analysts for initial data extraction and summary. Error Prevention: AI-driven analysis ensures consistent data extraction, reducing human error and oversight. Scalability: Effortlessly processes multiple documents and deals in parallel, scaling with your business needs. Ideal For Investment Analysts & Private Equity Firms:** Quickly evaluate target companies by automating the extraction of key financials, risks, and business models from deal documents. M&A Advisors:** Conduct preliminary due diligence efficiently, generating comprehensive overview reports for clients without extensive manual effort. Financial Professionals:** Accelerate research and analysis of company filings, investor presentations, and market reports for critical decision-making. How It Works Trigger: A webhook receives multiple due diligence documents (PDFs, DOCX, XLSX) along with associated metadata. Document Processing & Cache Check: Files are split individually. The workflow first checks Pinecone to see if the deal's documents have been processed before (cache hit). If so, it skips parsing and embedding. Data Extraction (LlamaIndex): For new deals, each document is sent to LlamaIndex for advanced parsing, extracting structured text content. Vectorization & Storage: The parsed text is then converted into numerical vector embeddings using OpenAI and stored in Pinecone, our vector database, with relevant metadata. AI-Powered Analysis (Langchain Agent): An n8n Langchain Agent, acting as a "Senior Investment Analyst," leverages GPT-5-mini to query Pinecone multiple times for specific information (e.g., company profile, financials, risks, business model). It synthesizes these findings into a structured JSON output. Report Generation: The structured AI output is transformed into an HTML report, then converted into a professional PDF document. Secure Storage & Delivery: The final PDF due diligence report is uploaded to an S3 bucket, and a public URL is returned via the initial webhook, providing instant access. Setup Guide Prerequisites | Requirement | Type | Purpose | | :---------- | :--- | :------ | | n8n instance | Essential | Workflow execution platform | | LlamaIndex API Key | Essential | For robust document parsing and text extraction | | OpenAI API Key | Essential | For creating text embeddings and powering the GPT-5-mini AI agent | | Pinecone API Key | Essential | For storing and retrieving vector embeddings | | AWS S3 Account | Essential | For secure storage of generated PDF reports | Installation Steps Import the JSON file to your n8n instance. Configure credentials: LlamaIndex: Create an "HTTP Header Auth" credential with x-api-key in the header and your LlamaIndex API key as the value. OpenAI: Create an "OpenAI API" credential with your OpenAI API key. Ensure the credential name is "Sumopod" or update the workflow nodes accordingly. Pinecone: Create a "Pinecone API" credential with your Pinecone API key and environment. Ensure the credential name is "w3khmuhtadin" or update the workflow nodes accordingly. AWS S3: Create an "AWS S3" credential with your Access Key ID and Secret Access Key. Update environment-specific values: In the "Upload to S3" node, ensure the bucketName is set to your desired S3 bucket. In the "Create Public URL" node, update the baseUrl variable to match your S3 bucket's public access URL or CDN if applicable (e.g., https://your-s3-bucket-name.s3.amazonaws.com). Customize settings: Review the prompt in the "Analyze" (Langchain Agent) node to adjust the AI's persona or required queries if needed. Test execution: Send sample documents (PDF, DOCX, XLSX) to the webhook URL (/webhook/dd-ai) to verify all connections and processing steps work as expected. Technical Details Core Nodes | Node | Purpose | Key Configuration | | :------------------------------ | :--------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------- | | Webhook | Initiates workflow with document uploads | Path: dd-ai, HTTP Method: POST | | Split Multi-File (Code) | Splits binary files, generates unique deal ID | Parses filenames from body or binary, creates dealId from sorted names. | | Parse Document via LlamaIndex | Extracts structured text from various document types | URL: https://api.cloud.llamaindex.ai/api/v1/parsing/upload, Authentication: HTTP Header Auth with x-api-key. | | Monitor Document Processing | Polls LlamaIndex for parsing status | URL: https://api.cloud.llamaindex.ai/api/v1/parsing/job/{{ $json.id }}, Authentication: HTTP Header Auth. | | Insert to Pinecone | Stores vector embeddings in Pinecone | Mode: insert, Pinecone Index: poc, Pinecone Namespace: dealId. | | Data Retrieval (Pinecone) | Enables AI agent to search due diligence documents | Mode: retrieve-as-tool, Pinecone Index: poc, Pinecone Namespace: {{ $json.dealId }}, topK: 100. | | Analyze (Langchain Agent) | Orchestrates AI analysis using specific queries | Prompt Type: define, detailed role and 6 mandatory Pinecone queries, Model: gpt-5-mini, Output Parser: Parser. | | Generate PDF (Puppeteer) | Converts HTML report to a professional PDF | Script Code: await $page.pdf(...) with A4 format, margins, and 60s timeout. | | Upload to S3 | Stores final PDF reports securely | Bucket Name: poc, File Name: {{ $json.fileName }}, Credentials: AWS S3. | | If (Check Namespace Exists) | Implements caching logic | Checks stats.namespaces[dealId].vectorCount > 0 to determine cache hit/miss. | Workflow Logic The workflow begins by accepting multiple files via a webhook. It intelligently checks if the specific "deal" (identified by a unique ID generated from filenames) has already had its documents processed and embedded in Pinecone. This cache mechanism prevents redundant processing, saving time and API costs. If a cache miss occurs, documents are parsed by LlamaIndex, their content vectorized by OpenAI, and stored in a Pinecone namespace unique to the deal. For analysis, a Langchain Agent, powered by GPT-5-mini, is instructed with a specific persona and a mandatory sequence of Pinecone queries (e.g., company overview, financials, risks). It uses the Data Retrieval tool to interact with Pinecone, synthesizing information from the stored embeddings. The AI's output is then structured by a dedicated parser, transformed into a human-readable HTML report, and converted into a PDF. Finally, this comprehensive report is uploaded to AWS S3, and a public access URL is provided as a response. Customization Options Basic Adjustments: AI Prompt Refinement:** Modify the Prompt field in the "Analyze" (Langchain Agent) node to adjust the AI's persona, introduce new mandatory queries, or change reporting style. Output Schema:** Update the JSON schema in the "Parser" (Langchain Output Parser Structured) node to include additional fields or change the structure of the AI's output. Advanced Enhancements: Integration with CRM/Dataroom:** Add nodes to automatically fetch documents from or update status in a CRM (e.g., Salesforce, HubSpot) or a virtual data room (e.g., CapLinked, Datasite). Conditional Analysis:** Implement logic to trigger different analysis paths or generate different report sections based on document content or deal parameters. Notification System:** Integrate with Slack, Microsoft Teams, or email to send notifications upon report generation or specific risk identification. Use Case Examples Scenario 1: Private Equity Firm Evaluating a Target Company Challenge: A private equity firm receives dozens of due diligence documents (financials, CIM, management presentations) for a potential acquisition, needing a rapid initial assessment. Solution: The workflow ingests all documents, automatically parses them, and an AI agent synthesizes key company information, financial summaries (revenue history, margins), and identified risks into a structured report within minutes. Result: The firm's analysts gain an immediate, comprehensive overview, enabling faster screening and more focused deep-dive questions, significantly accelerating the deal cycle. Scenario 2: M&A Advisor Conducting Preliminary Due Diligence Challenge: An M&A advisory firm needs to provide clients with a quick, consistent, and standardized preliminary due diligence report across multiple prospects. Solution: Advisors upload relevant prospect documents to the workflow. The AI-powered system automatically extracts core business model details, investment thesis highlights, and customer concentration analysis, along with key financials. Result: The firm can generate standardized, high-quality preliminary reports efficiently, ensuring consistency across all client engagements and freeing up senior staff for strategic analysis. Created by: Khmuhtadin Category: AI | Tags: Due Diligence, AI, Automation, M&A, LlamaIndex, Pinecone, GPT-5-mini, Document Processing Need custom workflows? Contact us Connect with the creator: Portfolio • Workflows • LinkedIn • Medium • Threads
+5

Generate M&A due diligence PDF reports with LlamaIndex, OpenAI, Pinecone, and S3

Streamline M&A due diligence with AI. This n8n workflow automatically parses financial documents using LlamaIndex, embeds data into Pinecone, and generates comprehensive, AI-driven reports with GPT-5-mini, saving hours of manual review and ensuring consistent, data-backed insights. Why Use This Workflow? Time Savings: Reduces manual document review and report generation from days to minutes. Cost Reduction: Minimizes reliance on expensive human analysts for initial data extraction and summary. Error Prevention: AI-driven analysis ensures consistent data extraction, reducing human error and oversight. Scalability: Effortlessly processes multiple documents and deals in parallel, scaling with your business needs. Ideal For Investment Analysts & Private Equity Firms:** Quickly evaluate target companies by automating the extraction of key financials, risks, and business models from deal documents. M&A Advisors:** Conduct preliminary due diligence efficiently, generating comprehensive overview reports for clients without extensive manual effort. Financial Professionals:** Accelerate research and analysis of company filings, investor presentations, and market reports for critical decision-making. How It Works Trigger: A webhook receives multiple due diligence documents (PDFs, DOCX, XLSX) along with associated metadata. Document Processing & Cache Check: Files are split individually. The workflow first checks Pinecone to see if the deal's documents have been processed before (cache hit). If so, it skips parsing and embedding. Data Extraction (LlamaIndex): For new deals, each document is sent to LlamaIndex for advanced parsing, extracting structured text content. Vectorization & Storage: The parsed text is then converted into numerical vector embeddings using OpenAI and stored in Pinecone, our vector database, with relevant metadata. AI-Powered Analysis (Langchain Agent): An n8n Langchain Agent, acting as a "Senior Investment Analyst," leverages GPT-5-mini to query Pinecone multiple times for specific information (e.g., company profile, financials, risks, business model). It synthesizes these findings into a structured JSON output. Report Generation: The structured AI output is transformed into an HTML report, then converted into a professional PDF document. Secure Storage & Delivery: The final PDF due diligence report is uploaded to an S3 bucket, and a public URL is returned via the initial webhook, providing instant access. Setup Guide Prerequisites | Requirement | Type | Purpose | | :---------- | :--- | :------ | | n8n instance | Essential | Workflow execution platform | | LlamaIndex API Key | Essential | For robust document parsing and text extraction | | OpenAI API Key | Essential | For creating text embeddings and powering the GPT-5-mini AI agent | | Pinecone API Key | Essential | For storing and retrieving vector embeddings | | AWS S3 Account | Essential | For secure storage of generated PDF reports | Installation Steps Import the JSON file to your n8n instance. Configure credentials: LlamaIndex: Create an "HTTP Header Auth" credential with x-api-key in the header and your LlamaIndex API key as the value. OpenAI: Create an "OpenAI API" credential with your OpenAI API key. Ensure the credential name is "Sumopod" or update the workflow nodes accordingly. Pinecone: Create a "Pinecone API" credential with your Pinecone API key and environment. Ensure the credential name is "w3khmuhtadin" or update the workflow nodes accordingly. AWS S3: Create an "AWS S3" credential with your Access Key ID and Secret Access Key. Update environment-specific values: In the "Upload to S3" node, ensure the bucketName is set to your desired S3 bucket. In the "Create Public URL" node, update the baseUrl variable to match your S3 bucket's public access URL or CDN if applicable (e.g., https://your-s3-bucket-name.s3.amazonaws.com). Customize settings: Review the prompt in the "Analyze" (Langchain Agent) node to adjust the AI's persona or required queries if needed. Test execution: Send sample documents (PDF, DOCX, XLSX) to the webhook URL (/webhook/dd-ai) to verify all connections and processing steps work as expected. Technical Details Core Nodes | Node | Purpose | Key Configuration | | :------------------------------ | :--------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------- | | Webhook | Initiates workflow with document uploads | Path: dd-ai, HTTP Method: POST | | Split Multi-File (Code) | Splits binary files, generates unique deal ID | Parses filenames from body or binary, creates dealId from sorted names. | | Parse Document via LlamaIndex | Extracts structured text from various document types | URL: https://api.cloud.llamaindex.ai/api/v1/parsing/upload, Authentication: HTTP Header Auth with x-api-key. | | Monitor Document Processing | Polls LlamaIndex for parsing status | URL: https://api.cloud.llamaindex.ai/api/v1/parsing/job/{{ $json.id }}, Authentication: HTTP Header Auth. | | Insert to Pinecone | Stores vector embeddings in Pinecone | Mode: insert, Pinecone Index: poc, Pinecone Namespace: dealId. | | Data Retrieval (Pinecone) | Enables AI agent to search due diligence documents | Mode: retrieve-as-tool, Pinecone Index: poc, Pinecone Namespace: {{ $json.dealId }}, topK: 100. | | Analyze (Langchain Agent) | Orchestrates AI analysis using specific queries | Prompt Type: define, detailed role and 6 mandatory Pinecone queries, Model: gpt-5-mini, Output Parser: Parser. | | Generate PDF (Puppeteer) | Converts HTML report to a professional PDF | Script Code: await $page.pdf(...) with A4 format, margins, and 60s timeout. | | Upload to S3 | Stores final PDF reports securely | Bucket Name: poc, File Name: {{ $json.fileName }}, Credentials: AWS S3. | | If (Check Namespace Exists) | Implements caching logic | Checks stats.namespaces[dealId].vectorCount > 0 to determine cache hit/miss. | Workflow Logic The workflow begins by accepting multiple files via a webhook. It intelligently checks if the specific "deal" (identified by a unique ID generated from filenames) has already had its documents processed and embedded in Pinecone. This cache mechanism prevents redundant processing, saving time and API costs. If a cache miss occurs, documents are parsed by LlamaIndex, their content vectorized by OpenAI, and stored in a Pinecone namespace unique to the deal. For analysis, a Langchain Agent, powered by GPT-5-mini, is instructed with a specific persona and a mandatory sequence of Pinecone queries (e.g., company overview, financials, risks). It uses the Data Retrieval tool to interact with Pinecone, synthesizing information from the stored embeddings. The AI's output is then structured by a dedicated parser, transformed into a human-readable HTML report, and converted into a PDF. Finally, this comprehensive report is uploaded to AWS S3, and a public access URL is provided as a response. Customization Options Basic Adjustments: AI Prompt Refinement:** Modify the Prompt field in the "Analyze" (Langchain Agent) node to adjust the AI's persona, introduce new mandatory queries, or change reporting style. Output Schema:** Update the JSON schema in the "Parser" (Langchain Output Parser Structured) node to include additional fields or change the structure of the AI's output. Advanced Enhancements: Integration with CRM/Dataroom:** Add nodes to automatically fetch documents from or update status in a CRM (e.g., Salesforce, HubSpot) or a virtual data room (e.g., CapLinked, Datasite). Conditional Analysis:** Implement logic to trigger different analysis paths or generate different report sections based on document content or deal parameters. Notification System:** Integrate with Slack, Microsoft Teams, or email to send notifications upon report generation or specific risk identification. Use Case Examples Scenario 1: Private Equity Firm Evaluating a Target Company Challenge: A private equity firm receives dozens of due diligence documents (financials, CIM, management presentations) for a potential acquisition, needing a rapid initial assessment. Solution: The workflow ingests all documents, automatically parses them, and an AI agent synthesizes key company information, financial summaries (revenue history, margins), and identified risks into a structured report within minutes. Result: The firm's analysts gain an immediate, comprehensive overview, enabling faster screening and more focused deep-dive questions, significantly accelerating the deal cycle. Scenario 2: M&A Advisor Conducting Preliminary Due Diligence Challenge: An M&A advisory firm needs to provide clients with a quick, consistent, and standardized preliminary due diligence report across multiple prospects. Solution: Advisors upload relevant prospect documents to the workflow. The AI-powered system automatically extracts core business model details, investment thesis highlights, and customer concentration analysis, along with key financials. Result: The firm can generate standardized, high-quality preliminary reports efficiently, ensuring consistency across all client engagements and freeing up senior staff for strategic analysis. Created by: Khmuhtadin Category: AI | Tags: Due Diligence, AI, Automation, M&A, LlamaIndex, Pinecone, GPT-5-mini, Document Processing Need custom workflows? Contact us Connect with the creator: Portfolio • Workflows • LinkedIn • Medium • Threads

🔄 Async Video Polling Engine - Background Job Handler for AI Video Generation

🔄 AI Video Polling Engine - Long-Running Job Handler for Veo, Sora & Seedance The async backbone that makes AI video generation production-ready ⚡🎬 🎥 See It In Action 🔗 Full Demo: youtu.be/OI_oJ_2F1O0 ⚠️ Must Read First This is a companion workflow for the main AI Shorts Generator: 🔗 Main Workflow: AI Shorts Reactor This workflow handles the "waiting game" so your main bot stays fast and responsive. Think of it as the backstage crew that handles the heavy lifting while your main workflow performs on stage. 🤔 The Problem This Solves Without This Workflow: User sends message ↓ Bot calls AI API ↓ ⏳ Bot waits 2-5 minutes... (BLOCKED) ↓ ❌ Timeout errors ❌ Execution limits exceeded ❌ Users think bot is broken ❌ Can't handle multiple requests With This Workflow: User sends message ↓ Bot calls AI API ↓ ✅ Bot responds instantly: "Video generating..." ↓ 🔄 This webhook polls in background ↓ ⚡ Main bot handles other users ↓ ✅ Video ready → Auto-sends to user Result: Your bot feels instant, scales infinitely, and never times out 🚀 🔁 What This Workflow Does This is a dedicated polling webhook that acts as the async job handler for AI video generation. It's the invisible worker that: 1️⃣ Receives the Job POST /webhook/poll-video { "sessionId": "user_123", "taskId": "veo_abc456", "model": "veo3", "attempt": 1 } 2️⃣ Responds Instantly 200 OK - "Polling started" (Main workflow never waits!) 3️⃣ Polls in Background Wait 60s → Check status → Repeat ⏱️ Waits 1 minute between checks (API-friendly) 🔄 Polls up to 15 times (~15 minutes max) 🎯 Supports Veo, Sora, and Seedance APIs 4️⃣ Detects Completion Handles multiple API response formats: // Veo format { status: "completed", videoUrl: "https://..." } // Market format (Sora/Seedance) { job: { status: "success", result: { url: "..." } } } // Legacy format { data: { video_url: "..." } } (No matter how the API responds, this workflow figures it out) 5️⃣ Delivers the Video Once ready: 📥 Downloads video from AI provider ☁️ Uploads to your S3 storage 💾 Restores user session from Redis 📱 Sends Telegram preview with buttons 🔄 Enables video extension (Veo only) 📊 Logs metadata for analytics ⚙️ Technical Architecture The Flow: Main Workflow Polling Webhook │ │ ├──[Trigger AI Job]──────────┤ │ "Task ID: abc123" │ │ │ ├──[Return Instantly] │ │ "Generating..." │ │ │ ├──[Handle New User] │ │ ├──[Wait 60s] │ │ │ ├──[Check Status] │ │ "Processing..." │ │ │ ├──[Wait 60s] │ │ │ ├──[Check Status] │ │ "Completed!" │ │ │ ├──[Download Video] │ │ │ ├──[Upload to S3] │ │ │ └──[Send to User] │ │ └──────────────────────────────────┘ "Your video is ready!" 🚀 Key Features ⚡ Non-Blocking Architecture Main workflow never waits Handle unlimited concurrent jobs Each user gets instant responses 🔄 Intelligent Polling Respects API rate limits (60s intervals) Auto-retries on transient failures Graceful timeout handling (15 attempts max) 🎯 Multi-Provider Support Handles different API formats: Veo** - record-info endpoint Sora** - Market job status Seedance** - Market job status 🛡️ Robust Error Handling ✅ Missing video URL → Retry with fallback parsers ✅ API timeout → Continue polling ✅ Invalid response → Parse alternative formats ✅ Max attempts reached → Notify user gracefully 💾 Session Management Stores state in Redis Restores full context when video is ready Supports video extension workflows Maintains user preferences 📊 Production Features Detailed logging at each step Metadata tracking (generation time, model used, etc.) S3 storage integration Telegram notifications Analytics-ready data structure 🧩 Integration Points Works Seamlessly With: | Use Case | How It Helps | |----------|--------------| | 🤖 Telegram Bots | Keeps bot responsive during 2-5 min video generation | | 📺 YouTube Automation | Polls video, then triggers auto-publish | | 🎬 Multi-Video Pipelines | Handles 10+ videos simultaneously | | 🏢 Content Agencies | Production-grade reliability for clients | | 🧪 A/B Testing | Generate multiple variations without blocking | Required Components: ✅ Main workflow that triggers video generation ✅ Redis for session storage ✅ S3-compatible storage for videos ✅ KIE.ai API credentials ✅ Telegram Bot (for notifications) 📋 How to Use Step 1: Set Up Main Workflow Import and configure the AI Shorts Reactor Step 2: Import This Webhook Add this workflow to your n8n instance Step 3: Configure Credentials KIE.ai API key Redis connection S3 storage credentials Telegram bot token Step 4: Link Workflows In your main workflow, call this webhook: // After triggering AI video generation const response = await httpRequest({ method: 'POST', url: 'YOUR_WEBHOOK_URL/poll-video', body: { sessionId: sessionId, taskId: taskId, model: 'veo3', attempt: 1 } }); Step 5: Activate & Test Activate this polling webhook Trigger a video generation from main workflow Watch it poll in background and deliver results 🎯 Real-World Example Scenario: User generates 3 videos simultaneously Without This Workflow: User A: "Generate video" → Bot: ⏳ Processing... (BLOCKED 5 min) User B: "Generate video" → Bot: ❌ Timeout (main workflow still processing User A) User C: "Generate video" → Bot: ❌ Never receives request With This Workflow: User A: "Generate video" → Bot: ✅ "Generating! Check back in 3 min" → Polling webhook handles in background User B: "Generate video" → Bot: ✅ "Generating! Check back in 3 min" → Second polling instance starts User C: "Generate video" → Bot: ✅ "Generating! Check back in 3 min" → Third polling instance starts 3 minutes later--- User A: 📹 "Your video is ready!" [Preview] [Publish] User B: 📹 "Your video is ready!" [Preview] [Publish] User C: 📹 "Your video is ready!" [Preview] [Publish] All three users served simultaneously with zero blocking! 🚀 🔧 Customization Options Adjust Polling Frequency // Default: 60 seconds // For faster testing (use credits faster): const waitTime = 30; // seconds // For more API-friendly (slower updates): const waitTime = 90; // seconds Change Timeout Limits // Default: 15 attempts (15 minutes) const maxAttempts = 20; // Increase for longer videos Add More Providers Extend to support other AI video APIs: switch(model) { case 'veo3': // Existing Veo logic case 'runway': // Add Runway ML polling case 'pika': // Add Pika Labs polling } Custom Notifications Replace Telegram with: Discord webhooks Slack messages Email notifications SMS via Twilio Push notifications 📊 Monitoring & Analytics What Gets Logged: { "sessionId": "user_123", "taskId": "veo_abc456", "model": "veo3", "status": "completed", "attempts": 7, "totalTime": "6m 32s", "videoUrl": "s3://bucket/videos/abc456.mp4", "metadata": { "duration": 5.2, "resolution": "1080x1920", "fileSize": "4.7MB" } } Track Key Metrics: ⏱️ Average generation time per model 🔄 Polling attempts before completion ❌ Failure rate by provider 💰 Cost per video (API usage) 📈 Concurrent job capacity 🚨 Troubleshooting "Video never completes" ✅ Check KIE.ai API status ✅ Verify task ID is valid ✅ Increase maxAttempts if needed ✅ Check API response format hasn't changed "Polling stops after 1 attempt" ✅ Ensure webhook URL is correct ✅ Check n8n execution limits ✅ Verify Redis connection is stable "Video downloads but doesn't send" ✅ Check Telegram bot credentials ✅ Verify S3 upload succeeded ✅ Ensure Redis session exists ✅ Check Telegram chat ID is valid "Multiple videos get mixed up" ✅ Confirm sessionId is unique per user ✅ Check Redis key collisions ✅ Verify taskId is properly passed 🏗️ Architecture Benefits Why Separate This Logic? | Aspect | Monolithic Workflow | Separated Webhook | |--------|--------------------|--------------------| | ⚡ Response Time | 2-5 minutes | <1 second | | 🔄 Concurrency | 1 job at a time | Unlimited | | 💰 Execution Costs | High (long-running) | Low (short bursts) | | 🐛 Debugging | Hard (mixed concerns) | Easy (isolated logic) | | 📈 Scalability | Poor | Excellent | | 🔧 Maintenance | Complex | Simple | 🛠️ Requirements Services Needed: ✅ n8n Instance (cloud or self-hosted) ✅ KIE.ai API (Veo, Sora, Seedance access) ✅ Redis (session storage) ✅ S3-compatible Storage (videos) ✅ Telegram Bot (optional, for notifications) Skills Required: Basic n8n knowledge Understanding of webhooks Redis basics (key-value storage) S3 upload concepts Setup Time: ~15 minutes Technical Level: Intermediate 🏷️ Tags webhook polling async-jobs long-running-tasks ai-video veo sora seedance production-ready redis s3 telegram youtube-automation content-pipeline scalability microservices n8n-webhook job-queue background-worker 💡 Best Practices Do's ✅ Keep polling interval at 60s minimum (respect API limits) Always handle timeout scenarios Log generation metadata for analytics Use unique session IDs per user Clean up Redis after job completion Don'ts ❌ Don't poll faster than 30s (risk API bans) Don't store videos in Redis (use S3) Don't skip error handling Don't use this for real-time updates (<10s) Don't forget to activate the webhook 🌟 Success Stories After Implementing This Webhook: | Metric | Before | After | |--------|--------|-------| | ⚡ Bot response time | 2-5 min | <1 sec | | 🎬 Concurrent videos | 1 | 50+ | | ❌ Timeout errors | 30% | 0% | | 😊 User satisfaction | 6/10 | 9.5/10 | | 💰 Execution costs | $50/mo | $12/mo | 🔗 Related Workflows 🎬 Main: AI Shorts Reactor - The full video generation bot 📤 YouTube Auto-Publisher - Publish completed videos 🎨 Video Style Presets - Custom prompt templates 📊 Analytics Dashboard - Track all generations 📜 License MIT License - Free to use, modify, and distribute! ⚡ Make your AI video workflows production-ready. Let the webhook handle the waiting. ⚡ Created by Joe Venner | Built with ❤️ and n8n | Part of the AI Shorts Reactor ecosystem

Build your own Webhook and S3 integration

Create custom Webhook and S3 workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

S3 supported actions

Create
Create a bucket
Delete
Delete a bucket
Get Many
Get many buckets
Search
Search within a bucket
Copy
Copy a file
Delete
Delete a file
Download
Download a file
Get Many
Get many files
Upload
Upload a file
Create
Create a folder
Delete
Delete a folder
Get Many
Get many folders

Webhook and S3 integration details

integrationWebhook node
Webhook

Webhooks are automatic notifications that apps send when something occurs. They are sent to a certain URL, which is effectively the app's phone number or address, and contain a message or payload. Polling is nearly never quicker than webhooks, and it takes less effort from you.

Use case

Save engineering resources

Reduce time spent on customer integrations, engineer faster POCs, keep your customer-specific functionality separate from product all without having to code.

Learn more

FAQs

  • Can Webhook connect with S3?

  • Can I use Webhook’s API with n8n?

  • Can I use S3’s API with n8n?

  • Is n8n secure for integrating Webhook and S3?

  • How to get started with Webhook and S3 integration in n8n.io?

Need help setting up your Webhook and S3 integration?

Discover our latest community's recommendations and join the discussions about Webhook and S3 integration.
Benjamin Hatton
Albert Ashkhatoyan
Víctor González
Salomão
sg tech

Looking to integrate Webhook and S3 in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Webhook with S3

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon