by Flavio Angeleu
WhatsApp Flows Encrypted Data Exchange Workflow Summary This workflow enables secure end-to-end encrypted data exchange with WhatsApp Flows for interactive applications inside Whatsapp. It implements the WhatsApp Business Encryption protocol using RSA for key exchange and AES-GCM for payload encryption, providing a secure channel for sensitive data transmission while interfacing with WhatsApp's Business API. This follows the official WhatsApp Business Encryption specifications to establish an encrypted GraphQL-powered data exchange channel between your business and the WhatsApp consumer client. How It Works Encryption Flow Webhook Reception: Receives encrypted data from WhatsApp containing: encrypted_flow_data: The AES-encrypted payload encrypted_aes_key: The RSA-encrypted AES key initial_vector: Initialization vector for AES decryption Decryption Process: The workflow decrypts the AES key using an RSA private key Then uses this AES key to decrypt the payload data The inverted IV is used for response encryption Data Processing: The workflow parses the decrypted JSON data Routes requests based on the screen parameter. Response Generation: Generates appropriate response data based on the request type Encrypts the response using the same AES key and inverted IV Returns the base64-encoded encrypted response Key Components Webhook Endpoint**: Entry point for encrypted WhatsApp requests Decryption Pipeline**: RSA and AES decryption components Business Logic Router**: Screen-based routing for different functionality Encryption Pipeline**: Secure response encryption How to Use Deploy the Workflow: Import the workflow JSON into your n8n instance Set Up WhatsApp Integration: Configure your WhatsApp Business API to send requests to your n8n webhook URL Ensure your WhatsApp integration is set up to encrypt data using the public key pair of the private key used in this workflow Test the Flow: Send an encrypted test message from WhatsApp to verify connectivity Check if appointment data is being retrieved correctly Validate that seat selection is functioning as expected Production Use: Monitor the workflow performance in production Set up error notification if needed Requirements Authentication Keys RSA Private Key: Required for decrypting the AES key (included in the workflow) WhatsApp Business Public Key: Must be registered with the WhatsApp Business API PostgreSQL Credentials: For accessing appointment data from the database WhatsApp Business Encryption Setup As specified in the WhatsApp Business Encryption documentation: Generate a 2048-bit RSA Key Pair: The private key remains with your business (used in this workflow) The public key is shared with WhatsApp Register the Public Key with WhatsApp: Use the WhatsApp Cloud API to register your public key Set up the public key using the /v17.0/{WhatsApp-Business-Account-ID}/whatsapp_business_encryption endpoint Key Registration API Call: POST /v17.0/{WhatsApp-Business-Account-ID}/whatsapp_business_encryption { "business_public_key": "YOUR_PUBLIC_KEY" } Verification: Verify your public key is registered using a GET request to the same endpoint Ensure the key status is "active"
by Davide
๐ค๐ This workflow automates the process of calling customers to remind them of their booking reservations using AI-generated messages and a Twilio phone number. It can easily be adapted for other venues. Key Benefits Time-Saving Automation**: Eliminates the need for manual calls by staff, saving hours per week. Human-like AI Messages**: Uses a custom language model to generate polite, natural phone messages tailored to each customer. Multi-Channel Integration**: Google Sheets for reservation tracking. Twilio for automated calling. OpenRouter (or other LLMs) for generating speech content. Error Reduction**: Ensures all customers receive reminders exactly on the reservation day, minimizing no-shows. Scalable**: Easily adapts to growing reservation lists and more complex message logic. Suitable** for restaurants, hairdressers, offices and any other business How It Works Trigger: The workflow can be triggered manually (via "When clicking โExecute workflowโ) or automatically at 11 AM daily (via Schedule Trigger). Data Fetch: Retrieves todayโs reservations from a Google Sheet, filtering rows where DATE = today and CALLED is empty. AI-Generated Call Script: For each reservation, the Secretary Agent (powered by OpenRouterโs Grok-4) generates a phone script using the guestโs name, time, and party size. Twilio Call: The script is sent to Twilio, which calls the guestโs phone number (from the sheet) and reads the message aloud using text-to-speech. Update & Loop: Marks the reservation as called (CALLED = "x") in the sheet and waits 2 minutes between calls to avoid rate limits. Set Up Steps Twilio Configuration: Sign up for Twilio, buy a phone number, and: Enable text-to-speech (set language to Italian). Configure geo permissions for the target country. Add credentials to the Twilio node (sender number in From field). Google Sheets Setup: Clone the Google Sheet template and ensure: Phone numbers include the international prefix (without "+"). Columns: DATE, TIME, NAME, N. PEOPLE, PHONE, CALLED. OpenRouter API: Connect the OpenRouter Chat Model node to your account (using Grok-4 or another model). Deploy: Activate the workflow and test with manual execution. Note: The workflow is currently inactive (active: false). Enable it after setup. Need help customizing? Contact me for consulting and support or add me on Linkedin.
by Dvir Sharon
๐ฐ Publish Latest News on X and Other Social Media Platforms Using Keyword A comprehensive n8n automation that fetches the latest news based on keywords, generates AI-powered social media content, and automatically publishes to X (Twitter) with complete tracking and notification systems. ๐ Overview This workflow provides a professional news publishing solution that automatically discovers breaking news, creates engaging social media content using AI, and publishes to X (Twitter) with comprehensive tracking. Perfect for news organizations, content creators, social media managers, and businesses wanting to stay current with automated news sharing. The system uses BrightData's Google News dataset, OpenAI's GPT-4o for content generation, and multi-platform integration for complete automation. โญ Key Features ๐ Form-Based Input**: Clean web form for keyword and country submission ๐ฐ Real-Time News Fetching**: BrightData Google News integration for latest articles ๐ค AI Content Generation**: GPT-4o powered tweet creation with hashtags ๐ฑ Auto X Publishing**: Direct posting to X (Twitter) with URL tracking ๐ Complete Tracking**: Google Sheets logging of all published content ๐ Email Notifications**: Success alerts with tweet links ๐ Multi-Country Support**: Localized news for US, India, UK, Australia โก Status Monitoring**: Real-time progress tracking with retry logic ๐ก Error Handling**: Robust error management and validation ๐ Loop Management**: Intelligent waiting for news processing completion ๐ฏ What This Workflow Does Input: News Name**: Keyword or topic for news search (required) Country**: Target country for localized news (dropdown: US/IN/GB/AU) Processing: Form Submission: Captures news keyword and target country News Triggering: Initiates BrightData Google News scraping job Status Monitoring: Checks scraping progress with intelligent retry loop Data Retrieval: Fetches latest news articles when ready AI Content Creation: Generates engaging tweet content using GPT-4o Social Publishing: Posts content to X (Twitter) automatically URL Generation: Creates direct tweet links for tracking Data Logging: Saves content and URLs to Google Sheets Email Notification: Sends success confirmation with tweet link Completion: Workflow ends with full audit trail ๐ Output Data Points | Field | Description | Example | | :------------ | :---------------------------------- | :----------------------------------------------------------------------------------------------------- | | TweetMessage | AI-generated social media content | "Breaking: AI revolution transforming healthcare with 40% efficiency gains. New study shows promising results in patient care automation. #AI #Healthcare #Innovation #TechNews #US" | | TweetURL | Direct link to published tweet | https://twitter.com/i/web/status/1234567890123456789 | ๐ ๏ธ Setup Instructions Prerequisites: n8n instance (self-hosted or cloud) X (Twitter) account with API v2 access OpenAI account with GPT-4o access Gmail account for notifications Google account with Sheets access BrightData account with Google News dataset access Basic understanding of social media automation Step 1: Import the Workflow Copy the JSON workflow code from the provided file. In n8n, click "+ Add workflow". Select "Import from JSON". Paste the workflow code and click "Import". The workflow will appear with all nodes properly connected. Step 2: Configure API Credentials X (Twitter) API Setup: Create X Developer Account at developer.twitter.com. Create new app and generate API keys. In n8n: Credentials โ + Add credential โ Twitter OAuth2 API. Add your Twitter API credentials: API Key API Secret Key Bearer Token Access Token Access Token Secret Test the connection with a sample tweet. OpenAI API Configuration: Get API key from platform.openai.com. Ensure GPT-4o model access is available. In n8n: Credentials โ + Add credential โ OpenAI API. Add your OpenAI API key. Verify model access in the "OpenAI Chat Model" node. Gmail Integration: Create "Gmail OAuth2" credential. Follow OAuth setup process. Grant email sending permissions. Test with sample email. BrightData News API: The workflow uses pre-configured token: 5662edde-6735-4c5d-a6c6-693043a5a9a5. Dataset ID: gd_lnsxoxzi1omrwnka5r (Google News). Verify access to Google News dataset. Test API connection. Google Sheets Integration: Create "Google Sheets OAuth2 API" credential. Complete OAuth authentication. Grant read/write permissions. Test connection. Step 3: Configure Google Sheets Integration Create Google Sheets Structure: Sheet Name: "Publish Latest News on Social Media Platforms Using Keyword" Tab: "Data" (default) Columns: Tweet Message: AI-generated content posted to X Tweet URL: Direct link to published tweet Sheet Configuration: Create new Google Sheet or use existing one. Add the required column headers. Copy Sheet ID from URL: https://docs.google.com/spreadsheets/d/SHEET_ID_HERE/edit. Current configured Sheet ID: 1koxNrwdeuaSBdREuKc7JQh3d9blEk0sQDJ8VgVLjPOo. Update Workflow Settings: Open "Google Sheets" node. Replace Document ID with your Sheet ID. Select your Google Sheets credential. Choose "Data" sheet/tab. Verify column mapping is correct. Step 4: Configure Form Interface Form Settings: Open "On form submission" node. Form configuration: Title: "News Publisher" Description: "publish latest news to direct social media" Fields: News Name (text, required) Country (dropdown: US, IN, GB, AU, required) Webhook URL: Copy webhook URL from form trigger node. Current webhook ID: 8d320705-688c-4150-a393-cf899d2bbb52. Test form accessibility and submission. Step 5: Configure Email Notifications Gmail Setup: Open "Gmail" node. Update recipient email: raushan@iwantonlinemarketing.com. Email template includes: Success confirmation Direct tweet link Professional formatting Test email delivery. Step 6: Test the Workflow Sample Test Data: Use these examples for testing: | News Name | Country | Expected Results | | :-------------------- | :------ | :------------------------------------------------- | | artificial intelligence | US | Latest AI news with US-specific hashtags | | cricket world cup | IN | Sports news with India-focused content | | brexit update | GB | UK political news with British hashtags | | bushfire news | AU | Australian environmental news | Testing Process: Activate the workflow (toggle switch). Navigate to the webhook form URL. Submit test data. Monitor execution progress: News fetching (30-60 seconds) AI content generation (10-15 seconds) X publishing (5-10 seconds) Sheet update and email (5 seconds) Verify results in all platforms. ๐ Usage Guide Using the Form Interface Navigate to the webhook URL provided by the form trigger. Enter news keyword or topic (e.g., "climate change", "stock market", "technology"). Select target country from dropdown. Click submit and wait for processing. Check email for success notification with tweet link. Example Inputs to Test | News Name | Country | Expected | | :-------------------------------- | :------ | :----------------------------------------------------- | | "artificial intelligence breakthrough" | "US" | Latest AI developments with tech hashtags | | "football premier league" | "GB" | UK football news with sports hashtags | | "stock market updates" | "IN" | Indian market news with finance hashtags | | "hollywood movies" | "AU" | Entertainment news with Australian perspective | Country-Specific Considerations United States (US)**: Focus on national news and global impact. Hashtags: #USA, #American, #Breaking, #News. Time zone considerations for optimal posting. India (IN)**: Emphasis on regional relevance. Hashtags: #India, #Indian, #News, #Breaking. Cultural context in content generation. United Kingdom (GB)**: British perspective and terminology. Hashtags: #UK, #British, #News, #Breaking. Focus on European context. Australia (AU)**: Australian angle and regional focus. Hashtags: #Australia, #Australian, #News, #Breaking. Pacific region context. ๐ Reading the Results Google Sheets Data The output sheet contains: Complete tweet content with hashtags and formatting. Direct tweet URLs for easy access and sharing. Chronological record of all published content. Audit trail for content management. Email Notifications Success emails include: Confirmation that content was published. Direct link to view the tweet. Professional formatting for easy reference. X (Twitter) Posts Published content features: AI-optimized messaging within 260 character limit. Relevant hashtags based on topic and country. Engaging format designed for social media. Professional tone suitable for news sharing. ๐ง Customization Options Expanding Social Media Platforms Add more platforms to the publishing workflow: // Add LinkedIn publishing { "node": "LinkedIn", "type": "n8n-nodes-base.linkedin", "parameters": { "text": "={{ $json.output }}", "additionalFields": {} } } // Add Facebook posting { "node": "Facebook", "type": "n8n-nodes-base.facebook", "parameters": { "pageId": "YOUR_PAGE_ID", "message": "={{ $json.output }}" } }
by Richard Uren
This template extracts all customers from shopify using GraphQL and the shopify admin API and sync them into a Baserow table. Setup Notes Update the Endpoint in GraphQL node to reflect your Shopify store. In Baserow create a shopify database with a customer table in Baserow. Create columns in the Baserow customer table for first_name, last_name, and email. It takes about 1 second per row to insert.
by ist00dent
This n8n template allows you to instantly generate QR codes from any text or URL by simply sending a webhook request. It's a versatile tool for creating dynamic QR codes for various purposes, from marketing campaigns to event registrations, directly integrated into your automated workflows. ๐ง How it works Receive Data Webhook: This node acts as the entry point for the workflow. It listens for incoming POST requests and expects a JSON body with a data property containing the text or URL you want to encode into the QR code. Generate QR Code: This node makes an HTTP GET request to the QR Server API (api.qrserver.com) to generate the QR code image. The content from your webhook is passed as the data parameter to the API. Respond with QR Code: This node sends the response from the QR Server API back to the service that initiated the webhook. The QR Server API directly returns the image data, so your webhook response will be the QR code image itself. ๐ค Who is it for? This workflow is ideal for: Marketers: Generate QR codes for product links, event registrations, or promotional materials on the fly. Developers: Integrate QR code generation into applications, websites, or internal tools. Event Organizers: Create dynamic QR codes for ticketing, information access, or check-ins. Businesses: Streamline processes requiring physical-to-digital transitions, like menu access or contact sharing. Automation Enthusiasts: Add QR code generation capabilities to any workflow. ๐ Data Structure When you trigger the webhook, send a POST request with a JSON body structured as follows: { "data": "https://www.yourwebsite.com/your-specific-page-or-text-to-encode" } The workflow will return the QR code image directly in the response. โ๏ธ Setup Instructions Import Workflow: In your n8n editor, click "Import from JSON" and paste the provided workflow JSON. Configure Webhook Path: Double-click the Receive Data Webhook node. In the 'Path' field, set a unique and descriptive path (e.g., /generate-qr). Customize QR Code (Optional): Double-click the Generate QR Code node. You can adjust the size parameter in the URL (e.g., size=200x200 for a larger QR code) or add other parameters supported by the QR Server API (e.g., bgcolor, color, qzone). Activate Workflow: Save and activate the workflow. ๐ Tips Handling the Image Output: Since the QR Server API directly returns the image, the webhook response will be the image data. Depending on your use case, you might want to: Save to File/Cloud: Insert a node (e.g., Write Binary File, Amazon S3, Google Drive) after Generate QR Code to save the image to a file system or cloud storage. Embed in HTML/Email: If you're building an HTML response or sending an email, you might need to convert the image data to a Base64 string or provide a URL to a saved image. Error Handling: Enhance workflow robustness by adding an Error Trigger node. This allows you to catch any issues during QR code generation and set up notifications or logging. Dynamic Size/Color: You can extend the Receive Data Webhook to accept parameters for size, color, or bgcolor in the incoming JSON. Then, dynamically pass these to the url of the Generate QR Code node to create highly customizable QR codes. Input Validation: For more advanced use cases, you could add a Function node after the webhook to validate the incoming data to ensure it's in a valid format (e.g., a URL).
by Richard Uren
Task Read a list of customers from a GoogleSheet and create them in Shopify using Shopify's Admin API (GraphQL). Why ? Generate test users for development stores. Migrate customers from other platforms. Easy intro to Shopify's GraphQL API. Setup Setting up Google Sheets access Follow the instructions in the N8N Docs for granting Oauth2 access to Google services. You'll need to grant API access to Google Sheets and Google Drive (to list available sheets). Setting up Shopify access Shopify's Admin API uses 'Header Auth' with a key of X-Shopify-Access-Token and a value of your shopify access token which starts with shpat_ . How to generate a Shopify Access Token To generate a Shopify Access Token create an app, grant the app the necessary scopes, then generate a token. From inside a store do the following : click Settings (nav link) click Apps and sales channels (nav link) click Develop Apps (button) click Create App (button) give the app a name click configure Admin API Scopes (button) at a minimum grant read_customers and write_customers scope. Grant additional scopes if you plan on accessing other parts of the API. click save To generate the token click install app (button) click install on the dialog that pops up (button) click 'reveal token once' (button) copy the token into a password vault or somewhere secure. Template Updates To test this out you'll need to make the following changes : 1) Create a header credential where the key is X-Shopify-Access-Token and the value is your Shopify Access Token (it starts with shpat_ 2) In the GraphQL node change the endpoint URL to your store. Something like https://{your store goes here}.myshopify.com/admin/api/2025-04/graphql.json Google Sheet Structure Columns can be in any order, because the rows will be mapped to fields in a json object. N8N will treat the first row in the sheet as a column name, so at a minimum use the column names below in row 1 of your sheet. first_name : Any string last_name : Any string email : Valid email mobile_phone : International mobile phone format with no spaces eg. +61414708406 (Shopify will reject anything else). Example CSV "first_name","last_name","email","mobile_phone" "Bob","Smith","bob@example.com","+61414999999"
by Rajeet Nair
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Description This workflow automatically collects daily trending topics from Twitter and YouTube, filters them for relevance, and uses an AI model (such as Mistral Cloud or another OpenAI-compatible API) to generate engaging social media hashtags. The final results, including source platform and date, are saved into a connected Google Sheet for easy access, tracking, or team collaboration. Ideal for content creators, marketers, and social media managers, this automation eliminates the manual effort of trend research and hashtag writing by combining real-time scraping with LLM-powered generation. The result is a scalable, daily strategy tool to stay aligned with whatโs trending across major platforms. How It Works Daily Trigger Starts the workflow automatically on a daily schedule. Trend Scraping Scrapes current trending content from Twitter and YouTube using the Crawl and Scrape community node. Filtering & Slicing Removes irrelevant or duplicate entries and limits each platformโs list to top-performing trends. Merge Trends Combines Twitter and YouTube trends into a single dataset. AI Hashtag Generation Sends each trend topic to an AI model to generate relevant hashtags. Output to Google Sheets Loops through AI results and writes them to a Google Sheet, including trend, platform, hashtags, and timestamp. Setup Instructions Estimated time: 10โ15 minutes Prerequisites A self-hosted instance of n8n (required for community nodes) API key for Mistral Cloud or any OpenAI-compatible LLM Google Sheets account connected via OAuth2 credentials Twitter and YouTube trend URLs (or scraping logic for target regions) Template Image: Example: Crawl and Scrape Node for Twitter Trends You can use the following configuration in the Crawl and Scrape node to extract Twitter trends from Trends24) { "parameters": { "url": "https://trends24.in/", "selectors": [ { "label": "Twitter Trends", "selector": ".trend-card__list li a", "type": "text" } ] }, "name": "Scrape Twitter Trends", "type": "n8n-nodes-crawl-and-scrape.crawlAndScrape", "typeVersion": 1, "position": [300, 200] } Google Sheet Column Format Column A: Generated Hashtags
by Tharwat Mohamed
Document-Aware WhatsApp AI Bot for Customer Support Google Docs-Powered WhatsApp Support Agent 24/7 WhatsApp AI Assistant with Live Knowledge from Google Docs ๐Description Template Smart WhatsApp AI Assistant Using Google Docs Help customers instantly on WhatsApp using a smart AI assistant that reads your companyโs internal knowledge from a Google Doc in real time. Built for clubs, restaurants, agencies, or any business where clients ask questions based on a policy, FAQ, or services document. โ๏ธ How it works Users send free-form questions to your WhatsApp Business number (e.g. โWhat are the gym rules?โ or โAre you open today?โ) The bot automatically reads your companyโs internal Google Doc (policy, schedule, etc.) It merges the document content with todayโs date and the userโs question to craft a custom AI prompt The AI (Gemini or ChatGPT) then replies back on WhatsApp using natural, helpful language All conversations are logged to Google Sheets for reporting or audit > ๐กBonus: The AI even understands dates inside the document and compares them to todayโs date โ e.g. if your document says โClosed May 25 for 30 days,โ it will say โWe're currently closed until June 24. ๐งฐ Set up steps Connect your WhatsApp Cloud API account (Meta) Add your Google account and grant access to the Doc containing your company info Choose your AI model (ChatGPT/OpenAI or Gemini) Paste your document ID into the Google Docs node Connect your WhatsApp webhook to Meta (only takes 5 minutes) Done โ start receiving and answering customer questions! > ๐ Works best with free-tier OpenAI/Gemini, Google Docs, and Meta's Cloud API (no phone required). Everything is modular, extensible, and low-code. ๐ Customization Tips Change the Google Doc anytime to update answers โ no retraining needed Add your logo and business name in the AI agentโs โSystem Promptโ Add fallback routes like โEscalate to humanโ if the bot can't help Clone for multiple brands by duplicating the workflow and swapping in new docs ๐ค Need Help Setting It Up? If you'd like help connecting your WhatsApp Business API, setting up Google Docs access, or customizing this AI assistant for your business or clientsโฆ ๐ฉ I offer setup, branding, and customization services: WhatsApp Cloud API setup & verification Google OAuth & Doc structure guidance AI model configuration (OpenAI / Gemini) Branding & prompt tone customization Logging, reporting, and escalation logic Just send a message via: Email: tharwat.elsayed2000@gmail.com WhatsApp: +20 106 180 3236
by Airtop
Automating Company Data Enrichment and HubSpot Integration Use Case This automation enriches company data based on email domain and LinkedIn profile, calculates an ICP (Ideal Customer Profile) score, and updates the corresponding company record in HubSpot. Itโs ideal for onboarding, qualification, and CRM enrichment. What This Automation Does Input Parameters Contact email**: Used to derive the company domain. Company domain**: Primary web domain of the company. Company LinkedIn* *(optional): LinkedIn URL for enrichment accuracy. Airtop Profile (connected to LinkedIn)**: An authenticated Airtop Profile. What It Outputs Full company profile (name, tagline, website, headquarters) Employee count ICP score based on AI/tech profile, scale, agency type, and location Updates/creates record in HubSpot with all enriched attributes How It Works Input Validation: Filters out non-corporate domains like Gmail, Yahoo, or .edu. Enrichment Trigger: Launches Airtop workflows to extract and analyze data from LinkedIn and calculate the ICP score. Data Mapping: Compiles structured fields including: Overview, location (city, state, country) Company website and domain LinkedIn URL, employee count ICP score HubSpot Sync: Sends all the enriched fields to the designated HubSpot object for upsertion. Setup Requirements Airtop API Key Airtop Profile with active LinkedIn authentication HubSpot integration enabled for object updates Next Steps Use in Webforms**: Trigger this on signup to auto-populate CRM records. Enrich Manually Entered Contacts**: Use with list-based workflows for batch enrichment. Sync to Other CRMs**: Replace HubSpot step with Salesforce, Pipedrive, etc. for flexible integration. Read more about comapny data enrichment
by Jay Hartley
What this template does This workflow uses the Amadeus API, every day to check for bargain flights for an itinerary and price target of your choice. It then automatically emails you once it found a match. Setup Create an api account on https://developers.amadeus.com/ In Amadeus Flight Search, connect to Oauth2 API: -- Grant Type - Client Credentials -- Access Token URL - https://test.api.amadeus.com/v1/security/oauth2/token -- Client ID/Secret - from your account Set your details in Gmail Set your desired Origin/Destination airports in FromTo Set the dates ahead you wish to search in Get Dates (default is 7 days and 14 days) Set the price target in Under Price How to test it After completing the setup steps above, just hit 'Test workflow'!
by Calistus Christian
What this workflow does Automatically triages risky AWS misconfigurations and alerts your team. Pipeline: Security Hub or AWS Config -> EventBridge rules -> SNS (HTTP) -> n8n Webhook -> Normalize -> AI Prioritizer -> Airtable (log) -> Gmail (email) Normalizes incoming findings (S3 / Security Groups / IAM / RDS) into a consistent JSON. Uses an LLM to assign a priority (P0โP3) with rationale and remediation steps. Upserts the finding into Airtable (avoids duplicates). Emails a compact incident summary to your inbox. This can be swapped for Microsoft Teams or Slack, etc. Category: Security / Cloud / Alerting Time to set up: ~10โ15 minutes Difficulty: BeginnerโIntermediate Cost: Mostly free (n8n CE + AWS SNS/EventBridge; OpenAI + Airtable/Gmail as used) What youโll need An n8n instance reachable over HTTP. AWS account (one region) with permissions to create SNS topics and EventBridge rules. Security Hub** enabled (or AWS Config rules that emit compliance events). n8n credentials: OpenAI, Airtable, Gmail. Nodes used Webhook** (POST /aws-misconfig) Code:** SNS Handler (token check, confirm/unwrap) IF:** route mode === "confirm" vs notification HTTP Request:** SNS SubscriptionConfirmation (GET) Code:** Normalize Finding Message a model:** AI Prioritizer (JSON out) Airtable:** Create/Upsert Gmail:** Send message Edit Fields:** final JSON response Setup steps Import and activate the workflow in n8n. Webhook Respond: When Last Node Finishes -> First Entry JSON. Append a shared secret to the URL, e.g. ?token=MY_SUPER_TOKEN, and keep the check in the SNS Handler code node. Create an SNS topic (e.g., misconfig-events) in the same region as your EventBridge rules. Create EventBridge rules targeting the SNS topic: Rule A (Security Hub): source = aws.securityhub, detail-type = Security Hub Findings - Imported Rule B (AWS Config): source = aws.config, detail-type = Config Rules Compliance Change Create an SNS subscription with Protocol = HTTP and Endpoint = your production webhook URL: http://YOUR_HOST:5678/webhook/aws-misconfig?token=MY_SUPER_TOKEN (The workflow auto-confirms the subscription on first POST.) Configure Airtable (Upsert on Finding ID) and Gmail recipients.
by Paul
Gmail AI Email Manager - Setup Guide ๐ฏ Workflow Overview This workflow will create an intelligent Gmail email manager that can: Monitor incoming emails via webhook Analyze email content using AI Categorize emails automatically Generate smart responses Take actions based on email content Send notifications for important emails ๐ Pre-Setup Checklist Before we build the workflow, let me gather the necessary information and validate our approach. Phase 1: Discovery & Planning [ ] Search for Gmail nodes [ ] Find AI analysis nodes [ ] Identify webhook trigger options [ ] Check notification nodes Phase 2: Configuration Requirements [ ] Gmail API credentials [ ] AI service (OpenAI/Claude) API key [ ] Webhook URL setup [ ] Email classification rules ๐ง Setup Instructions Step 1: Gmail API Setup Go to Google Cloud Console Create new project or select existing Enable Gmail API Create OAuth 2.0 credentials Add authorized redirect URI: https://your-n8n-instance.com/rest/oauth2-credential/callback Step 2: AI Service Setup Choose one of the following: OpenAI**: Get API key from platform.openai.com Claude**: Get API key from console.anthropic.com Local AI**: Set up Ollama or similar Step 3: n8n Credentials Gmail OAuth2: Add client ID, secret, and scopes AI Service: Add API key Webhook: Configure webhook URL Gmail AI Email Manager - Setup Guide ๐ง Quick Setup Checklist 1. Google Cloud Console [ ] Enable Gmail API [ ] Create OAuth2 credentials [ ] Add redirect URI: https://your-n8n.com/rest/oauth2-credential/callback [ ] Set up Gmail push notifications with Pub/Sub 2. API Keys [ ] Get OpenAI API key from platform.openai.com [ ] Create Google Sheets for logging (optional) 3. n8n Credentials [ ] Gmail OAuth2: Client ID, Secret, Scopes: gmail.readonly,gmail.modify,gmail.compose [ ] OpenAI API: Your API key 4. Gmail Labels (Create these) [ ] URGENT (red) [ ] IMPORTANT (orange) [ ] PROMOTIONAL (purple) [ ] PERSONAL (green) [ ] WORK (blue) [ ] SPAM (gray) 5. Update Workflow Values [ ] High Priority Alert: Change notification email [ ] Spreadsheet Log: Update sheet ID (if using) [ ] Webhook: Copy URL after saving workflow 6. Test [ ] Save & activate workflow [ ] Send test email to Gmail [ ] Check execution log [ ] Verify auto-categorization works That's it! Your AI email manager is ready! ๐