AutomationFlowsAI & RAG › Automate SAAS Operations with Gpt-4.1-mini for User, Support & Billing…

Automate SAAS Operations with Gpt-4.1-mini for User, Support & Billing…

Original n8n title: Automate SAAS Operations with Gpt-4.1-mini for User, Support & Billing Management

ByCheng Siong Chin @cschin on n8n.io

Automates SaaS operations by consolidating user management, AI-driven support triage, analytics, and billing into one unified system. User signups flow through registration, support requests route via OpenAI prioritization, billing events trigger confirmations, and daily…

Event trigger★★★★★ complexityAI-powered41 nodesForm TriggerData TableAgentOpenAI ChatOutput Parser StructuredData Table ToolGmail ToolGmail
AI & RAG Trigger: Event Nodes: 41 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #11859 — we link there as the canonical source.

This workflow follows the Agent → Datatable recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "uYzLH3KclHbDZLwh",
  "name": "GPT 4.1-mini-SaaS for Unified User, Support & Billing Management",
  "tags": [],
  "nodes": [
    {
      "id": "a3499ba2-ef81-47bd-9c00-304774d2122e",
      "name": "User Sign-Up Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        272,
        -16
      ],
      "parameters": {
        "options": {
          "appendAttribution": false
        },
        "formTitle": "Micro-SaaS User Sign-Up",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Full Name",
              "requiredField": true
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email Address",
              "requiredField": true
            },
            {
              "fieldLabel": "Company Name"
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Plan Type",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Free"
                  },
                  {
                    "option": "Pro"
                  },
                  {
                    "option": "Enterprise"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "formDescription": "Create your account to get started"
      },
      "typeVersion": 2.3
    },
    {
      "id": "09f0ed33-542f-4735-bce6-0715a5076704",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        464,
        -16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "adminEmail",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Admin email address for alerts__>"
            },
            {
              "id": "id-2",
              "name": "dashboardApiUrl",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Dashboard API endpoint URL__>"
            },
            {
              "id": "id-3",
              "name": "stripeWebhookSecret",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Stripe webhook secret key__>"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "86f05c4a-4611-4320-bb0c-1896547951de",
      "name": "Store User Data",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        672,
        -16
      ],
      "parameters": {
        "columns": {
          "value": null,
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "users"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bf64d7f1-00f8-4229-a63c-dba7bb08ab6f",
      "name": "AI Business Logic Orchestrator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1040,
        -16
      ],
      "parameters": {
        "text": "={{ $json.fullName }} signed up for {{ $json.planType }} plan. Email: {{ $json.email }}. Company: {{ $json.companyName }}",
        "options": {
          "systemMessage": "You are an AI business logic orchestrator for a Micro-SaaS platform.\n\nYour task is to:\n1. Analyze new user sign-ups and determine appropriate onboarding actions\n2. Use the Data Table Tool to log user activity and analytics\n3. Use the Gmail Tool to send personalized welcome emails to new users\n4. Track user engagement metrics in the analytics table\n5. Return a structured summary of actions taken\n\nAlways be proactive in creating a great user experience."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "8ac72fc5-14d2-4d9e-98d8-cf9fdb1209d8",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        864,
        192
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "ea9a45ca-55c2-4bb7-a26c-802cd8b4d828",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1440,
        192
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"emailSent\": {\n\t\t\t\"type\": \"boolean\"\n\t\t},\n\t\t\"analyticsLogged\": {\n\t\t\t\"type\": \"boolean\"\n\t\t},\n\t\t\"welcomeMessage\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"nextSteps\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "2863de38-9d57-4e2e-92e0-73069aece76c",
      "name": "Data Table Tool - User Management",
      "type": "n8n-nodes-base.dataTableTool",
      "position": [
        1008,
        192
      ],
      "parameters": {
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "users"
        },
        "descriptionType": "manual",
        "toolDescription": "Manage user data including sign-ups, profiles, and account status"
      },
      "typeVersion": 1
    },
    {
      "id": "b387b3bd-9177-4451-bb0a-07b90788204d",
      "name": "Data Table Tool - Analytics",
      "type": "n8n-nodes-base.dataTableTool",
      "position": [
        1152,
        192
      ],
      "parameters": {
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "name",
          "value": "analytics"
        },
        "descriptionType": "manual",
        "toolDescription": "Track user activity, engagement metrics, and usage statistics"
      },
      "typeVersion": 1
    },
    {
      "id": "57b65cd8-43a1-4c24-9cc7-c36d94e9fb93",
      "name": "Gmail Tool - Send Emails",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        1296,
        192
      ],
      "parameters": {
        "sendTo": "={{ $fromAI('recipientEmail') }}",
        "message": "={{ $fromAI('emailBody') }}",
        "options": {},
        "subject": "={{ $fromAI('emailSubject') }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "82ad7f57-36e1-4363-bd21-15b4b0cac77a",
      "name": "Support Request Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -144,
        640
      ],
      "parameters": {
        "path": "support-request",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "lastNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "539f3380-ba8e-4f19-b2cb-e40a7c1d614f",
      "name": "Prepare Support Request Data",
      "type": "n8n-nodes-base.set",
      "position": [
        128,
        640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "requestId",
              "type": "string",
              "value": "={{ $now.toISO() }}-{{ $json.body.email }}"
            },
            {
              "id": "id-2",
              "name": "userEmail",
              "type": "string",
              "value": "={{ $json.body.email }}"
            },
            {
              "id": "id-3",
              "name": "subject",
              "type": "string",
              "value": "={{ $json.body.subject }}"
            },
            {
              "id": "id-4",
              "name": "message",
              "type": "string",
              "value": "={{ $json.body.message }}"
            },
            {
              "id": "id-5",
              "name": "timestamp",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "id-6",
              "name": "status",
              "type": "string",
              "value": "pending"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "371158e5-6c31-4648-a08c-3e6c3fb432fe",
      "name": "Store Support Requests",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        368,
        640
      ],
      "parameters": {
        "columns": {
          "value": null,
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "support_requests"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f588cf18-a01e-4216-828c-e33e933bdb7f",
      "name": "AI Support Triage Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        608,
        528
      ],
      "parameters": {
        "text": "=Support request from {{ $json.userEmail }}. Subject: {{ $json.subject }}. Message: {{ $json.message }}",
        "options": {
          "systemMessage": "You are an AI support triage agent for a Micro-SaaS platform.\n\nYour task is to:\n1. Analyze incoming support requests\n2. Categorize the issue type (technical, billing, feature request, general inquiry)\n3. Assess priority level (high, medium, low) based on urgency and impact\n4. Determine if immediate admin attention is required\n5. Generate an appropriate auto-response for the user\n6. Return structured triage results\n\nPriority Guidelines:\n- High: Service outages, billing errors, security issues, data loss\n- Medium: Feature bugs, account access issues, integration problems\n- Low: Feature requests, general questions, documentation inquiries"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "5ccb0b5f-876b-4e73-b542-d42f647ecaa4",
      "name": "OpenAI Chat Model - Support",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        608,
        672
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "b866695d-f89d-4676-b1df-1573e8a4c411",
      "name": "Support Triage Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        752,
        688
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"category\": {\n      \"type\": \"string\"\n    },\n    \"priority\": {\n      \"type\": \"string\",\n      \"enum\": [\"high\", \"medium\", \"low\"]\n    },\n    \"requiresAdminAttention\": {\n      \"type\": \"boolean\"\n    },\n    \"autoResponse\": {\n      \"type\": \"string\"\n    },\n    \"suggestedActions\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    }\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "9f8d4a02-e952-410b-a1a8-2bdc5134e182",
      "name": "Check Priority Level",
      "type": "n8n-nodes-base.if",
      "position": [
        960,
        520
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('AI Support Triage Agent').item.json.priority }}",
              "rightValue": "high"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "336b2db9-0777-4f8a-b5f5-17f98dde3ab3",
      "name": "Send Admin Alert - High Priority",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1200,
        512
      ],
      "parameters": {
        "sendTo": "={{ $('Workflow Configuration').first().json.adminEmail }}",
        "message": "=A high-priority support request requires immediate attention.\n\nFrom: {{ $json.userEmail }}\nCategory: {{ $json.category }}\nSubject: {{ $json.subject }}\n\nMessage:\n{{ $json.message }}\n\nAI Analysis:\n{{ $json.autoResponse }}\n\nSuggested Actions:\n{{ $json.suggestedActions.join(\"\\n- \") }}",
        "options": {},
        "subject": "=\ud83d\udea8 HIGH PRIORITY Support Request - {{ $json.category }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "92d68ae4-26a3-4baf-be09-687cc244d424",
      "name": "Send Auto-Response - Normal Priority",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1200,
        688
      ],
      "parameters": {
        "sendTo": "={{ $json.userEmail }}",
        "message": "={{ $json.autoResponse }}",
        "options": {},
        "subject": "=Re: {{ $json.subject }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "af03d58b-8c71-4bd3-a175-c125977fdf3d",
      "name": "Daily Analytics Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        352,
        896
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "d900b84a-f9fa-43a8-bd02-2f019a1d35d0",
      "name": "Fetch User Analytics Data",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        576,
        896
      ],
      "parameters": {
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "analytics"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3f32c722-1849-4358-8993-cd7fe69fd1fd",
      "name": "Aggregate Analytics Metrics",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        800,
        896
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "7b3d5ec0-c8fb-4816-82b6-eda5c0fcc020",
      "name": "Generate Dashboard Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        896
      ],
      "parameters": {
        "jsCode": "// Calculate dashboard metrics from analytics data\nconst items = $input.all();\n\n// Initialize metrics\nlet totalUsers = 0;\nlet activeUsers = 0;\nlet totalRevenue = 0;\nlet churnedUsers = 0;\nconst userStatuses = {};\n\n// Process each item from analytics data\nfor (const item of items) {\n  const data = item.json;\n  \n  // Count total users\n  if (data.userId) {\n    totalUsers++;\n    \n    // Track user status\n    const status = data.status || 'unknown';\n    userStatuses[status] = (userStatuses[status] || 0) + 1;\n    \n    // Count active users\n    if (status === 'active') {\n      activeUsers++;\n    }\n    \n    // Count churned users\n    if (status === 'churned' || status === 'cancelled') {\n      churnedUsers++;\n    }\n    \n    // Sum revenue\n    if (data.revenue) {\n      totalRevenue += parseFloat(data.revenue);\n    }\n  }\n}\n\n// Calculate churn rate\nconst churnRate = totalUsers > 0 ? ((churnedUsers / totalUsers) * 100).toFixed(2) : 0;\n\n// Calculate average revenue per user\nconst arpu = totalUsers > 0 ? (totalRevenue / totalUsers).toFixed(2) : 0;\n\n// Generate dashboard data\nconst dashboardData = {\n  timestamp: new Date().toISOString(),\n  metrics: {\n    totalUsers: totalUsers,\n    activeUsers: activeUsers,\n    churnedUsers: churnedUsers,\n    totalRevenue: parseFloat(totalRevenue.toFixed(2)),\n    churnRate: parseFloat(churnRate),\n    averageRevenuePerUser: parseFloat(arpu)\n  },\n  userStatusBreakdown: userStatuses,\n  summary: {\n    activePercentage: totalUsers > 0 ? ((activeUsers / totalUsers) * 100).toFixed(2) : 0,\n    revenueFormatted: `$${totalRevenue.toFixed(2)}`,\n    health: churnRate < 5 ? 'excellent' : churnRate < 10 ? 'good' : churnRate < 20 ? 'warning' : 'critical'\n  }\n};\n\nreturn [{ json: dashboardData }];"
      },
      "typeVersion": 2
    },
    {
      "id": "ddddb867-d262-4aa5-83f4-91ec90d1f222",
      "name": "Send Dashboard to External Service",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        896
      ],
      "parameters": {
        "url": "={{ $('Workflow Configuration').first().json.dashboardApiUrl }}",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ $json }}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.3
    },
    {
      "id": "becdfb4b-4b85-4b3b-a5dd-480c4b0e5170",
      "name": "Billing Event Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        256,
        1216
      ],
      "parameters": {
        "path": "billing-event",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "lastNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "e387cbda-d8b3-48d9-a77f-f88624560218",
      "name": "Process Billing Event",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        1216
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "eventType",
              "type": "string",
              "value": "={{ $json.body.type }}"
            },
            {
              "id": "id-2",
              "name": "customerId",
              "type": "string",
              "value": "={{ $json.body.customer }}"
            },
            {
              "id": "id-3",
              "name": "subscriptionId",
              "type": "string",
              "value": "={{ $json.body.subscription }}"
            },
            {
              "id": "id-4",
              "name": "amount",
              "type": "number",
              "value": "={{ $json.body.amount }}"
            },
            {
              "id": "id-5",
              "name": "timestamp",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "e3a408c8-7bcc-4c98-80fe-d3b6d4964aeb",
      "name": "Update User Billing Status",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        704,
        1216
      ],
      "parameters": {
        "columns": {
          "value": {},
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "users"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d2079c3a-2c18-4fa5-8700-2c75e9b2624f",
      "name": "Check Event Type",
      "type": "n8n-nodes-base.if",
      "position": [
        928,
        1216
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Update User Billing Status').item.json.eventType }}",
              "rightValue": "subscription.deleted"
            },
            {
              "id": "id-2",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Update User Billing Status').item.json.eventType }}",
              "rightValue": "customer.subscription.deleted"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "312bb68a-7503-45bd-9c77-e2d57ac4bf54",
      "name": "Send Cancellation Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1472,
        1216
      ],
      "parameters": {
        "sendTo": "={{ $json.customerId }}",
        "message": "Your subscription has been cancelled. We'd love to hear your feedback and hope to see you again in the future.\n\nIf you have any questions or concerns, please don't hesitate to reach out to our support team.",
        "options": {},
        "subject": "We're Sorry to See You Go"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4c16411a-601b-4c6e-916a-7fa31af19094",
      "name": "Send Payment Confirmation",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1088,
        1264
      ],
      "parameters": {
        "sendTo": "={{ $json.customerId }}",
        "message": "=Thank you for your payment! Your subscription is now active.\n\nAmount: ${{ $json.amount / 100 }}\nSubscription ID: {{ $json.subscriptionId }}\n\nWe appreciate your business!",
        "options": {},
        "subject": "Payment Confirmation - Thank You!"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b08c7d12-303b-4776-90ae-ecef0f33b1a3",
      "name": "MCP Server - Expose Tools",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        368,
        144
      ],
      "parameters": {
        "path": "micro-saas-backend-mcp"
      },
      "typeVersion": 2
    },
    {
      "id": "85057c4a-e4ab-4794-b5d9-f1def9726938",
      "name": "Data Table Tool - User Management1",
      "type": "n8n-nodes-base.dataTableTool",
      "position": [
        320,
        288
      ],
      "parameters": {
        "columns": {
          "value": {},
          "mappingMode": "defineBelow"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "users"
        },
        "descriptionType": "manual",
        "toolDescription": "Manage user data including sign-ups, profiles, and account status"
      },
      "typeVersion": 1
    },
    {
      "id": "e445e09e-6095-4859-8d3e-dcf6432740ad",
      "name": "Data Table Tool - Analytics1",
      "type": "n8n-nodes-base.dataTableTool",
      "position": [
        448,
        336
      ],
      "parameters": {
        "columns": {
          "value": {},
          "mappingMode": "defineBelow"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "name",
          "value": "analytics"
        },
        "descriptionType": "manual",
        "toolDescription": "Track user activity, engagement metrics, and usage statistics"
      },
      "typeVersion": 1
    },
    {
      "id": "892c9806-6f2c-4733-8993-ac3ab4a2cf7a",
      "name": "Gmail Tool - Send Emails1",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        576,
        320
      ],
      "parameters": {
        "sendTo": "={{ $fromAI('recipientEmail') }}",
        "message": "={{ $fromAI('emailBody') }}",
        "options": {},
        "subject": "={{ $fromAI('emailSubject') }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1a5ae908-0674-4d8d-8364-d8e701a493e2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -288
      ],
      "parameters": {
        "color": 5,
        "width": 608,
        "height": 208,
        "content": "## CUSTOMIZATION:\nExtend AI prompts for different support categories; add Slack/Teams notifications \n \n\n## BENEFITS:\nReduces manual overhead 70%, routes tickets 10x faster, centralizes customer data"
      },
      "typeVersion": 1
    },
    {
      "id": "b1331422-2598-4711-8898-a4d31cf29b7f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -288
      ],
      "parameters": {
        "color": 4,
        "width": 416,
        "height": 192,
        "content": "## PREREQUISITES:\nOpenAI API key, Gmail account with app password, MCP Server access, Data Table Tool credentials \n\n\n## USE CASES:\nManage SaaS customer lifecycle end-to-end; Route critical support instantly \n"
      },
      "typeVersion": 1
    },
    {
      "id": "b6cc4a0d-e313-4657-8104-d535a55cfb08",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -288
      ],
      "parameters": {
        "color": 3,
        "width": 432,
        "height": 192,
        "content": "## SETUP STEPS:\n1. Add OpenAI API credentials for chat model routing\n2. Authenticate Gmail with app password for notifications\n3. Connect Data Table Tool for user/support/billing storage\n4. Configure workflow settings: priority thresholds and routing rules"
      },
      "typeVersion": 1
    },
    {
      "id": "c736c37a-87a5-47bc-9397-02ae9b170d9c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        -288
      ],
      "parameters": {
        "width": 640,
        "height": 192,
        "content": "## HOW IT WORKS :\nAutomates SaaS operations by consolidating user management, AI-driven support triage, analytics, and billing into one unified system. User signups flow through registration, support requests route via OpenAI prioritization, billing events trigger confirmations, and daily analytics feed dashboards. The AI Business Logic layer orchestrates real-time decisions, enriches data, and triggers Gmail notifications. Four data streams converge into centralized routing for customer onboarding, ticket triage, metrics aggregation, and revenue automation."
      },
      "typeVersion": 1
    },
    {
      "id": "1084795e-6763-4afe-97b1-c4bc95391364",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        1200
      ],
      "parameters": {
        "color": 7,
        "width": 2144,
        "height": 240,
        "content": "## Billing Automation\n**What:** Billing events trigger processing \u2192 updates user status \u2192 sends confirmations\n**Why:** Streamlines revenue ops, maintains accuracy, improves customer communication"
      },
      "typeVersion": 1
    },
    {
      "id": "550459a1-b4ea-4537-8e48-7c0ab946156a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        864
      ],
      "parameters": {
        "color": 7,
        "width": 2144,
        "height": 304,
        "content": "## Analytics\n**What:** Daily schedule fetches analytics \u2192 aggregates metrics \u2192 generates dashboards\n**Why:** Real-time business visibility, KPI tracking, data-driven decisions"
      },
      "typeVersion": 1
    },
    {
      "id": "1b0b77ee-afe4-467c-ac99-c10dc92d0d45",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        480
      ],
      "parameters": {
        "color": 7,
        "width": 2144,
        "height": 368,
        "content": "## Support Triage\n**What:** Receives requests \u2192 OpenAI model prioritizes \u2192 routes high-priority to Gmail\n**Why:** Intelligent categorization reduces manual work, ensures urgent issues get instant attention\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d0b0d994-4f4d-4494-92aa-e51ce072f8b6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 2160,
        "height": 528,
        "content": "## User Onboarding\n**What:** Form captures signups \u2192 stores in tables \u2192 MCP tools manage records\n**Why:** Automates account creation, ensures data consistency, enables customer tracking"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "f0b6a4bd-c481-4ab9-a555-0b6e820a07d0",
  "connections": {
    "Store User Data": {
      "main": [
        [
          {
            "node": "AI Business Logic Orchestrator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Event Type": {
      "main": [
        [
          {
            "node": "Send Cancellation Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Payment Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Business Logic Orchestrator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "User Sign-Up Form": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Priority Level": {
      "main": [
        [
          {
            "node": "Send Admin Alert - High Priority",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Auto-Response - Normal Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Billing Event Webhook": {
      "main": [
        [
          {
            "node": "Process Billing Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Billing Event": {
      "main": [
        [
          {
            "node": "Update User Billing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Support Requests": {
      "main": [
        [
          {
            "node": "AI Support Triage Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Store User Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Support Triage Agent": {
      "main": [
        [
          {
            "node": "Check Priority Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Dashboard Data": {
      "main": [
        [
          {
            "node": "Send Dashboard to External Service",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Support Request Webhook": {
      "main": [
        [
          {
            "node": "Prepare Support Request Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Analytics Schedule": {
      "main": [
        [
          {
            "node": "Fetch User Analytics Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Tool - Send Emails": {
      "ai_tool": [
        [
          {
            "node": "AI Business Logic Orchestrator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Business Logic Orchestrator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Fetch User Analytics Data": {
      "main": [
        [
          {
            "node": "Aggregate Analytics Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Tool - Send Emails1": {
      "ai_tool": [
        [
          {
            "node": "MCP Server - Expose Tools",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update User Billing Status": {
      "main": [
        [
          {
            "node": "Check Event Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Analytics Metrics": {
      "main": [
        [
          {
            "node": "Generate Dashboard Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Table Tool - Analytics": {
      "ai_tool": [
        [
          {
            "node": "AI Business Logic Orchestrator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model - Support": {
      "ai_languageModel": [
        [
          {
            "node": "AI Support Triage Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Data Table Tool - Analytics1": {
      "ai_tool": [
        [
          {
            "node": "MCP Server - Expose Tools",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Support Request Data": {
      "main": [
        [
          {
            "node": "Store Support Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Support Triage Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Support Triage Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Data Table Tool - User Management": {
      "ai_tool": [
        [
          {
            "node": "AI Business Logic Orchestrator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Data Table Tool - User Management1": {
      "ai_tool": [
        [
          {
            "node": "MCP Server - Expose Tools",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Automates SaaS operations by consolidating user management, AI-driven support triage, analytics, and billing into one unified system. User signups flow through registration, support requests route via OpenAI prioritization, billing events trigger confirmations, and daily…

Source: https://n8n.io/workflows/11859/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Who is this for? Agencies, consultants, and service providers who conduct discovery calls and need to quickly turn conversations into professional proposals.

Tool Think, Tool Calculator, Agent Tool +18
AI & RAG

This workflow serves as a comprehensive "Workflow Nodes SEO & Documentation Generator". It uses AI to analyze, rename, and document n8n workflows, offering a streamlined way to optimize workflow reada

Form Trigger, n8n, Output Parser Autofixing +11
AI & RAG

This is an automated blog post generation system that: Researches topics using AI agents and web search tools Writes complete blog posts with proper SEO structure Generates custom images for each post

Output Parser Structured, Google Gemini Chat, HTTP Request Tool +11
AI & RAG

Receives campaign parameters via form, creates a Smartlead campaign, sources qualified leads through Wiza based on your ICP description, researches each prospect with Perplexity AI, generates personal

HTTP Request, Output Parser Structured, Memory Buffer Window +6
AI & RAG

Top Branch Workflow A The Market Intelligence: Patrols the Market: Runs hourly to scrape competitor rates for future days. Gathers Intel: If prices spike, it instantly checks event announcements to se

HTTP Request, Data Table, Output Parser Structured +6