Lesson 7 of 8
n8n Integration
Learn how to integrate your Excel SpreadsheetWeb applications with n8n platform, improve your workflow, and boost your business.
2 min readStep 1: Set Up Your n8n Project
- Log in to your n8n account.
- Click New Workflow to create a blank workflow.
- Give the workflow a descriptive name.
Step 2: Define Input Variables
- Add an Edit Fields node:
- This node creates input variables for the API call.
- Define input fields as text variables:
- originZIP
- destinationZIP
- weight
- Ensure inputs are stored in text format, as required by the API.
Step 3: Import API Request via cURL
-
Visit the SpreadsheetWeb API Documentation.
-
Navigate to the
calculatesinglesimpleendpoint:- Use the Try it out feature to test with sample inputs.
-
Copy the cURL request provided after execution.
Example cURL:curl -X 'POST' \ 'https://api.spreadsheetweb.com/calculations/calculatesinglesimple' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "request": { "workspaceId": "your-workspace-id", "applicationId": "your-application-id", "inputs": { "originZIP": "{{ $json.originZIP }}", "destinationZIP": "{{ $json.destinationZIP }}", "weight": "{{ $json.weight }}" }, "outputs": ["cost"] } }'
-
Add an HTTP Request node to n8n:
- Click Import cURL and paste the cURL command.
Step 4: Configure the HTTP Request Node
-
Verify Parameters: Ensure the following details are accurate:
-
API Endpoint:
https://api.spreadsheetweb.com/calculations/calculatesinglesimple
-
Headers:
Content-Type: application/json
-
Body: Map the request body to dynamic input fields:
{ "request": { "workspaceId": "your-workspace-id", "applicationId": "your-application-id", "inputs": { "originZIP": "{{ $json.originZIP }}", "destinationZIP": "{{ $json.destinationZIP }}", "weight": "{{ $json.weight }}" }, "outputs": ["cost"] } }
Replace
workspaceIdandapplicationIdwith your SpreadsheetWeb credentials. -
-
Map variables to the request body:
- Drag and drop originZIP, destinationZIP, and weight from the Edit Fields node to the JSON body.
Step 5: Handle API Response
- Add a second Edit Fields node to handle the API response.
- Extract and store the API output:
-
Define a new field: calculatedCost.
-
Map it to the key in the API response:
$json.response.outputs.cost
-
Step 6: Test the Workflow
- Run the workflow with sample inputs:
- originZIP: “10001”
- destinationZIP: “90001”
- weight: “1”
- Verify the output:
- The
calculatedCostfield should display the API result (e.g., “8.5785”).
- The