Skip to content

[Call Center] getSummary Test Suite

This workflow provides a testing interface for the getSummary functionality in a call center system. It accepts test queries via webhook, executes the main getSummary workflow, and returns structured test results including the generated summary and metadata.

Purpose

No business context provided yet — add a context.md to enrich this documentation.

How It Works

  1. Receive Test Request: A webhook receives POST requests containing test data including a query, test ID, and test name
  2. Extract Parameters: The workflow extracts the query text, test identifier, and test name from the incoming request
  3. Execute getSummary: Calls the main getSummary workflow (ID: lSfgvJsk9DCCp8sn) with the test query
  4. Format Results: Processes the response from getSummary and structures it with test metadata
  5. Return Response: Sends back a JSON response containing the test results, summary, and summary length

Workflow Diagram

graph TD
    A[Test Webhook] --> B[Map Input]
    B --> C[Call getSummary]
    C --> D[Prepare Response]
    D --> E[Respond to Webhook]

Trigger

Webhook Trigger: POST requests to the endpoint /test-get-summary-prod

Expected payload:

1
2
3
4
5
{
  "query": "Text to summarize",
  "testId": 123,
  "testName": "Test case description"
}

Nodes Used

Node Type Node Name Purpose
Webhook Test Webhook Receives POST requests with test data
Set Map Input Extracts query, testId, and testName from request body
Execute Workflow Call getSummary Invokes the main getSummary workflow
Code Prepare Response Formats the response with test metadata and summary
Respond to Webhook Respond to Webhook Returns structured test results

External Services & Credentials Required

  • getSummary Workflow: Requires access to workflow ID lSfgvJsk9DCCp8sn
  • No external API credentials required for this test suite itself

Environment Variables

No environment variables are directly used in this workflow. Configuration depends on the called getSummary workflow.

Data Flow

Input:

1
2
3
4
5
{
  "query": "string - Text to be summarized",
  "testId": "number - Unique test identifier", 
  "testName": "string - Descriptive test name"
}

Output:

1
2
3
4
5
6
7
{
  "testId": "number - Original test ID",
  "testName": "string - Original test name", 
  "query": "string - Original query text",
  "summary": "string - Generated summary or error message",
  "summaryLength": "number - Character count of summary"
}

Error Handling

  • The Execute Workflow node is configured with onError: continueRegularOutput to handle failures gracefully
  • If the getSummary workflow fails, the error message is captured and returned in the summary field
  • Default fallback values are provided for missing input parameters

Known Limitations

  • Depends on the availability and functionality of the getSummary workflow (ID: lSfgvJsk9DCCp8sn)
  • No input validation on the webhook payload
  • Error details from the called workflow may be limited
  • getSummary Workflow (ID: lSfgvJsk9DCCp8sn) - The main workflow being tested

Setup Instructions

  1. Import Workflow: Import this workflow JSON into your n8n instance

  2. Verify Dependencies: Ensure the getSummary workflow (ID: lSfgvJsk9DCCp8sn) exists and is accessible

  3. Activate Webhook:

    • Activate the workflow to enable the webhook endpoint
    • Note the generated webhook URL for testing
  4. Test the Endpoint:

    1
    2
    3
    4
    5
    6
    7
    curl -X POST [your-webhook-url] \
      -H "Content-Type: application/json" \
      -d '{
        "query": "Sample text to summarize",
        "testId": 1,
        "testName": "Basic functionality test"
      }'
    

  5. Configure Permissions: Ensure the workflow has permission to execute the getSummary workflow (caller policy is set to "workflowsFromSameOwner")