Actions39
- Admin Actions
- Consumption Billing Analyzer Actions
- Customer Actions
- Event Actions
- Report - Cyber Resilience Actions
- Report - Endpoint Actions
- Report - Hybrid Workloads Actions
- Report - Usage Actions
- Service Plan Actions
- Task Actions
- Tenant Actions
Overview
The "Consumption Billing Analyzer" node operation "Analyze Consumption for Billing" is designed to analyze consumption data over a specified billing period. It helps users calculate billable usage metrics based on daily consumption data, supporting both specific date ranges and relative date ranges (like last month, current quarter, year-to-date, etc.). This node is useful for MSPs or organizations that need to generate billing reports or usage summaries for customers based on their consumption patterns.
Typical use cases include:
- Generating monthly or quarterly billing reports for customers.
- Calculating average or peak usage values to determine charges.
- Filtering analysis by specific customers.
- Converting raw byte consumption data into more readable units like GB or TB.
- Applying rounding rules to calculated values for consistent billing presentation.
For example, an MSP could use this node to analyze the previous month's data for selected customers, calculate the highest daily usage (high water mark), convert byte values to terabytes, and round results up to one decimal place before generating invoices.
Properties
| Name | Meaning |
|---|---|
| Date Selection Method | Choose whether to specify exact start and end dates ("Specific Dates") or select from predefined relative date ranges such as "Previous Month", "Last 30 Days", "Year To Date", etc. |
| Start Date | The start date of the billing period (required if using Specific Dates). |
| End Date | The end date of the billing period (required if using Specific Dates). |
| Date Range | Select a predefined relative date range for the billing period when using Relative Date Range method. Options include: Current Month, Previous Month, Current Quarter, Previous Quarter, Current Year, Previous Year, Last 30/60/90 Days, Last 6/12 Months, Year To Date. |
| Filter by Customers | Boolean flag to indicate whether to filter the analysis by specific customer IDs. |
| Customer IDs | List of customer IDs to include in the analysis (required if filtering by customers). |
| Calculation Method | Method to calculate billable values from daily consumption data: - Average (Total Usage ÷ Period Length) - High Water Mark (Highest Daily Value) |
| Apply Rounding | Whether to apply rounding to the calculated values. |
| Rounding Direction | Direction for rounding calculated values: Round Up or Round Down. |
| Decimal Places | Number of decimal places to round to: 0 (whole numbers), 1 (tenths), 2 (hundredths), or 3 (thousandths). |
| Filter Out Zero Usage | Whether to exclude items where both usage amount and compute units consumed are zero. |
| Convert Byte Values | Whether to convert raw byte values into larger units for readability. |
| Target Unit | Unit to convert byte values to: Gigabytes (GB) or Terabytes (TB). |
Output
The node outputs JSON data representing the analyzed consumption and billing information for the specified period and customers. The output typically includes:
- Usage metrics calculated according to the selected calculation method (average or high water mark).
- Consumption values possibly converted to the selected unit (GB or TB).
- Rounded numeric values based on user settings.
- Filtered results excluding zero usage entries if enabled.
- Metadata about the billing period and customers included.
If binary data were involved (e.g., reports or files), it would be summarized accordingly, but this node focuses on JSON structured consumption data.
Dependencies
- Requires an active connection to the Druva MSP API with appropriate API authentication credentials configured in n8n.
- Uses internal helper functions to fetch customer lists dynamically for UI dropdowns.
- Relies on the Druva MSP API endpoints to retrieve consumption data and perform calculations.
Troubleshooting
Common Issues:
- Incorrect or missing API credentials will cause authentication failures.
- Selecting specific dates without providing valid start and end dates will result in errors.
- Filtering by customers without selecting any customer IDs will cause validation errors.
- Using unsupported date ranges or invalid date formats may lead to request failures.
Error Messages:
"The resource 'consumptionBillingAnalyzer' is not implemented!"indicates a misconfiguration or unsupported resource selection.- API request errors often include messages about invalid parameters or authentication issues; verify credentials and input parameters.
Resolutions:
- Ensure API credentials are correctly set up in n8n.
- Provide all required fields depending on the date selection method.
- When filtering by customers, select at least one valid customer ID.
- Use supported date formats and options as per the node's property definitions.
Links and References
- Druva MSP API Documentation (general reference for API endpoints)
- n8n Documentation on Creating Custom Nodes
- Best practices for date handling and rounding in billing systems (external resources may vary)