This workflow follows the Agent → Google Sheets Tool 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 →
{
"name": "WhatsApp AI Agent - Order Management",
"nodes": [
{
"parameters": {
"path": "whatsapp-webhook",
"authentication": "headerAuth",
"headerAuth": {
"secretKey": "your-secret-key-here"
},
"options": {}
},
"id": "whatsapp-trigger",
"name": "WhatsApp Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "{{ $json.data.sender }}",
"startingMessage": "",
"schemaExample": "{\n \"messageText\": \"What's the status of my order?\",\n \"customerId\": \"123\"\n}",
"memory": "long",
"model": "gpt-4o-mini",
"options": {}
},
"id": "ai-agent",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1,
"position": [
500,
300
],
"credentials": {
"openAiApi": "<your credential>"
}
},
{
"parameters": {
"resource": "sheet",
"operation": "read",
"documentId": "{{ $env.GOOGLE_SHEETS_ID }}",
"sheetName": "Sales Orders",
"options": {
"range": "A:Z"
}
},
"id": "get-order-status",
"name": "getOrderStatus",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4,
"position": [
750,
100
],
"credentials": {
"googleSheetsOAuth2": "<your credential>"
}
},
{
"parameters": {
"resource": "sheet",
"operation": "read",
"documentId": "{{ $env.GOOGLE_SHEETS_ID }}",
"sheetName": "Inventory",
"options": {
"range": "A:D"
}
},
"id": "get-inventory",
"name": "getInventory",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4,
"position": [
750,
200
],
"credentials": {
"googleSheetsOAuth2": "<your credential>"
}
},
{
"parameters": {
"resource": "sheet",
"operation": "update",
"documentId": "{{ $env.GOOGLE_SHEETS_ID }}",
"sheetName": "Sales Orders",
"keyRow": 1,
"columns": "Order ID=orderId,Customer Name=customerName,Order Status=status,Total Amount=amount,Last Updated=timestamp"
},
"id": "update-sales-orders",
"name": "updateSalesOrders",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4,
"position": [
750,
300
],
"credentials": {
"googleSheetsOAuth2": "<your credential>"
}
},
{
"parameters": {
"resource": "sheet",
"operation": "append",
"documentId": "{{ $env.GOOGLE_SHEETS_ID }}",
"sheetName": "Sales Orders",
"columns": "Order ID=orderId,Customer Name=customerName,Order Status=status,Total Amount=amount,Created Date=createdDate"
},
"id": "append-sales-orders",
"name": "appendSalesOrders",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4,
"position": [
750,
400
],
"credentials": {
"googleSheetsOAuth2": "<your credential>"
}
},
{
"parameters": {
"resource": "sheet",
"operation": "delete",
"documentId": "{{ $env.GOOGLE_SHEETS_ID }}",
"sheetName": "Sales Orders",
"where": {
"column": "Order ID",
"condition": "equals",
"value": "{{ $json.orderId }}"
}
},
"id": "delete-orders",
"name": "deleteOrders",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4,
"position": [
750,
500
],
"credentials": {
"googleSheetsOAuth2": "<your credential>"
}
},
{
"parameters": {
"operation": "post",
"url": "{{ $env.WHATSAPP_API_URL }}/messages",
"authentication": "genericCredentialType",
"genericAuth": {
"authType": "bearerAuth",
"bearerAuth": "{{ $env.WHATSAPP_ACCESS_TOKEN }}"
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "messaging_product",
"value": "whatsapp"
},
{
"name": "to",
"value": "{{ $json.data.sender }}"
},
{
"name": "type",
"value": "text"
},
{
"name": "text",
"value": {
"body": "{{ $json.text }}"
}
}
]
}
},
"id": "whatsapp-response",
"name": "WhatsApp Response",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1000,
300
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "6d8d6f03-68f4-44b2-9d33-4f995a98ec51",
"name": "text",
"value": "={{ $json.output }}",
"type": "string"
},
{
"id": "a933f7c1-d419-4f7f-8c33-bd8853b0f2ea",
"name": "data",
"value": "={{ $json.data }}",
"type": "object"
}
]
},
"options": {}
},
"id": "format-response",
"name": "Format Response",
"type": "n8n-nodes-base.set",
"typeVersion": 3.2,
"position": [
850,
300
]
}
],
"connections": {
"WhatsApp Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Format Response",
"type": "main",
"index": 0
}
]
]
},
"Format Response": {
"main": [
[
{
"node": "WhatsApp Response",
"type": "main",
"index": 0
}
]
]
},
"getOrderStatus": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"getInventory": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"updateSalesOrders": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"appendSalesOrders": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"deleteOrders": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"saveManualExecutions": true
},
"staticData": null,
"versionId": "1"
}
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.
googleSheetsOAuth2openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
WhatsApp AI Agent - Order Management. Uses agent, googleSheetsTool, httpRequest. Webhook trigger; 9 nodes.
Source: https://github.com/ahmed-ali-codes/whatsapp-order-management-n8n/blob/main/n8n-whatsapp-ai-agent-workflow.json — 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.
[](https://www.youtube.com/watch?v=NAn5BSr15Ks) > This workflow connects a Slack chatbot with AI agents and Google Sheets to automate candidate resume evaluation. It extracts resume details, identi
Marketing Agent. Uses httpRequest, openAi, agent, googleSheetsTool. Webhook trigger; 28 nodes.
Code. Uses agent, lmChatOpenAi, googleSheetsTool, microsoftOutlook. Webhook trigger; 27 nodes.
This workflow template automates lead management and customer inquiry processing by integrating ERPNext, AI agents, and email notifications. It streamlines the process of capturing leads, analyzing in
12-Automate_WhatsApp_Booking_System_with_GPT_4_Assistant__Cal_com_and_SMS_Reminders. Uses agent, lmChatOpenAi, memoryBufferWindow, googleSheetsTool. Webhook trigger; 26 nodes.