Notify user in Slack of quarantined email and create Jira ticket if opened
This n8n workflow serves as an incident response and notification system for handling potentially malicious emails flagged by Sublime Security. It begins with a Webhook trigger that Sublime Security uses to initiate the workflow by POSTing an alert. The workflow then extracts message details from Sublime Security using an HTTP Request node, based on the provided messageId, and subsequently splits into two parallel paths.
In the first path, the workflow looks up a Slack user by email, aiming to find the recipient of the email that triggered the alert. If a user is found in Slack, a notification is sent to them, explaining that they have received a potentially malicious email that has been quarantined and is under investigation. This notification includes details such as the email's subject and sender.
The second path checks whether the flagged email has been opened by inspecting the read_at value from Sublime Security. If the email was opened, the workflow prepares a table summarizing the flagged rules and creates a corresponding issue in Jira Software. The Jira issue contains information about the email, including its subject, sender, and recipient, along with the flagged rules.
Issues that someone might encounter when setting up this workflow for the first time include potential problems with the Slack user lookup if the user information is not available or if Slack API integration is not configured correctly. Additionally, the issue creation in Jira Software may not work as expected, as indicated by the note that mentions a need for possible node replacement. Thorough testing and validation with sample data from Sublime Security alerts can help identify and resolve any potential issues during setup.
Notify User in Slack of Quarantined Email and Create Jira Ticket (if opened)
This n8n workflow automates the process of notifying a user via Slack about a quarantined email and, if the Slack message is opened, creating a corresponding Jira ticket. This helps streamline the handling of potentially malicious or unwanted emails, ensuring timely communication and action.
What it does
- Receives Quarantined Email Data: The workflow is triggered by an incoming webhook, expecting data related to a quarantined email.
- Notifies User in Slack: It sends a direct message to the affected user on Slack, informing them about the quarantined email.
- Checks for Slack Message Interaction: The workflow then uses an HTTP Request node to check if the sent Slack message was opened by the user.
- Conditional Jira Ticket Creation:
- If the Slack message was opened: A Jira ticket is automatically created to track the quarantined email, indicating that the user has seen the notification.
- If the Slack message was NOT opened: No Jira ticket is created, assuming no further action is immediately needed from the user's side (or a different follow-up process might be in place).
Prerequisites/Requirements
- n8n Instance: A running n8n instance.
- Slack Account: A Slack workspace and a Slack App configured with appropriate permissions to send direct messages. You will need a Slack API Token.
- Jira Software Account: Access to a Jira Software instance with permissions to create issues. You will need Jira API credentials (e.g., API token or username/password).
- Webhook Source: An external system or service that can send quarantined email data to the n8n webhook URL.
- Slack Message ID: The incoming webhook data or a preceding node in your actual implementation would need to provide the Slack message ID to check its status. (Note: The provided JSON does not explicitly show how the Slack message ID is captured or used, but the "HTTP Request" node implies checking a Slack API endpoint which would typically require this).
Setup/Usage
- Import the Workflow:
- Copy the provided JSON workflow.
- In your n8n instance, go to "Workflows" and click "New".
- Click the "Import from JSON" button and paste the workflow JSON.
- Configure Credentials:
- Slack: You will need to create a Slack credential. Select the "Slack API" credential type and provide your Slack Bot User OAuth Token.
- Jira Software: You will need to create a Jira Software credential. Select the appropriate credential type (e.g., "Jira API Token" or "Jira Basic Auth") and enter your Jira URL, username/email, and API token/password.
- Configure Nodes:
- Webhook (Node 47):
- Copy the "Webhook URL" after saving the workflow. This URL will be used by your external system to send quarantined email data to n8n.
- Ensure the "HTTP Method" and "Response Mode" match what your external system expects.
- Slack (Node 40):
- Select your configured Slack credential.
- Set the "Channel" to the user's Slack ID (e.g.,
@{user_id}). This would likely come from the incoming webhook data. - Customize the "Text" of the message to include relevant details about the quarantined email (e.g., sender, subject, reason).
- HTTP Request (Node 19):
- This node is intended to check if the Slack message was opened. You will need to configure it to call the Slack API's
conversations.historyor a similar endpoint, passing thechannelandts(timestamp of the sent message) to check for reactions or if the message was read. This will likely involve extracting thetsfrom the output of the previous Slack node. - Set the "Authentication" to use your Slack API token if not already handled by the Slack node itself.
- This node is intended to check if the Slack message was opened. You will need to configure it to call the Slack API's
- If (Node 20):
- This node will evaluate the response from the "HTTP Request" node. Configure the condition to check for a specific indicator that the Slack message was opened (e.g., a specific reaction, or by comparing timestamps if the Slack API provides read receipts).
- Jira Software (Node 77):
- Select your configured Jira Software credential.
- Configure the "Resource" to "Issue" and "Operation" to "Create".
- Set the "Project Key" and "Issue Type".
- Customize the "Summary" and "Description" of the Jira ticket with details from the quarantined email data, potentially including a link to the Slack message.
- Code (Node 834): This node is currently empty. It can be used for any custom data transformation, logging, or advanced logic if needed. For instance, to parse the incoming webhook data or format the output for Slack/Jira.
- Webhook (Node 47):
- Activate the Workflow: Toggle the workflow to "Active" in the n8n editor.
Now, whenever your external system sends data about a quarantined email to the webhook, this workflow will execute, notify the user, and conditionally create a Jira ticket.
Related Templates
Send WooCommerce cross-sell offers to customers via WhatsApp using Rapiwa API
Who Is This For? This n8n workflow enables automated cross-selling by identifying each WooCommerce customer's most frequently purchased product, finding a related product to recommend, and sending a personalized WhatsApp message using the Rapiwa API. It also verifies whether the user's number is WhatsApp-enabled before sending, and logs both successful and unsuccessful attempts to Google Sheets for tracking. What This Workflow Does Retrieves all paying customers from your WooCommerce store Identifies each customer's most purchased product Finds the latest product in the same category as their most purchased item Cleans and verifies customer phone numbers for WhatsApp compatibility Sends personalized WhatsApp messages with product recommendations Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Customer Segmentation: Automatically identifies paying customers from your WooCommerce store Product Analysis: Determines each customer's most purchased product Smart Recommendations: Finds the latest products in the same category as customer favorites WhatsApp Integration: Uses Rapiwa API for message delivery Phone Number Validation: Verifies WhatsApp numbers before sending messages Dual Logging System: Tracks both successful and failed message attempts in Google Sheets Rate Limiting: Uses batching and wait nodes to prevent API overload Personalized Messaging: Includes customer name and product details in messages Requirements 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) How to Use β Step-by-Step Setup Credentials Setup WooCommerce API: Configure WooCommerce API credentials in n8n (e.g., "WooCommerce (get customer)" and "WooCommerce (get customer data)") Rapiwa Bearer Auth: Create an HTTP Bearer credential with your Rapiwa API token Google Sheets OAuth2: Set up OAuth2 credentials for Google Sheets access Configure Google Sheets Ensure your sheet has the required columns as specified in the Google Sheet Column Structure section Verify Code Nodes Code (get paying_customer): Filters customers to include only those who have made purchases Get most buy product id & Clear Number: Identifies the most purchased product and cleans phone numbers Configure HTTP Request Nodes Get customer data: Verify the WooCommerce API endpoint for retrieving customer orders Get specific product data: Verify the WooCommerce API endpoint for product details Get specific product recommend latest product: Verify the WooCommerce API endpoint for finding latest products by category Check valid WhatsApp number Using Rapiwa: Verify the Rapiwa endpoint for WhatsApp number validation Rapiwa Sender: Verify the Rapiwa endpoint for sending messages Google Sheet Required Columns Youβll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this β€ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: Both must have the following headers (match exactly): | name | number | email | address1 | price | suk | title | product link | validity | staus | | ---------- | ------------- | ----------------------------------------------- | ----------- | ----- | --- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | 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. Product Availability: The workflow recommends the latest product in a category, but doesn't check if it's in stock. Consider adding stock status verification. Testing: Always test with a small batch before running the workflow on your entire customer list. 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
Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack
π Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. πππ¬ What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. π§© Step 2: Fetches release metadata including version, tag, and publish date. π¦ Step 3: Logs release data into Google Sheets for record-keeping and analysis. π Step 4: Retrieves FAQ or documentation data from Notion. π Step 5: Merges GitHub and Notion data to calculate documentation drift. π Step 6: Flags SDKs whose documentation is over 30 days out of date. β οΈ Step 7: Sends detailed Slack alerts to notify responsible teams. π Key Benefits β Keeps SDK documentation aligned with product releases β Prevents outdated information from reaching users β Provides centralized release tracking in Google Sheets β Sends real-time Slack alerts for overdue updates β Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.
Automate Gmail responses with GPT and human-in-the-loop verification
Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com