Actions14
- Client Actions
- Email Actions
- Job Actions
- Search Actions
- SMS Actions
Overview
This node integrates with the ServiceM8 platform to perform various operations on different resources. Specifically, for the Search resource and Search operation, it allows users to perform object-specific searches within ServiceM8 data. This is useful when you want to query and retrieve records such as jobs, companies, assets, or other object types based on a search string.
Common scenarios include:
- Searching for jobs matching certain keywords.
- Finding companies or assets by name or other attributes.
- Limiting the number of results returned to optimize performance.
Practical example:
- A user wants to find all jobs related to "plumbing" and limit the results to 20 entries. They can configure this node to search the "job" object type with the query "plumbing" and set the limit to 20.
Properties
| Name | Meaning |
|---|---|
| Fields | Collection of search options: |
| - Search Query (q): The text string to search for in the selected object type. | |
| - Object Type (objectType): The category of objects to search within. Options include: | |
| Asset, Attachment, Company, Form Response, Job, Knowledge Article, Material, Material Bundle. | |
| - Limit: Maximum number of results to return (minimum 1). |
Output
The node outputs an array of JSON objects representing the search results from ServiceM8. Each item corresponds to a record matching the search criteria within the specified object type.
- The structure of each JSON object depends on the object type searched (e.g., job, company).
- The output does not include binary data; it is purely JSON-based.
Dependencies
- Requires an API key credential for authenticating with the ServiceM8 API.
- The node makes HTTP requests to ServiceM8 endpoints to perform searches.
- No additional external dependencies beyond the configured API authentication.
Troubleshooting
- No search query was provided: If the "Search Query" field is empty, the node will throw an error indicating that a search query must be supplied. Ensure the "q" parameter is filled.
- API request failures: Errors may occur if the API key is invalid, expired, or lacks permissions. Verify the API credentials and their scopes.
- Limit value issues: Setting the limit below 1 may cause errors. Use a positive integer for the limit.
- Empty results: If no matches are found, the output will be an empty array. Confirm the search query and object type are correct.
Links and References
- ServiceM8 API Documentation
- ServiceM8 Object Types Reference
- n8n documentation on creating custom nodes