[Weekly Report] Test Suite¶
This workflow provides a testing interface for weekly report generation functionality. It accepts test requests via webhook, processes them through a handler workflow, and returns structured responses for validation and debugging purposes.
Purpose¶
No business context provided yet — add a context.md to enrich this documentation.
How It Works¶
- Receive Test Request: A webhook endpoint accepts POST requests containing test parameters including query text, test ID, and test name
- Map Input Data: Extracts and structures the incoming test parameters from the request body
- Execute Handler: Calls an external workflow (ID: SlShcSkVHkkJ54wK) to process the test query and generate a summary
- Prepare Response: Formats the results into a structured response including test metadata and summary information
- Return Results: Sends the formatted response back to the caller with test results and summary data
Workflow Diagram¶
graph TD
A[Test Webhook] --> B[Map Input]
B --> C[Call Handler]
C --> D[Prepare Response]
D --> E[Respond to Webhook]
Trigger¶
Webhook Trigger: POST endpoint at /test-weekly-report-prod
- Webhook ID: test-wr-prod
- Expects JSON payload with query, testId, and testName fields
Nodes Used¶
| Node Type | Node Name | Purpose |
|---|---|---|
| Webhook | Test Webhook | Receives incoming test requests via HTTP POST |
| Set | Map Input | Extracts and maps query, testId, and testName from request body |
| Execute Workflow | Call Handler | Invokes external workflow (SlShcSkVHkkJ54wK) for processing |
| Code | Prepare Response | Formats response with test metadata and summary results |
| Respond to Webhook | Respond to Webhook | Returns structured JSON response to caller |
External Services & Credentials Required¶
- Internal Workflow Dependency: Requires access to workflow ID
SlShcSkVHkkJ54wK - No external API credentials required
Environment Variables¶
No environment variables are explicitly used in this workflow.
Data Flow¶
Input (Webhook Body):
1 2 3 4 5 | |
Output (Response):
1 2 3 4 5 6 7 | |
Error Handling¶
- Handler Workflow Errors: The "Call Handler" node is configured with
onError: continueRegularOutput, allowing the workflow to continue even if the handler workflow fails - Fallback Response: If the handler workflow fails, the response will include error information in the summary field
- Default Values: Missing input fields default to safe values (empty strings, 0 for numbers, "Unknown" for test names)
Known Limitations¶
- Workflow is currently inactive (
active: false) - Depends on external workflow availability (ID: SlShcSkVHkkJ54wK)
- No input validation on webhook payload structure
- Error details from handler workflow may be limited
Related Workflows¶
- Handler Workflow (ID: SlShcSkVHkkJ54wK) - The main processing workflow that this test suite validates
Setup Instructions¶
- Import Workflow: Import the JSON configuration into your n8n instance
- Verify Handler Workflow: Ensure workflow
SlShcSkVHkkJ54wKexists and is accessible - Activate Webhook: Enable the workflow to activate the webhook endpoint
- Test Connection: Send a POST request to
/test-weekly-report-prodwith sample data:1 2 3 4 5
{ "query": "test query", "testId": 1, "testName": "Sample Test" } - Verify Response: Confirm you receive a structured JSON response with test results
- Configure Access: Ensure the workflow has appropriate permissions to execute the handler workflow