Lesson 4 of 8
Powerapps Integration
Step 1: Prepare SpreadsheetWeb API Upload your Excel file to SpreadsheetWeb Hub to generate the API. Note the following: API Endpoint URL Workspace ID…
2 min readStep 1: Prepare SpreadsheetWeb API
- Upload your Excel file to SpreadsheetWeb Hub to generate the API.
- Note the following:
- API Endpoint URL
- Workspace ID
- Application ID
Step 2: Set Up Azure API Management
2.1 Create a New API
-
Go to Azure API Management → APIs → HTTP.
-
Set the API URL to:
-
Configure optional authentication if needed.
2.2 Configure API Operation
- Under Operations, create a new operation:
- Display Name: Calculate Shipping Cost
- Method:
POST - URL:
/calculations/calculatesinglesimple
- Add Headers:
Content-Type: application/json
2.3 Define Request Body
In the Request section, use the following body:
{ "request": { "workspaceId": "your-workspace-id", "applicationId": "your-application-id", "inputs": { "originZIP": "10001", "destinationZIP": "90001", "weight": "1" }, "outputs": ["cost"] } }
2.4 Define Response Body
In the Response section, add a sample response:
{ "response": { "outputs": { "cost": "8.5785" } } }
2.5 Test the API
Save and test the configuration to verify the response.
Step 3: Create a Custom Connector in Power Apps
- Open Power Apps → Data → Custom Connectors → New Connector.
- Enter the API Endpoint URL and add the Subscription Key (from Azure).
- Map the request and response fields.
Step 4: Build the Power Apps UI
4.1 Create Input Fields
- Add three Text Input fields:
originZIPdestinationZIPweight
- Add a Button labeled Submit to trigger the API call.
- Add a Label for displaying the API result.
Step 5: Set Up Power Automate Flow
5.1 Create a Flow
- In Power Automate, create a new flow.
- Add three input fields for
originZIP,destinationZIP, andweight.
5.2 Call the API
Add a Custom Action to call the API with the following JSON body:
{ "request": { "workspaceId": "your-workspace-id", "applicationId": "your-application-id", "inputs": { "originZIP": "@{triggerBody()['text']}", "destinationZIP": "@{triggerBody()['text_1']}", "weight": "@{triggerBody()['text_2']}" }, "outputs": ["cost"] } }
5.3 Return the Response
{ "cost": "@{body('Custom_API_Call')['response']['outputs']['cost']}" }
Step 6: Connect Power Automate to Power Apps
Link the Submit button in Power Apps to trigger the flow:
Set(apiResponse; TestAPI.Run(originZIP.Text, destinationZIP.Text, weight.Text))
Display the result in the Label:
Text(apiResponse.cost)
Step 7: Test and Finalize
- Input test values for originZIP, destinationZIP, and weight.
- Click Submit and verify the calculated result appears in the label.