Block 1 - Webhook Trigger
- Type / Role
- n8n-nodes-base.webhook - webhook
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
HOW IT WORKS: 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...
n8n-nodes-base.webhook, n8n-nodes-base.httprequest, n8n-nodes-base.switch, n8n-nodes-base.set, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.code, n8n-nodes-base.merge
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Raquel Giugliano.
Original n8n.io sourceThis 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.
It supports three input types:
Each transaction is logged to Google Sheets for traceability.
A Webhook node waits for a POST request containing accounting data and metadata:
The origen field determines the data source (JSON, GoogleSheets, or Manual)
The sap_url, username, password, and companydb are used to connect to SAP B1
Payload can be a JSON list or tabular data (e.g., from Google Sheets)
Credentials are securely injected from the request body. A login request is sent to SAP B1's Service Layer to retrieve a valid session cookie (B1SESSION).
Depending on the value of origen, one of the following branches is activated:
JSON: Sends the JSON payload directly to SAP after restructuring
GoogleSheets: Loads rows, builds JSON, and merges context
Manual: Transforms data via OpenAI LLM prompt and generates SAP-compatible format
In Manual and GoogleSheets flows, the workflow uses an OpenAI node to:
Parse line entries and convert them to JournalEntryLines[]
Format the final JSON structure required by SAP
LLM prompts are carefully crafted to return only clean JSON β no code blocks, comments, or explanations.
Data is sent to {{SAP_URL}}/JournalEntries using the Service Layer's POST method with the B1SESSION cookie attached. The body includes all JournalEntryLines.
Each result (success or failure) is logged into a centralized Google Sheets log document:
β Success: Includes HTTP status, source URL, and JSON payload
β Failure: Logs the error code and message for review and traceability
Google Sheets OAuth2 API (to log all responses and fetch data)
OpenAI API Key (used with the LangChain OpenAI node)
SAP Service Layer login data is passed securely via body parameters.
SAP_USER, SAP_PASSWORD, SAP_COMPANY_DB
SAP_URL
π Sheet 1: For source entries (e.g., for GoogleSheets origin)
π§Ύ Sheet 2: For logging execution results
Make sure the logging spreadsheet contains these columns:
workflow, method, url, json, status_code, message
π§ Uses OpenAI GPT-4o for natural language transformation of accounting rows
π§© Modular logic with error-handling for all branches
π Can be reused across multiple accounting integrations by changing the data source
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.
| Workflow | Automating SAP B1 journal entries using JSON, Google Sheets, and GPT-4o |
|---|---|
| Complexity | advanced |
| Nodes | 25 |
| Categories | Document Extraction, AI Summarization |
| Author | Raquel Giugliano |
| Published | 26 Jun 2025 |
Use the JSON export at /data/workflows/5378/5378.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
HOW IT WORKS: 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...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.