Process & summarize PDFs from email & messaging apps with OpenAI GPT
Process PDFs from Gmail, Outlook, Telegram and WhatsApp with OpenAI
Transform PDF documents into actionable insights automatically across multiple platforms. This workflow monitors emails and messaging platforms for PDF attachments, extracts content, and delivers AI-powered summaries.
Who's it for
Business professionals, teams, and organizations needing automated PDF analysis from emails and messaging platforms. Perfect for processing contracts, reports, invoices, and documents requiring quick review.
How it works
Monitors Gmail and Outlook for PDF attachments while receiving PDFs via Telegram bot and WhatsApp Business API. Uses OpenAI to extract text and generate structured summaries with executive overviews, key points, important details, insights, and document type identification. Automatically routes summaries back to original senders.
Requirements
- Gmail/Outlook OAuth2 credentials
- Telegram Bot API token via @BotFather
- WhatsApp Business API account
- OpenAI API key
How to set up
Configure API credentials in respective nodes, update configuration variables for phone numbers and notification settings, then test with sample PDFs.
How to customize
Modify AI models, customize prompts, adjust response formatting, extend file support, add notification channels, or integrate with external systems.
Perfect for automating document workflows across communication channels.
n8n Workflow: PDF Processing and Summarization from Messaging Apps with OpenAI GPT
This n8n workflow automates the process of extracting, processing, and summarizing PDF documents received via email or popular messaging apps like Telegram and WhatsApp, leveraging OpenAI's GPT for summarization. It provides a streamlined way to get quick insights from documents shared across various communication channels.
What it does
- Monitors Messaging Apps & Email: Listens for incoming messages or emails from configured Telegram, WhatsApp, Gmail, or Microsoft Outlook accounts.
- Identifies Attachments: Checks for attached PDF files within the received messages/emails.
- Extracts Text from PDFs: If a PDF is found, it extracts the text content from the document.
- Summarizes with AI: Sends the extracted text to an OpenAI GPT model to generate a concise summary.
- Routes Summaries: Depending on the origin of the message, it can send the summary back to the user via Telegram or WhatsApp.
- Handles Non-PDFs: If no PDF is attached or the message does not contain a PDF, it can respond accordingly (e.g., "No PDF found").
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- OpenAI API Key: For the "OpenAI Chat Model" node to generate summaries.
- Telegram Bot Token: If you intend to use Telegram as a trigger or to send responses.
- WhatsApp Business Cloud Account: If you intend to use WhatsApp as a trigger or to send responses.
- Gmail/Microsoft Outlook Account: Configured credentials for receiving emails if you want to use email as a trigger.
Setup/Usage
- Import the Workflow:
- Download the provided JSON file.
- In your n8n instance, click "Workflows" in the left sidebar.
- Click "New" and then "Import from JSON".
- Paste the JSON content or upload the file.
- Configure Credentials:
- Locate the "Telegram Trigger", "WhatsApp Trigger", "Gmail", "Microsoft Outlook" nodes.
- Click on each and configure your respective credentials (API keys, bot tokens, OAuth connections).
- Locate the "OpenAI Chat Model" node and configure your OpenAI API key.
- Activate the Workflow: Once all credentials are set up, activate the workflow by toggling the "Active" switch in the top right corner of the workflow editor.
The workflow will now automatically process incoming messages/emails with PDF attachments and send back AI-generated summaries.
Related Templates
Send WooCommerce discount coupons to customers via WhatsApp using Rapiwa API
Who is this for? This workflow is ideal for WooCommerce store owners who want to automatically send promotional WhatsApp messages to their customers when new coupons are created. It’s designed for marketers and eCommerce managers looking to boost engagement, streamline coupon sharing, and track campaign performance effortlessly through Google Sheets. Overview This workflow listens for WooCommerce coupon creation events (coupon.created) and uses customer billing data to send promotional WhatsApp messages via the Rapiwa API. The flow formats the coupon data, cleans phone numbers, verifies WhatsApp registration with Rapiwa, sends the promotional message when verified, and logs each attempt to Google Sheets (separate sheets for verified/sent and unverified/not sent). What this Workflow Does Listens for new coupon creation events in WooCommerce via the WooCommerce Trigger node Retrieves all customer data from the WooCommerce store Processes customers in batches to control throughput Cleans and formats customer phone numbers for WhatsApp Verifies if phone numbers are valid WhatsApp accounts using Rapiwa API Sends personalized WhatsApp messages with coupon details to verified numbers Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Automated coupon distribution: Triggers when new coupons are created in WooCommerce Customer data retrieval: Fetches all customer information from WooCommerce Phone number validation: Verifies WhatsApp numbers before sending messages Personalized messaging: Includes customer name and coupon details in messages Dual logging system: Tracks both successful and failed message attempts Rate limiting: Uses batching and wait nodes to prevent API overload Data formatting: Structures coupon information for consistent messaging Google Sheet Column Structure A Google Sheet formatted like this ➤ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: | name | number | email | address1 | couponCode | couponTitle | couponType | couponAmount | createDate | expireDate | validity | status | | ----------- | ------------- | --------------------------------------------------- | --------- | ---------- | -------------- | ---------- | ------------ | ------------------- | ------------------- | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur-DOHS | 62dhryst | eid offer 2025 | percent | 20.00 | 2025-09-11 06:08:02 | 2025-09-15 00:00:00 | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur-DOHS | 62dhryst | eid offer 2025 | percent | 20.00 | 2025-09-11 06:08:02 | 2025-09-15 00:00:00 | verified | sent | Requirements n8n instance with the following nodes: WooCommerce Trigger, Code, SplitInBatches, HTTP Request, IF, Google Sheets, Wait WooCommerce store with API access Rapiwa account with API access for WhatsApp verification and messaging Google account with Sheets access Customer phone numbers in WooCommerce (stored in billing.phone field) Important Notes Phone Number Format: The workflow cleans phone numbers by removing all non-digit characters. Ensure your WooCommerce phone numbers are in a compatible format. API Rate Limits: Rapiwa and WooCommerce APIs have rate limits. Adjust batch sizes and wait times accordingly. Data Privacy: Ensure compliance with data protection regulations when sending marketing messages. Error Handling: The workflow logs unverified numbers but doesn't have extensive error handling. Consider adding error notifications for failed API calls. Message Content: The current message template references the first coupon only (coupons[0]). Adjust if you need to handle multiple coupons. Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen
Monitor & auto-heal AWS EC2 instances with multi-channel alerts
This n8n workflow automates the monitoring, health assessment, and self-healing of AWS EC2 instances in production environments. It runs periodic checks, identifies unhealthy instances based on status and metrics, restarts them automatically, and notifies teams via multi-channel alerts while logging data for auditing and reporting. Key Features Triggers health checks every 5 minutes to proactively monitor EC2 fleet status. Fetches and loops through all production EC2 instances for individualized analysis. Evaluates instance health using AWS metrics and custom thresholds to detect issues like high CPU or stopped states. Performs automatic restarts on unhealthy instances to minimize downtime. Sends instant WhatsApp notifications for urgent alerts, detailed email reports for team review, and logs metrics to Google Sheets for long-term tracking. Includes sticky notes for quick reference on configuration, self-healing logic, and alert setup. Workflow Process The Schedule Trigger node runs the workflow every 5 minutes, ensuring frequent health monitoring without overwhelming AWS APIs. The Get EC2 Instances node fetches all production-tagged EC2 instances from AWS, filtering by environment (e.g., tag: Environment=Production). The Loop Over Instances node iterates through each fetched instance individually, allowing parallel processing for scalability. The Check Instance Status node retrieves detailed health metrics for the current instance via AWS API (e.g., status checks, CPU utilization, and state). The Health Status Check node evaluates the instance's status against predefined thresholds (e.g., failed system checks or high load); if healthy, it skips to logging. The Analyze Health Data node assesses metrics in depth to determine action (e.g., restart if CPU > 90% for 5+ minutes) and prepares alert payloads. The Restart Instance node automatically initiates a reboot on unhealthy instances using AWS EC2 API, with optional dry-run mode for testing. The WhatsApp Notification node (part of Multi-Channel Alerts) sends instant alerts via Twilio WhatsApp API, including instance ID, issue summary, and restart status. The Email Report node generates and sends a detailed HTML report to the team via SMTP, summarizing checked instances, actions taken, and metrics trends. The Google Sheets Logging node appends health data, timestamps, and outcomes to a specified spreadsheet for historical analysis and dashboards. The Sticky Notes nodes provide inline documentation: one for AWS credential setup, one explaining self-healing thresholds, and one for alert channel configurations. Setup Instructions Import the workflow into n8n and activate the Schedule Trigger with a 5-minute cron expression (e.g., /5 *). Configure AWS credentials in the Get EC2 Instances, Check Instance Status, and Restart Instance nodes using IAM roles with EC2 read/restart permissions. Set up Twilio credentials in the WhatsApp Notification node, including your Twilio SID, auth token, and WhatsApp-enabled phone numbers for sender/receiver. Add SMTP credentials (e.g., Gmail or AWS SES) in the Email Report node, and update sender/receiver email addresses in the node parameters. Link Google Sheets in the Google Sheets Logging node by providing the spreadsheet ID, sheet name, and OAuth credentials for write access. Customize health thresholds in Health Status Check and Analyze Health Data (e.g., via expressions for CPU/memory limits). Test the workflow by manually executing it on a small set of instances and verifying alerts/logging before enabling production scheduling. Review sticky notes within n8n for quick tips, and monitor executions in the dashboard to fine-tune intervals or error handling. Prerequisites AWS account with EC2 access and IAM user/role for DescribeInstances, DescribeInstanceStatus, and RebootInstances actions. Twilio account with WhatsApp sandbox or approved number for notifications. SMTP email service (e.g., Gmail, Outlook) with app-specific passwords enabled. Google Workspace or personal Google account for Sheets integration. n8n instance with AWS, Twilio, SMTP, and Google Sheets nodes installed (cloud or self-hosted). Production EC2 instances tagged consistently (e.g., Environment=Production) for filtering. Modification Options Adjust the Schedule Trigger interval to hourly for less frequent checks or integrate with AWS CloudWatch Events for dynamic triggering. Expand Analyze Health Data to include advanced metrics (e.g., disk I/O via CloudWatch) or ML-based anomaly detection. Add more alert channels in Multi-Channel Alerts, such as Slack webhooks or PagerDuty integrations, by duplicating the WhatsApp/Email branches. Enhance Google Sheets Logging with charts or conditional formatting via Google Apps Script for visual dashboards. Implement approval gates in Restart Instance (e.g., via email confirmation) to prevent auto-restarts in sensitive environments. Explore More AI Workflows: Get in touch with us for custom n8n automation!
Generate professional email signatures in HTML & PDF with Gmail delivery
Dynamic Email Signature Creator (PDF + HTML) Create gorgeous, branded, professional email signatures automatically — from a simple POST request. This workflow turns user details into a premium HTML signature, converts it into PDF, and delivers it instantly via Gmail, along with a clean JSON response. --- ✨ What This Template Does This workflow automatically: Receives user details (name, role, email, phone, links) via Webhook Extracts & validates inputs Generates a modern, premium HTML signature with icons + layout Converts HTML → high-quality PDF using HTMLCSS → PDF service Emails both the HTML signature preview + PDF attachment to the user Returns a clean JSON success response with the pdf_url Works 100% automated — no manual designing needed Perfect for: HR onboarding Corporate identity management Personal branding Team signature standardization Automated client signature setup --- 🔥 Features Beautiful modern design Clean branding layout with icons (LinkedIn, Instagram, Website) Professional color palette + typography Auto-generated PDF (print-ready) Mobile-friendly & email-safe HTML Supports any social links Extremely easy to integrate with forms, portals, CRMs Fast: Signature generated in < 3 seconds --- 🧩 How It Works Webhook receives user information Input extractor formats the fields HTML template dynamically inserts user values HTML → PDF generator creates high-resolution output Email node sends signature + PDF Workflow responds with JSON (pdf_url, status, etc.) --- ⚙️ Setup Needed Connect these credentials in n8n: HTML → PDF (PDFMunk account) Gmail (for sending the final signature email) Update inside the HTML template: Brand colors Logo URL (optional) Social icon colors / links (optional) That’s it — your automated signature generator is live. --- 🏷️ Tags email-signature, branding, pdf-generator, html-template, gmail, automation, onboarding, corporate