AutomationFlowsAI & RAG › Automating Sap B1 Journal Entries Using Json, Google Sheets, and Gpt-4o

Automating Sap B1 Journal Entries Using Json, Google Sheets, and Gpt-4o

ByRaquel Giugliano @raquelgiugliano on n8n.io

This workflow automates the creation of Journal Entries in SAP Business One (SAP B1). Depending on the source of the input data, it dynamically transforms and sends accounting records in the appropriate format using the Service Layer API.

Webhook trigger★★★★☆ complexityAI-powered25 nodesHTTP RequestGoogle SheetsOpenAI
AI & RAG Trigger: Webhook Nodes: 25 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Google Sheets → HTTP Request 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": "6f68qrMxAD14jS4i",
  "name": "My workflow 4",
  "tags": [
    {
      "id": "GvklsLWXMBUjgBiK",
      "name": "SAPB1-2=Finanzas",
      "createdAt": "2025-07-03T12:55:09.224Z",
      "updatedAt": "2025-07-03T12:55:09.224Z"
    }
  ],
  "nodes": [
    {
      "id": "6f3055d0-2612-49e5-8b70-ade568596658",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1820,
        720
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a85066bb-91fa-4e1f-bb09-d7164165b2f6",
      "name": "SAP Login",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1580,
        720
      ],
      "parameters": {},
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "a53020c0-c167-4cf1-9597-95b07d7b87cd",
      "name": "Route by Source",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1300,
        720
      ],
      "parameters": {},
      "typeVersion": 3.2,
      "alwaysOutputData": false
    },
    {
      "id": "08c6fdef-b4e9-4f82-8080-7f8d06ba4336",
      "name": "Map JSON Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -720,
        480
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "ff7679dd-811c-4b83-9e35-f61c4a6ac2b2",
      "name": "Post Journal (JSON)",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        -480,
        480
      ],
      "parameters": {},
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "838b28c5-1ccb-40bc-9e07-88569e11287f",
      "name": "Log Success (JSON)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -240,
        320
      ],
      "parameters": {},
      "typeVersion": 4.6,
      "alwaysOutputData": false
    },
    {
      "id": "1900cd98-9b64-41f7-af03-68018376e6da",
      "name": "Log Error (JSON)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -240,
        540
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "a9d367d5-cef4-40d8-8d13-dc0da04e424a",
      "name": "LLM Transform (Manual)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -780,
        1500
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "41f1f35e-a4b2-4510-8910-8b1742df417f",
      "name": "Post Journal (Manual)",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        -380,
        1500
      ],
      "parameters": {},
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "2c445e36-67b3-44c1-912d-1225ab4d5077",
      "name": "Log Success (Manual)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -100,
        1360
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "42d94e4b-0a1d-482a-88bb-5397129dd29a",
      "name": "Log Error (Manual)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -100,
        1580
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "fab58a6e-27c7-4021-9183-065d40f25e7d",
      "name": "Set SAP Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -740,
        980
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "980fa23f-1850-4594-9e92-6aea0a6e62bb",
      "name": "Load Sheet Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -480,
        1100
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "d83ac837-292a-4a5c-b537-e89d3671c23c",
      "name": "Shape Sheet Lines",
      "type": "n8n-nodes-base.set",
      "position": [
        -220,
        1100
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "532419b3-33fe-4b6d-8ec0-6db03126faa1",
      "name": "Parse Sheet JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        20,
        1100
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "aa35f48c-7aee-4b57-85bc-1acaaace7324",
      "name": "LLM Transform (Sheet)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        240,
        1100
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "0fda167e-545f-4b3d-ae86-366ca46f83c1",
      "name": "Build Journal Body",
      "type": "n8n-nodes-base.set",
      "position": [
        580,
        1100
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "2fbf56de-2d73-46bb-851a-174ff3eedb73",
      "name": "Merge Header & Lines",
      "type": "n8n-nodes-base.merge",
      "position": [
        780,
        960
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "2ea523f5-16b4-4fa7-96e1-d3f0fd415d8c",
      "name": "Post Journal (Sheet)",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        980,
        960
      ],
      "parameters": {},
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "470caa25-52dd-424e-a000-d07ebabcb6e5",
      "name": "Log Success (Sheet)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1220,
        800
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "a17b7dd8-747e-4b5b-9f2f-dadd607e8b3f",
      "name": "Log Error (Sheet)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1220,
        1020
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "12d5eb01-d326-4b35-b922-5bb148b32fc4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1880,
        560
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "a621ad9e-20e1-454d-acb9-1ce7376da82c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2230580e-5800-4dc0-96f4-276152c330f3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        760
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "94b1309f-5a8f-479e-a82b-6dea66f4cf17",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        1320
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a7b337d9-989c-45b5-bb73-457c480ce81c",
  "connections": {
    "SAP Login": {
      "main": [
        [
          {
            "node": "Route by Source",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set SAP Data": {
      "main": [
        [
          {
            "node": "Load Sheet Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Header & Lines",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Load Sheet Data": {
      "main": [
        [
          {
            "node": "Shape Sheet Lines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map JSON Fields": {
      "main": [
        [
          {
            "node": "Post Journal (JSON)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Source": {
      "main": [
        [
          {
            "node": "Map JSON Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set SAP Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "LLM Transform (Manual)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "SAP Login",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Sheet JSON": {
      "main": [
        [
          {
            "node": "LLM Transform (Sheet)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shape Sheet Lines": {
      "main": [
        [
          {
            "node": "Parse Sheet JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Journal Body": {
      "main": [
        [
          {
            "node": "Merge Header & Lines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Journal (JSON)": {
      "main": [
        [
          {
            "node": "Log Success (JSON)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Error (JSON)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Header & Lines": {
      "main": [
        [
          {
            "node": "Post Journal (Sheet)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Journal (Sheet)": {
      "main": [
        [
          {
            "node": "Log Success (Sheet)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Error (Sheet)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM Transform (Sheet)": {
      "main": [
        [
          {
            "node": "Build Journal Body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Journal (Manual)": {
      "main": [
        [
          {
            "node": "Log Success (Manual)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Error (Manual)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM Transform (Manual)": {
      "main": [
        [
          {
            "node": "Post Journal (Manual)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

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

About this workflow

This workflow automates the creation of Journal Entries in SAP Business One (SAP B1). Depending on the source of the input data, it dynamically transforms and sends accounting records in the appropriate format using the Service Layer API.

Source: https://n8n.io/workflows/5378/ — 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

Instantly map all internal URLs, perform AI-powered (ChatGPT) analysis, and deliver results in HTML via webhook, Google Sheets, or email. All from your own n8n instance!

OpenAI, HTTP Request, XML +3
AI & RAG

Watch on Youtube▶️

HTTP Request, Email Send, Google Sheets +3
AI & RAG

This workflow is perfect for marketing agencies, SEO consultants, and growth specialists who need to scale personalized outreach without spending hours on manual research.

Google Sheets, HTTP Request, OpenAI
AI & RAG

How it works: Send notes from Obsidian via Webhook to start the audio conversion OpenAI converts your text to natural-sounding audio and generates episode descriptions Audio files are stored in Cloudi

OpenAI, HTTP Request, Google Sheets
AI & RAG

This workflow automates the initial screening process for new job applications, freeing up your recruitment team to focus on qualified candidates. It receives applications from a webhook, uses OpenAI

HTTP Request, OpenAI, Google Sheets +2