[BENCHMARK] Credential HTTP Request¶
This workflow serves as a benchmarking tool that tests HTTP request performance with authenticated API calls. It makes three simultaneous requests to mock API endpoints (user events, repository events, and organization events), then aggregates the responses to return status codes for performance analysis.
Purpose¶
No business context provided yet — add a context.md to enrich this documentation.
How It Works¶
- Webhook Trigger: The workflow starts when a POST request is made to the webhook endpoint
- Parallel API Calls: Three HTTP requests are made simultaneously to different mock API endpoints:
- User public received events
- Repository events
- Organization events
- Response Aggregation: All three responses are merged together
- Data Processing: Status codes are extracted from each response
- Response Return: The processed data is sent back to the original webhook caller
Workflow Diagram¶
graph TD
A[Webhook] --> B[Mock public received events]
A --> C[Mock repository events]
A --> D[Mock organization events]
B --> E[Merge]
C --> E
D --> E
E --> F[Select statusCode]
F --> G[Respond to Webhook]
Trigger¶
- Type: Webhook (POST)
- Path:
benchmark-credential-http-node - Activation: Manual POST requests to the webhook URL
Nodes Used¶
| Node Type | Node Name | Purpose |
|---|---|---|
| Webhook | Webhook | Receives incoming POST requests to start the workflow |
| HTTP Request | Mock public received events | Fetches user public events from mock API |
| HTTP Request | Mock repository events | Fetches repository events from mock API |
| HTTP Request | Mock organization events | Fetches organization events from mock API |
| Merge | Merge | Combines responses from all three HTTP requests |
| Set | Select statusCode | Extracts status codes from the merged responses |
| Respond to Webhook | Respond to Webhook | Returns processed data to the webhook caller |
External Services & Credentials Required¶
Mock API Service¶
- Base URL:
http://mockapi:8080 - Endpoints:
/users/{username}/received_events/public/repos/{owner}/{repo}/events/orgs/{org}/events
Credentials¶
- HTTP Bearer Auth:
[BENCHMARK] Dummy HTTP credential- Used for authenticating all API requests
- Credential ID:
llLQG3HB5SHW6Tag
Environment Variables¶
No environment variables are explicitly configured in this workflow. All endpoints use hardcoded mock API URLs.
Data Flow¶
Input¶
- Webhook Request: Any POST request to the webhook endpoint
- Headers: Standard HTTP headers (host, user-agent, accept)
- Body: Empty object
{}
Output¶
- Status Codes: Array of status codes from the three API calls
- Response Format: JSON containing extracted status codes from each endpoint
Processing¶
- Incoming webhook data triggers three parallel HTTP requests
- Each request returns a full HTTP response object
- Responses are merged into a single data stream
- Status codes are extracted using the expression
{{ $json.statusCode }} - Final output contains the status codes for benchmarking analysis
Error Handling¶
This workflow does not implement explicit error handling. If any of the HTTP requests fail: - The workflow may continue with partial data - Failed requests could cause the merge operation to have missing inputs - No retry logic or fallback mechanisms are configured
Known Limitations¶
- No error handling for failed API requests
- Hardcoded mock API endpoints limit flexibility
- No timeout configuration for HTTP requests
- No validation of response data before processing
Related Workflows¶
No related workflows specified in the current context.
Setup Instructions¶
1. Import the Workflow¶
- Copy the workflow JSON
- In n8n, go to Workflows → Import from JSON
- Paste the JSON and save
2. Configure Credentials¶
- Create an HTTP Bearer Auth credential named
[BENCHMARK] Dummy HTTP credential - Set the bearer token for your mock API service
- Assign the credential ID
llLQG3HB5SHW6Tagor update the workflow nodes
3. Set Up Mock API Service¶
- Ensure the mock API service is running at
http://mockapi:8080 - Verify the following endpoints are available:
/users/clair.bahringer/received_events/public/repos/udke6pujoywnagxkcvab2riw23khzn2tibo2vincws32qexb50ey7h97d42vnzyol0rxypgsg4pomsf7sgnmdaihstljw8edcijrwmy7mfi76yif19c4/47i31dh737el215j62ts2f2782nw3ss26rul3s8jw13u3vu0xm349a5hyay5asmwnlnf7nx8p9h4g62so6s1cis7xv9puj5j98t4m980sbe2455fn1obccjl/events/orgs/g02pp066qoyithcjevhd6m1wfii3c4x51k39n9apybljhx69/events
4. Test the Workflow¶
- Activate the workflow
- Make a POST request to the webhook URL:
http://your-n8n-instance/webhook/benchmark-credential-http-node - Verify that status codes are returned in the response
5. Customize for Your Environment¶
- Update the mock API URLs to point to your actual test endpoints
- Modify the credential configuration for your authentication method
- Adjust the data extraction logic in the "Select statusCode" node as needed