N
n8n Store
Workflow Market
JuraAPI

JuraAPI

by halfbit0 views

Description

Categories

🔧 Engineering

Nodes Used

n8n-nodes-base.setn8n-nodes-base.limitn8n-nodes-base.webhookn8n-nodes-base.webhookn8n-nodes-base.dateTimen8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.googleSheets
PriceGratuit
Views0
Last Updated11/28/2025
workflow.json
{
  "id": "dnQK7NOQfUrMALiF",
  "meta": {
    "instanceId": "0104f9ca12bf198b318f739b043549315e1a8785074cceda187147c6b2af4207",
    "templateCredsSetupCompleted": true
  },
  "name": "JuraAPI",
  "tags": [],
  "nodes": [
    {
      "id": "6da4081c-4a31-4e74-9fa4-ee162388dcbd",
      "name": "Receive Coffee Count (POST)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1840,
        1100
      ],
      "webhookId": "e417bd9b-3299-4ba6-bce8-bbc99e8ad924",
      "parameters": {
        "path": "{{WEBHOOK_POST_PATH}}",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "bd07e72e-03b1-46f9-baa0-afe37e789359",
      "name": "Generate Timestamp",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        2020,
        1100
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "f860254c-445f-4301-9539-1c88e77128ed",
      "name": "Prepare Row Data",
      "type": "n8n-nodes-base.set",
      "position": [
        2200,
        1100
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "acd0418e-301f-4f4b-b717-f70c434643ac",
              "name": "data",
              "type": "string",
              "value": "={{ $json.currentDate.split('T')[0] }}"
            },
            {
              "id": "eb338e38-4f67-45ba-bff8-394d929d74b2",
              "name": "time",
              "type": "string",
              "value": "={{ $json.currentDate.split('T')[1].split('.')[0] }}"
            },
            {
              "id": "aac80554-6e32-466b-9c34-e94be08fc7bd",
              "name": "coffee counter",
              "type": "number",
              "value": "={{ $('Webhook').item.json.body.total_coffees }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "50a045a3-c96c-4fd2-a3b0-230d899bd817",
      "name": "Fetch Sheet Rows",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2020,
        1340
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "mode": "list",
          "value": "{{SHEET_NAME}}",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "mode": "url",
          "value": "{{SHEET_ID}}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {}
      },
      "typeVersion": 4.6
    },
    {
      "id": "1afa84f1-3f21-4f19-a35f-8cda564c8f6b",
      "name": "Respond with Sheet Data",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2380,
        1340
      ],
      "parameters": {
        "options": {},
        "respondWith": "allIncomingItems"
      },
      "typeVersion": 1.4
    },
    {
      "id": "00d765ab-8008-4168-adef-006f62b01071",
      "name": "Append to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2380,
        1100
      ],
      "parameters": {
        "columns": {
          "schema": [
            {
              "id": "currentDate",
              "type": "string",
              "displayName": "currentDate",
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "mode": "list",
          "value": "{{SHEET_NAME}}",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "mode": "url",
          "value": "{{SHEET_ID}}"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "890d82ca-f2e8-4999-be60-54667c86562b",
      "name": "Limit to Last Row",
      "type": "n8n-nodes-base.limit",
      "position": [
        2200,
        1340
      ],
      "parameters": {
        "keep": "lastItems"
      },
      "typeVersion": 1
    },
    {
      "id": "37e0199e-18db-4647-a655-8d8890d19071",
      "name": "Sticky Note - Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2120,
        800
      ],
      "parameters": {
        "color": 3,
        "width": 560,
        "height": 200,
        "content": "# Setup Instructions\n\n1. Configure your Jura-compatible device to send BLE coffee data.\n2. Set up Google Sheet and replace placeholder values:\n   - `{{SHEET_ID}}`, `{{SHEET_NAME}}`, and credentials\n3. Use `{{WEBHOOK_POST_PATH}}` and `{{WEBHOOK_GET_PATH}}` for endpoints.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "dd104f9e-332a-4c19-8626-3ce710df703c",
      "name": "Sticky Note - Webhooks",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1960,
        1720
      ],
      "parameters": {
        "color": 6,
        "width": 420,
        "height": 80,
        "content": "🧩 POST webhook: receives data from Jura ESP\n🧩 GET webhook: provides last rows for live views"
      },
      "typeVersion": 1
    },
    {
      "id": "cd8a9aa7-576c-4e8f-83ab-eb810dc0bfbb",
      "name": "Sticky Note - Input Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        740
      ],
      "parameters": {
        "color": 7,
        "width": 1180,
        "height": 300,
        "content": "# ☕ Coffee Input Workflow\n\n- POST Webhook receives `total_coffees` from BLE device (ESP32/ESP8266)\n- Adds current `date` and `time` via the `Date & Time` node\n- Maps fields to prepare a row: \n `date` → split from currentDate \n `time` → split from currentDate \n `coffee counter` → value from incoming JSON (`total_coffees`)\n- Appends the row to Google Sheets\n\n💡 Make sure your Google Sheet includes columns: \n`date`, `time`, `coffee counter`\n\n🧪 You can test this endpoint with Postman: \nPOST `/{{WEBHOOK_POST_PATH}}` \nBody:\n```json\n{\n  \"total_coffees\": 123\n}\n```"
      },
      "typeVersion": 1
    },
    {
      "id": "cefd8aba-3af9-4942-a630-4218f2e1d8db",
      "name": "Sticky Note - Output Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1880,
        1540
      ],
      "parameters": {
        "color": 6,
        "width": 580,
        "height": 280,
        "content": "# 📊 Dashboard Data Endpoint\n\n- GET Webhook returns rows from Google Sheet\n- You can use it in a web dashboard to display real-time stats\n- Limits output to latest entries only\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1e2347d3-ac50-4a21-ba7c-3d5720ed5498",
      "name": "Webhook2",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1840,
        1340
      ],
      "webhookId": "d52f703f-5f9c-4a2d-b757-d62ac5aee42a",
      "parameters": {
        "path": "{{WEBHOOK_GET_PATH}}",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ba9c1c00-cf3b-4c95-add3-353468ff857c",
  "connections": {}
}

相关工作流