This workflow corresponds to n8n.io template #9705 — we link there as the canonical source.
This workflow follows the Agent → Gmail 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 →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "87dd714d-b830-4855-8e12-3926dae58c52",
"name": "Text Classifier1",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
352,
416
],
"parameters": {
"options": {},
"inputText": "={{ $json.snippet }}",
"categories": {
"categories": [
{
"category": "WISmo",
"description": "all related to product orders like where is my order.when will my order come?."
},
{
"category": "other",
"description": "all the emails that are not belonged to WISmo are belonges to this category"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "86b0fe3d-c2cf-4f78-8d33-191f9cd20709",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
704,
160
],
"parameters": {
"text": "=subject of email:{{ $('Gmail Trigger').item.json.Subject }}\ncontent:{{ $('Gmail Trigger').item.json.snippet }}",
"options": {
"systemMessage": "=System Layer\nRole\n\nYou are a calm and friendly Shopify Customer Support Assistant.\nYour role is to help users with their Shopify orders by retrieving accurate information through available tools, answering clearly, and maintaining a warm, professional tone.\nYour goal is to make each customer feel reassured and supported while keeping sensitive data private.\n\nTools Available\n\nGet All Orders \u2014 Use this tool to retrieve all orders associated with the user\u2019s account.\n\nGet Details About Specific Order \u2014 Use this tool to fetch detailed information about a particular order once you have the order ID.\n\nInstructions\n\nWhen the user asks about their order, first check if they provided an order ID.\n\nIf no order ID is provided, politely ask for it before proceeding.\n\nOnce you have the order ID:\n\nUse Get All Orders to retrieve the list of orders.\n\nMatch the provided order ID which is{{ $json.orderId }} with the correct record.\n\nThen, use Get Details About Specific Order to fetch complete details.\n\nNever show or mention internal IDs, system codes, or hidden parameters.\n\nBegin your response with a positive and reassuring tone (e.g., excitement about their order).\n\nEnd every interaction with a warm offer for further help.\n\nAlways use simple, friendly language and avoid technical jargon.\n\nExamples\nExample 1\n\nUser Input:\n\"Hi, can you tell me when my order #34891 will arrive?\"\n\nAgent Action:\n\nUse Get All Orders \u2192 find the record matching order ID #34891.\n\nUse Get Details About Specific Order for full details.\n\nExpected Output:\n\"That order looks great! Your package #34891 is currently being prepared and is expected to arrive by Thursday. I\u2019ll keep an eye on it for you\u2014want me to send tracking updates when it ships?\"\n\nExample 2\n\nUser Input:\n\"Hey, I can\u2019t find my last order, can you check it for me?\"\n\nAgent Action:\n\nDetect missing order ID.\n\nPolitely ask the user to provide it.\n\nExpected Output:\n\"I\u2019d love to check on that for you! Could you please share your order ID so I can find the exact details?\"\n\nFinal Notes\n\nAlways remain calm, empathetic, and positive.\n\nNever fabricate order information.\n\nIf data is missing, ask politely for clarification.\n\nToday\u2019s date:{{ $now }}"
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "815c73a7-43c4-44c2-a55f-c3f5e59bb748",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"position": [
768,
560
],
"parameters": {},
"typeVersion": 1
},
{
"id": "4434d2c6-807d-4ad6-8595-3850c0bfa944",
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
128,
416
],
"parameters": {
"filters": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"typeVersion": 1.3
},
{
"id": "e93041e8-5408-4c2a-8039-9163a3bb30cc",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
48
],
"parameters": {
"width": 272,
"height": 320,
"content": "*watch this to set up first node [Gmail Trigger node]*\n[](https://youtu.be/SBPU5a8-8Xo?si=u7k_-FDyPQc0-7g1)\n\u2705 Make sure to configure authentication before running the workflow!"
},
"typeVersion": 1
},
{
"id": "cc797969-4212-47de-9dfe-b782375e1c6a",
"name": "OpenRouter Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
720,
384
],
"parameters": {
"model": "openai/gpt-5-nano",
"options": {}
},
"typeVersion": 1
},
{
"id": "8f7a0268-a87e-41af-b828-6dbc7c7eeafe",
"name": "get order details",
"type": "n8n-nodes-base.shopifyTool",
"position": [
848,
384
],
"parameters": {
"options": {},
"operation": "getAll",
"returnAll": true,
"authentication": "accessToken"
},
"typeVersion": 1
},
{
"id": "760332de-1809-4705-8ce2-894f6a23ff09",
"name": "Reply to the query",
"type": "n8n-nodes-base.gmail",
"position": [
1056,
272
],
"parameters": {
"message": "={{ $json.output }}",
"options": {
"appendAttribution": false
},
"emailType": "text",
"messageId": "={{ $('Gmail Trigger').item.json.threadId }}",
"operation": "reply"
},
"typeVersion": 2.1
},
{
"id": "26a0f7f4-e049-4838-876a-2a0045534145",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
448,
160
],
"parameters": {
"width": 208,
"height": 224,
"content": "## connect ai \n**step 1** : **open the [link](https://openrouter.ai/)** and sing up.\n\n**step 2** : get the api key,open openrouter node,click create credential, paste api in the openrouter node** "
},
"typeVersion": 1
},
{
"id": "e420674d-5fe9-4562-94c7-b7cf54fc1625",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
480
],
"parameters": {
"width": 352,
"height": 448,
"content": "## connect your shopify store. \n\n**In you shopify store** go to settings(bottom left ) > apps and sales channels > develop apps(top right) > create an app.\n\n**Then** give it a name (whatever) and click create app.\n\n**Now** go to Configure admin api scopes. select [read_orders]. and click save.\n\n**Then** go to overview tab and click install app.\n**then** get access token and copy it and paste it here in access token.\n**last** go to the shopify store tab and scroll down to get api secret key and copy-paste it here in api secret. and get you subdomain and paste it in subdomain.(in your url only get the part before myshopify.com for example, if the url is [https://oceanfront.myshopify.com/] then the subdomain is [oceanfront])."
},
"typeVersion": 1
},
{
"id": "7b876e10-ef6c-4284-8cc5-edc4525c5959",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
624
],
"parameters": {
"color": 2,
"width": 496,
"height": 80,
"content": " ## Contact [me](uzmannazlin76@gmail.com) if you want customizations.\nI will be happy if you give me feedbacks on this."
},
"typeVersion": 1
}
],
"connections": {
"AI Agent1": {
"main": [
[
{
"node": "Reply to the query",
"type": "main",
"index": 0
}
]
]
},
"Gmail Trigger": {
"main": [
[
{
"node": "Text Classifier1",
"type": "main",
"index": 0
}
]
]
},
"Text Classifier1": {
"main": [
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"get order details": {
"ai_tool": [
[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
What This Workflow Does Automatically handles customer support emails about Shopify orders using AI. When customers email questions like "Where is my order?" or "When will it arrive?", this workflow: Receives the email via Gmail trigger Classifies the email to identify…
Source: https://n8n.io/workflows/9705/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow automates the synchronization of product prices across Shopify and WooCommerce platforms to ensure retail consistency. It triggers when a price change is detected in either system, appli
Automatically enrich Zendesk tickets with WooCommerce order details and reduce manual lookups.
This n8n workflow listens to real-time WooCommerce order events and automatically detects delivery delays based on the estimated delivery date. When a delay is identified, it proactively notifies the
The workflow triggers on a new checkout event from Shopify and extracts all relevant cart data. It filters carts based on value and age to isolate qualified abandoned checkouts. For each qualified car
E-commerce store management made easy. The workflow pulls your daily Shopify orders, calculates essential metrics like revenue and fulfillment rates, and categorizes them by status (shipped, returned,