Bestätigung von Shopify-Aufträgen aus Airtable über Gmail-Automatisierung
Dies ist ein Automatisierungsworkflow mit 14 Nodes. Hauptsächlich werden If, Gmail, Shopify, Webhook, Airtable und andere Nodes verwendet. Automatisierung von Shopify-Aufträgen aus Airtable und Bestätigungsversand über Gmail
- •Google-Konto + Gmail API-Anmeldedaten
- •Shopify Admin API-Anmeldedaten
- •HTTP Webhook-Endpunkt (wird von n8n automatisch generiert)
- •Airtable API Key
Kategorie
{
"id": "JjrhFDyBIgB20pnY",
"meta": {
"instanceId": "1a54c41d9050a8f1fa6f74ca858828ad9fb97b9fafa3e9760e576171c531a787"
},
"name": "Automate Shopify Orders from Airtable with Gmail Confirmations",
"tags": [],
"nodes": [
{
"id": "c07b2f4e-f9c6-40a9-88a3-cd3d905b1ab4",
"name": "Notiz",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1632,
-416
],
"parameters": {
"color": 3,
"width": 384,
"height": 560,
"content": "## The Trigger\n\n### This node acts as the workflow's entry point. It waits for a signal from an external service\n\n### It's designed to be triggered by an Airtable Automation whenever you mark an order as ready. The Airtable Automation will send the unique recordId of the order to this webhook.\n\n### Action Required: You must copy the 'Production URL' from this node and use it in your Airtable Automation script. This is how Airtable tells n8n to start."
},
"typeVersion": 1
},
{
"id": "aa293e3f-80ae-4d7d-822d-99060117f9d8",
"name": "Trigger von Airtable",
"type": "n8n-nodes-base.webhook",
"position": [
-1520,
-16
],
"webhookId": "f4e69e57-40f0-4af9-b44d-17eb9389b427",
"parameters": {
"path": "f4e69e57-40f0-4af9-b44d-17eb9389b427",
"options": {}
},
"typeVersion": 2.1
},
{
"id": "5446b168-c78c-438f-9670-1a5e050a978f",
"name": "Notiz1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1200,
-416
],
"parameters": {
"color": 3,
"width": 368,
"height": 560,
"content": "## Fetch Order & Customer Details\n\n### This node receives the recordId from the Webhook and uses it to look up the complete order record in your Airtable Orders table.\n\n### It gathers all the essential customer information needed for the Shopify order, such as the customer's name, email, and shipping address.\n\n### This step turns a simple ID into a full customer and order profile."
},
"typeVersion": 1
},
{
"id": "2f2c60e4-ffab-475a-9b09-5cd5bfa5e723",
"name": "Bestell- & Kundendetails abrufen",
"type": "n8n-nodes-base.airtable",
"position": [
-1056,
-16
],
"parameters": {
"id": "={{ $json.query.recordId }}",
"base": {
"__rl": true,
"mode": "list",
"value": "appQTd8PXDgHdjOpr",
"cachedResultUrl": "https://airtable.com/appQTd8PXDgHdjOpr",
"cachedResultName": "Dynamic Video Content"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblEXxxmfYYsMDLC9",
"cachedResultUrl": "https://airtable.com/appQTd8PXDgHdjOpr/tblEXxxmfYYsMDLC9",
"cachedResultName": "Orders"
},
"options": {}
},
"typeVersion": 2.1
},
{
"id": "d2faa646-73ed-4945-973c-9519a5ef172b",
"name": "Notiz2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-784,
-416
],
"parameters": {
"color": 3,
"width": 368,
"height": 560,
"content": "## Fetch Product Line Items \n\n### After getting the main order details, this node looks up the associated Order Line Items record.\n\n### It retrieves the specific products for the order, including the Product Name, Quantity, and Price. Without this step, Shopify wouldn't know what items to add to the cart.\n\n### This step builds the contents of the customer's order."
},
"typeVersion": 1
},
{
"id": "f95ca4c0-d248-45d7-b6f1-e232b625dc09",
"name": "Produkt-Line-Elemente abrufen",
"type": "n8n-nodes-base.airtable",
"position": [
-640,
-16
],
"parameters": {
"id": "={{ $json['Order Line Items'][0] }}",
"base": {
"__rl": true,
"mode": "list",
"value": "appQTd8PXDgHdjOpr",
"cachedResultUrl": "https://airtable.com/appQTd8PXDgHdjOpr",
"cachedResultName": "Dynamic Video Content"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblC9b18Rf1uZZW7m",
"cachedResultUrl": "https://airtable.com/appQTd8PXDgHdjOpr/tblC9b18Rf1uZZW7m",
"cachedResultName": "Order Line Items"
},
"options": {}
},
"typeVersion": 2.1
},
{
"id": "d26b1db9-f190-4ff5-9f9a-f8e24cb15fe0",
"name": "Notiz3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-368,
-416
],
"parameters": {
"color": 3,
"width": 368,
"height": 576,
"content": "## Create the Order in Shopify\n\n### This is the core action of the workflow. It takes all the customer and product information gathered from Airtable and uses it to create a new order directly in your Shopify store.\n\n### The fields in this node are carefully mapped to pull data like First Name, Country, Product Name, and Quantity from the previous steps.\n\n### This node turns your Airtable data into a real Shopify transaction."
},
"typeVersion": 1
},
{
"id": "5f84993b-5a4b-4afb-b9b5-4afe10c5e86e",
"name": "Bestellung in Shopify erstellen",
"type": "n8n-nodes-base.shopify",
"position": [
-208,
-16
],
"parameters": {
"limeItemsUi": {
"lineItemValues": [
{
"price": "={{ $json.Price }}",
"title": "={{ $json.Title }}",
"quantity": "={{ $json.Quantity }}",
"productId": "={{ $json['Product Name'] }}"
}
]
},
"authentication": "oAuth2",
"additionalFields": {
"email": "={{ $('Fetch Order & Customer Details').item.json['Email ID'] }}",
"shippingAddressUi": {
"shippingAddressValues": {
"zip": "={{ $('Fetch Order & Customer Details').item.json['Zip Code'] }}",
"city": "={{ $('Fetch Order & Customer Details').item.json.City }}",
"phone": "={{ $('Fetch Order & Customer Details').item.json.Phone }}",
"country": "={{ $('Fetch Order & Customer Details').item.json.Country }}",
"address1": "={{ $('Fetch Order & Customer Details').item.json['Address Line 1'] }}",
"address2": "={{ $('Fetch Order & Customer Details').item.json['Address Line 2'] }}",
"lastName": "={{ $('Fetch Order & Customer Details').item.json['Last Name'] }}",
"province": "={{ $('Fetch Order & Customer Details').item.json.Province }}",
"firstName": "={{ $('Fetch Order & Customer Details').item.json['First Name'] }}"
}
}
}
},
"typeVersion": 1
},
{
"id": "1a679ecb-190e-47b7-b8cc-e7a552ef265b",
"name": "Notiz4",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
-416
],
"parameters": {
"color": 3,
"width": 368,
"height": 576,
"content": "## Send Order Confirmation Email\n\n### Once the Shopify order is created successfully, this node sends a confirmation email to the customer.\n\n\n### It uses data from the new Shopify order (like order_number and total_price) to populate a professional HTML email template. You can customize the HTML in this node to match your brand's style.\n"
},
"typeVersion": 1
},
{
"id": "faaae486-32c7-4cf8-8c1b-15b2bb84ede0",
"name": "Bestellbestätigungs-E-Mail senden",
"type": "n8n-nodes-base.gmail",
"position": [
176,
-16
],
"webhookId": "a4a8c440-78fa-487e-929a-3f3506078ca0",
"parameters": {
"sendTo": "samartian8@gmail.com",
"message": "=<div style=\"font-family: Arial, sans-serif; color: #333333; line-height: 1.5; max-width: 600px; margin: auto; padding: 20px; background-color: #f9f9f9; border-radius: 8px;\"> <h2 style=\"color: #4CAF50; text-align: center;\">Your Order is Confirmed!</h2> <p>Hi <strong> {{ $json.customer.first_name }} {{ $json.customer.last_name }}</strong>,</p> <p>Thank you for your order! We're excited to let you know that your order has been successfully placed and is being processed.</p> <h3>Order Summary</h3> <table style=\"width: 100%; border-collapse: collapse; margin-bottom: 20px;\"> <tr> <th style=\"text-align: left; border-bottom: 1px solid #ddd; padding: 8px;\">Order Number</th> <td style=\"padding: 8px;\"> {{ $json.order_number }}</td> </tr> <tr> <th style=\"text-align: left; border-bottom: 1px solid #ddd; padding: 8px;\">Order Date</th> <td style=\"padding: 8px;\">{{ new Date($json.created_at).toISOString().split('T')[0] }}\n\n </td> </tr> <tr> <th style=\"text-align: left; border-bottom: 1px solid #ddd; padding: 8px;\">Total Amount</th> <td style=\"padding: 8px;\">{{ $json.currency }} {{ $json.current_total_price }}</td> </tr> </table> <h3>Item Ordered</h3> <table style=\"width: 100%; border-collapse: collapse; margin-bottom: 20px;\"> <tr> <th style=\"text-align: left; border-bottom: 1px solid #ddd; padding: 8px;\">Product</th> <td style=\"padding: 8px;\">{{ $('Fetch Product Line Items').item.json['Product Name'] }} </td> </tr> <tr> <th style=\"text-align: left; border-bottom: 1px solid #ddd; padding: 8px;\">Quantity</th> <td style=\"padding: 8px;\">{{ $json.line_items[0].quantity }}</td> </tr> <tr> <th style=\"text-align: left; border-bottom: 1px solid #ddd; padding: 8px;\">Price</th> <td style=\"padding: 8px;\">{{ $json.current_subtotal_price_set.shop_money.amount }}</td> </tr> </table> <p>If you have any questions, feel free to reply to this email or contact our support team.</p> <p style=\"text-align: center;\"> <a href=\"{{$json[\"OrderLink\"]}}\" style=\"display: inline-block; padding: 10px 20px; background-color: #4CAF50; color: #ffffff; text-decoration: none; border-radius: 5px;\">View Your Order</a> </p> <p style=\"font-size: 12px; color: #777777; text-align: center; margin-top: 20px;\"> © 2025 Your Samartian. All rights reserved. </p> </div>",
"options": {},
"subject": "Order Confirmed !"
},
"typeVersion": 2.1
},
{
"id": "b8ce7156-635b-4294-b7dd-429aa4995401",
"name": "Notiz5",
"type": "n8n-nodes-base.stickyNote",
"position": [
608,
-416
],
"parameters": {
"color": 3,
"width": 368,
"height": 576,
"content": "## Close the Loop - Update Airtable Status\n\n### This is the final step. It takes the original recordId from the very beginning of the workflow and uses it to find the order record in your Airtable Orders table.\n\n\n### It then updates the 'Shopify Ordered' status to 'Done'. This is crucial because it prevents the Airtable Automation from triggering this workflow for the same order ever again.\n"
},
"typeVersion": 1
},
{
"id": "38c5e7da-e7ec-4dd5-8d52-4684b600483f",
"name": "Notiz6",
"type": "n8n-nodes-base.stickyNote",
"position": [
368,
256
],
"parameters": {
"color": 3,
"width": 432,
"height": 560,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Confirm Email Sent?\n\n### This is a simple but important checkpoint. It checks the output from the Gmail node to confirm that the confirmation email was successfully sent.\n\n\n### If the email has the SENT label, the workflow proceeds. If not, it stops. This prevents us from marking the order as 'Done' in Airtable if the customer didn't receive their confirmation.\n\n\n\n"
},
"typeVersion": 1
},
{
"id": "0899512f-4f91-4e92-91aa-4df4b3861d3c",
"name": "E-Mail-Versand bestätigt?",
"type": "n8n-nodes-base.if",
"position": [
560,
304
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6ebeb00a-1bed-47dc-b84e-a83e4ea43b04",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.labelIds[0] }}",
"rightValue": "SENT"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "18b32ce7-74e4-42a0-ad1a-0e21502f3981",
"name": "Abschluss – Status in Airtable aktualisieren",
"type": "n8n-nodes-base.airtable",
"position": [
752,
-32
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appQTd8PXDgHdjOpr",
"cachedResultUrl": "https://airtable.com/appQTd8PXDgHdjOpr",
"cachedResultName": "Dynamic Video Content"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblEXxxmfYYsMDLC9",
"cachedResultUrl": "https://airtable.com/appQTd8PXDgHdjOpr/tblEXxxmfYYsMDLC9",
"cachedResultName": "Orders"
},
"columns": {
"value": {
"id": "={{ $('Fetch Order & Customer Details').item.json.id }}",
"Shopify Ordered": "Done"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Order Number",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Order Number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "First Name",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "First Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Last Name",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Last Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Country",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Country",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Address Line 1",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Address Line 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Address Line 2",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Address Line 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "City",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "City",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Province",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Province",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Zip Code",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Zip Code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email ID",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Email ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Order Line Items",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Order Line Items",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trigger Shopify",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Trigger Shopify",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Shopify Ordered",
"type": "options",
"display": true,
"options": [
{
"name": "Pending",
"value": "Pending"
},
{
"name": "Done",
"value": "Done"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Shopify Ordered",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update"
},
"typeVersion": 2.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "e292d3d8-118d-45ef-aebc-1ed81c03bbfe",
"connections": {
"0899512f-4f91-4e92-91aa-4df4b3861d3c": {
"main": [
[
{
"node": "18b32ce7-74e4-42a0-ad1a-0e21502f3981",
"type": "main",
"index": 0
}
]
]
},
"aa293e3f-80ae-4d7d-822d-99060117f9d8": {
"main": [
[
{
"node": "2f2c60e4-ffab-475a-9b09-5cd5bfa5e723",
"type": "main",
"index": 0
}
]
]
},
"f95ca4c0-d248-45d7-b6f1-e232b625dc09": {
"main": [
[
{
"node": "5f84993b-5a4b-4afb-b9b5-4afe10c5e86e",
"type": "main",
"index": 0
}
]
]
},
"5f84993b-5a4b-4afb-b9b5-4afe10c5e86e": {
"main": [
[
{
"node": "faaae486-32c7-4cf8-8c1b-15b2bb84ede0",
"type": "main",
"index": 0
}
]
]
},
"faaae486-32c7-4cf8-8c1b-15b2bb84ede0": {
"main": [
[
{
"node": "0899512f-4f91-4e92-91aa-4df4b3861d3c",
"type": "main",
"index": 0
}
]
]
},
"2f2c60e4-ffab-475a-9b09-5cd5bfa5e723": {
"main": [
[
{
"node": "f95ca4c0-d248-45d7-b6f1-e232b625dc09",
"type": "main",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Fortgeschritten
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Intuz
@intuzWorkflow automation can help automate your routine activities and help saves $$$, as well as hours of time. As a boutique tech consulting company, Intuz help businesses with custom AI/ML, AI Workflow Automations, and software development. Automate your business workflow for: Sales Marketing Accounting Finance Operations E-Commerce Customer Support Admin & Backoffice Logistics & Supply Chain
Diesen Workflow teilen