Actions19
- Company Actions
- Appointment Actions
- Item Type Actions
- Service Object Actions
- Service Request Actions
- Document Actions
- User Actions
- Report Actions
Overview
This node integrates with a field service management system to generate reports based on predefined report definitions. Specifically, the "Generate Report" operation under the "Report" resource allows users to create a report document for a given service request by specifying a report definition code. The node sends a request to generate the report, retrieves the generated report file, and outputs it as binary data.
Common scenarios where this node is beneficial include:
- Automatically generating service reports or invoices after completing a service request.
- Creating PDF or document summaries of work done for customers.
- Integrating report generation into automated workflows for documentation or billing purposes.
Example: After a technician completes a service request, this node can be used to generate a PDF report summarizing the work performed, which can then be emailed to the customer or stored in a document management system.
Properties
| Name | Meaning |
|---|---|
| Search Service Request | Selects the service request to generate the report for. Can be chosen from a list or by ID. |
| Report Definition Code | The code identifying the specific report definition/template to use for generating the report. |
Output
The node outputs an array of items, each containing:
json: The original input JSON data for the item.binary.file: The generated report file as binary data, including its filename and MIME type.
This binary output typically represents the report document (e.g., PDF) generated by the service. It can be used downstream in the workflow for saving to disk, sending via email, or further processing.
Dependencies
- Requires an API key credential for authenticating requests to the field service management system's API.
- The node makes HTTP POST requests to the
/mfr/Reportendpoint to generate reports. - It then performs HTTP GET requests to download the generated report file.
- No additional environment variables are required beyond the configured API authentication.
Troubleshooting
Common issues:
- Invalid or missing service request ID: Ensure the selected service request exists and is accessible.
- Incorrect report definition code: Verify that the report definition code matches one available in the system.
- Authentication errors: Confirm that the API key credential is valid and has sufficient permissions.
- Network or API downtime: Check connectivity and service status.
Error messages:
- Errors returned from the API will typically indicate invalid parameters or authorization failures.
- If the report URI is not returned or the download fails, verify that the report generation succeeded and the URI is correct.
Resolution tips:
- Double-check input parameters for correctness.
- Test API credentials separately to confirm access.
- Enable "Continue On Fail" in the node settings to handle errors gracefully during batch operations.
Links and References
- Field Service Management API documentation (refer to your service provider’s official docs for details on report generation endpoints).
- n8n documentation on handling binary data in nodes: https://docs.n8n.io/nodes/creating-nodes/binary-data/
