Back to Catalog

Send tweets every minute to Mattermost

Harshil AgrawalHarshil Agrawal
1092 views
2/3/2026
Official Page

This workflow executes every minute and fetches the recent tweets from Twitter with the search query n8n_io. The workflow is built on the concept of polling.

workflow-screenshot

Cron node: The Cron node triggers the workflow every minute. Based on your use-case you can configure the time. You can even use the Interval node to trigger the workflow at a certain time interval.

Twitter node: The Twitter node searches for the tweets that contain n8n_io and returns the most recent tweets. You can specify a different search query based on your use-case.

Set node: The Set node sets the data that we pass on to the next nodes in the workflow. You can set only the values that you require in your workflow.

Function node: All the magic happens in this node. The Twitter node returns all the recent tweets, including the ones which were returned earlier. The Function node, using the getWorkflowStaticData() method, only returns the tweets that are new, i.e., the tweets that were not returned in the previous workflow.

Mattermost node: The Mattermost node sends the tweets from the Function node to the Twitter notifications channel. If you don't use Mattermost and want to share this data on a different platform, replace this node with the appropriate node.

n8n Workflow: Send Tweets to Mattermost

This n8n workflow demonstrates a basic integration to trigger an action, though the full functionality of sending tweets and then posting them to Mattermost is not fully implemented in the provided JSON.

What it does

This workflow is a starting point, designed to be triggered on a schedule.

  1. Scheduled Trigger: The workflow starts automatically based on a defined schedule (e.g., every minute, hour, day).
  2. Function Node: A Function node is included, allowing for custom JavaScript code execution. This node typically handles data manipulation or complex logic.
  3. Edit Fields (Set) Node: An Edit Fields (Set) node is present, which is used to add, remove, or modify fields in the incoming data.
  4. X (Formerly Twitter) Node: A node for interacting with the X (Twitter) API is included. In a complete workflow, this would be used to fetch tweets or post new ones.
  5. Mattermost Node: A node for interacting with Mattermost is included. In a complete workflow, this would be used to post messages or notifications to a Mattermost channel.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • X (Formerly Twitter) Account: With appropriate API access and credentials configured in n8n if you intend to interact with Twitter.
  • Mattermost Account: With appropriate API access and credentials configured in n8n if you intend to post to Mattermost.

Setup/Usage

  1. Import the Workflow:
    • Copy the provided JSON code.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click on the "Import" button (usually a cloud icon with an arrow pointing down) and paste the JSON.
    • Click "Import".
  2. Configure Credentials:
    • Locate the "X (Formerly Twitter)" node and the "Mattermost" node.
    • Click on each node and configure the necessary credentials by selecting an existing credential or creating a new one.
  3. Customize Nodes:
    • Cron Node: Adjust the schedule in the Cron node to your desired frequency.
    • Function Node: Modify the JavaScript code in the Function node to perform your specific data processing or logic.
    • Edit Fields (Set) Node: Configure this node to set or modify any data fields as needed for subsequent operations.
    • X (Formerly Twitter) Node: Configure the operation (e.g., "Post Tweet", "Get User Timeline") and any parameters.
    • Mattermost Node: Configure the operation (e.g., "Post Message"), the channel, and the message content.
  4. Activate the Workflow:
    • Once configured, save the workflow and activate it by toggling the "Active" switch in the top right corner.

Related Templates

Moderate your Discord server using chatGPT-5 & Google Sheets (Learning system)

Discord AI Content Moderator with Learning System This n8n template demonstrates how to automatically moderate Discord messages using AI-powered content analysis that learns from your community standards. It continuously monitors your server, intelligently flags problematic content while allowing context-appropriate language, and provides a complete audit trail for all moderation actions. Use cases are many: Try moderating a forex trading community where enthusiasm runs high, protecting a gaming server from toxic behavior while keeping banter alive, or maintaining professional standards in a business Discord without being overly strict! Good to know This workflow uses OpenAI's GPT-5 Mini model which incurs API costs per message analyzed (approximately $0.001-0.003 per moderation check depending on message volume) The workflow runs every minute by default - adjust the Schedule Trigger interval based on your server activity and budget Discord API rate limits apply - the batch processor includes 1.5-second delays between deletions to prevent rate limiting You'll need a Google Sheet to store training examples - a template link is provided in the workflow notes The AI analyzes context and intent, not just keywords - "I cking love this community" won't be deleted, but "you guys are sht" will be Deleted messages cannot be recovered from Discord - the admin notification channel preserves the content for review How it works The Schedule Trigger activates every minute to check for new messages requiring moderation We'll fetch training data from Google Sheets containing labeled examples of messages to delete (with reasons) and messages to keep The workflow retrieves the last 10 messages from your specified Discord channel using the Discord API A preparation node formats both the training examples and recent messages into a structured prompt with unique indices for each message The AI Agent (powered by GPT-5 Mini) analyzes each message against your community standards, considering intent and context rather than just keywords The AI returns a JSON array of message indices that violate guidelines (e.g., [0, 2, 5]) A parsing node extracts these indices, validates them, removes duplicates, and maps them to actual Discord message objects The batch processor loops through each flagged message one at a time to prevent API rate limiting and ensure proper error handling Each message is deleted from Discord using the exact message ID A 1.5-second wait prevents hitting Discord's rate limits between operations Finally, an admin notification is posted to your designated admin channel with the deleted message's author, ID, and original content for audit purposes How to use Replace the Discord Server ID, Moderated Channel ID, and Admin Channel ID in the "Edit Fields" node with your server's specific IDs Create a copy of the provided Google Sheets template with columns: messagecontent, shoulddelete (YES/NO), and reason Connect your Discord OAuth2 credentials (requires bot permissions for reading messages, deleting messages, and posting to channels) Add your OpenAI API key to access GPT-5 Mini Customize the AI Agent's system message to reflect your specific community standards and tone Adjust the message fetch limit (default: 10) based on your server activity - higher limits cost more per run but catch more violations Consider changing the Schedule Trigger from every minute to every 3-5 minutes if you have a smaller community Requirements Discord OAuth2 credentials for bot authentication with message read, delete, and send permissions Google Sheets API connection for accessing the training data knowledge base OpenAI API key for GPT-5 Mini model access A Google Sheet formatted with message examples, deletion labels, and reasoning Discord Server ID, Channel IDs (moderated + admin) which you can get by enabling Developer Mode in Discord Customising this workflow Try building an emoji-based feedback system where admins can react to notifications with βœ… (correct deletion) or ❌ (wrong deletion) to automatically update your training data Add a severity scoring system that issues warnings for minor violations before deleting messages Implement a user strike system that tracks repeat offenders and automatically applies temporary mutes or bans Expand the AI prompt to categorize violations (spam, harassment, profanity, etc.) and route different types to different admin channels Create a weekly digest that summarizes moderation statistics and trending violation types Add support for monitoring multiple channels by duplicating the Discord message fetch nodes with different channel IDs Integrate with a database instead of Google Sheets for faster lookups and more sophisticated training data management If you have questions Feel free to contact me here: elijahmamuri@gmail.com elijahfxtrading@gmail.com

Cj Elijah GarayBy Cj Elijah Garay
98

Generate AI website legal and accessibility compliance reports with OpenAI, Gmail and Google Drive

Automated Legal & Accessibility Website Compliance Checker Description Automate website compliance checks in minutes using AI-powered analysis. This workflow scans any website for essential legal and accessibility requirements, generates a professional compliance report, delivers it as a PDF, and stores it securely β€” helping teams identify risks early and stay audit-ready with zero manual effort. --- What This Workflow Does Transforms manual website compliance reviews into a single automated flow: 🌐 Capture Website Details – Accepts website URL, company name, and email via webhook. πŸ“₯ Fetch Website Content – Securely downloads and cleans website HTML for analysis. 🧠 AI Compliance Analysis – Uses AI to audit the site against key compliance standards. πŸ“Š Scoring & Insights – Calculates an overall compliance score and highlights gaps. πŸ“„ Generate Visual Report – Builds a detailed, easy-to-read HTML compliance report. πŸ–¨οΈ Convert to PDF – Converts the report into a downloadable, shareable PDF. πŸ“§ Email Delivery – Sends the compliance report directly to the provided email. ☁️ Secure Storage – Saves the PDF report to Google Drive for records and audits. --- Key Features πŸ€– AI-Powered Compliance Audits – Automatically checks privacy, cookies, accessibility, SSL, and more. πŸ“Š Compliance Scoring – Clear numerical scores and status indicators for each section. πŸ“„ Professional PDF Reports – Branded, structured reports suitable for clients or audits. βš™οΈ End-to-End Automation – From URL submission to email delivery without manual steps. πŸ“§ Instant Email Notifications – Reports delivered automatically to stakeholders. ☁️ Google Drive Backup – Centralized storage for compliance history and documentation. --- Compliance Checks Included βœ”οΈ Privacy Policy presence & indicators βœ”οΈ Cookie consent mechanisms βœ”οΈ Terms of Service availability βœ”οΈ Accessibility (WCAG-related indicators) βœ”οΈ Contact information visibility βœ”οΈ SSL / HTTPS verification βœ”οΈ Critical issues & improvement recommendations --- Perfect For 🏒 Startups & SaaS Companies – Quickly assess website compliance before launch. 🧾 Agencies & Consultants – Deliver automated compliance audits to clients. βš–οΈ Legal & Compliance Teams – Speed up preliminary compliance checks. πŸ’» Freelancers & Web Developers – Validate client websites post-deployment. πŸ“ˆ Operations Teams – Maintain ongoing compliance documentation effortlessly. --- What You’ll Need Required Integrations 🌐 Webhook – Receive website URL and user details. πŸ€– OpenAI – Analyze website HTML for compliance indicators. πŸ“„ HTMLCSS to PDF – Convert compliance report into a PDF. πŸ“§ Gmail – Send compliance report via email. ☁️ Google Drive – Store generated compliance reports. 🌍 HTTP Request – Fetch website HTML content (no authentication required). --- Optional Enhancements πŸ“Š Compliance Dashboard – Connect Google Drive or logs to Looker Studio. 🌍 Multi-Website Scans – Extend webhook to accept bulk URLs. πŸ•’ Scheduled Scans – Run periodic compliance checks automatically. πŸ“¨ Slack Alerts – Send compliance summaries to internal channels. πŸ“ Custom Branding – Adjust HTML styling, logos, and colors. --- Quick Start 1️⃣ Import the workflow JSON into your n8n workspace. 2️⃣ Activate the webhook and copy the endpoint URL. 3️⃣ Connect OpenAI, Gmail, Google Drive, and HTMLCSS to PDF credentials. 4️⃣ Send a POST request with website URL, company name, and email. 5️⃣ Review the emailed PDF compliance report. 6️⃣ Check Google Drive for stored audit copies. 7️⃣ Activate the workflow for production use. --- Expected Results ⚑ Minutes Instead of Hours – Instant compliance assessments. πŸ€– AI Accuracy – Consistent, structured compliance analysis. πŸ“ˆ Risk Visibility – Early detection of legal and accessibility gaps. πŸ“„ Audit-Ready Reports – Clean, shareable documentation. ☁️ Centralized Storage – Every scan archived automatically. --- Workflow Structure 🌐 Webhook Trigger ↓ πŸ“₯ Fetch Website HTML ↓ 🧹 Clean & Prepare Content ↓ 🧠 AI Compliance Analysis ↓ πŸ“Š Parse Results ↓ πŸ“„ Generate HTML Report ↓ πŸ–¨οΈ Convert to PDF ↓ πŸ“§ Email Report ↓ ☁️ Save to Google Drive --- Ready to Automate Website Compliance? Import this template and turn any website URL into a complete compliance report β€” automatically, consistently, and professionally. Perfect for audits, clients, and peace of mind. βœ… ---

Jitesh DugarBy Jitesh Dugar
31

WhatsApp group chat with your vector database β€” no Facebook Business required

Enable smart, real-time answers in your WhatsApp groups using a custom webhook, Pinecone vector database, and no Facebook Business setup. > 🟑 Note: This template uses a custom WhatsApp webhook. It does not use the official WhatsApp Business API. --- πŸ‘₯ Who is this for? This workflow is designed for individuals and teams who want to enable smart WhatsApp group automation β€” without going through Meta’s official WhatsApp Business API. Ideal for small businesses, internal teams, communities, and personal power users. --- ❓ What problem is this solving? Setting up WhatsApp bots with intelligent responses often requires approval from Meta and a verified business account. This workflow removes those barriers by using a self-hosted webhook to handle incoming messages and respond using a document-trained AI via Pinecone. --- βš™οΈ What this workflow does Connects a regular WhatsApp number to a custom webhook Adds the bot to any group chat (it stays silent unless mentioned) Indexes documents from Google Drive into Pinecone Responds with intelligent, context-aware answers from your custom knowledge base Auto-updates its knowledge every minute as the document changes --- πŸ› οΈ Setup Step 1: Connect Google Drive Set up your Google Drive credentials in n8n Step 2: Configure Pinecone Create an index in Pinecone Dimension: 1536 Select this index in both Pinecone nodes Click Test Workflow to ingest your document into Pinecone Step 3: Get Access to the WhatsApp Webhook Fill out this form to request access You’ll receive a WhatsApp confirmation for linking Step 4: Test WhatsApp Integration βœ… One-on-one test: Send a message from another number πŸ‘₯ Group test: Add the bot to a group; it will only respond when tagged --- 🧩 How to customize this workflow Modify the system prompt inside the AI agent node to control tone and behavior Update the connected Google Doc to match your specific domain (e.g. FAQs, SOPs, product manuals) Adjust the Pinecone sync frequency if you want updates more or less often --- πŸ“š Use cases Customer Support: Instant, intelligent replies in WhatsApp without live agents Team Knowledge Bot: Tag the bot for quick access to SOPs and internal docs Community Groups: Automate common questions while keeping noise low Personal AI Assistant: A WhatsApp chatbot trained on your notes and files --- πŸ“ Sticky Note Suggestion πŸ’¬ What this template does: > Enables an AI bot in your WhatsApp group that answers questions based on a Google Doc you provide. It uses a custom webhook, Google Drive, and Pinecone. πŸ”§ Requirements: > Google Drive account > Pinecone account with an index (dimension 1536) > Access to the custom WhatsApp webhook (see setup steps)

Cecilia MukimaBy Cecilia Mukima
1606