Halo PSA icon

Halo PSA

Consume Halo PSA API

Actions795

Power Shell Script → Get One Power Shell Script

AI-generated

Overview

This node integrates with the Halo PSA API to perform various operations on different resources. Specifically, for the "Power Shell Script" resource and the "Get One Power Shell Script" operation, it retrieves a single Power Shell script by its unique identifier. This is useful in scenarios where you need to fetch detailed information about a specific Power Shell script stored in the Halo PSA system, such as for auditing, automation, or further processing within an n8n workflow.

Practical examples include:

  • Automatically retrieving a Power Shell script before executing it in an automation pipeline.
  • Fetching script details to display or log them in a dashboard.
  • Integrating with other systems that require script metadata from Halo PSA.

Properties

Name Meaning
Id The unique numeric identifier of the Power Shell script to retrieve.
Includedetails Optional flag/query parameter to specify whether to include additional details in the response.

Output

The node outputs JSON data representing the retrieved Power Shell script. The structure corresponds to the API response from Halo PSA for a single Power Shell script entity. It typically includes fields such as the script's ID, name, content, metadata, and possibly related details if requested via the Includedetails parameter.

No binary data output is produced by this operation.

Example output (simplified):

{
  "id": 123,
  "name": "My PowerShell Script",
  "content": "Write-Host 'Hello World'",
  "description": "Sample script",
  "createdDate": "2023-01-01T12:00:00Z",
  "modifiedDate": "2023-02-01T12:00:00Z"
}

Dependencies

  • Requires valid credentials for the Halo PSA API, including base URL, tenant identifier, client ID, and client secret.
  • The node uses these credentials to authenticate requests to the Halo PSA REST API.
  • No additional external dependencies beyond the configured API credentials are needed.

Troubleshooting

  • Missing or invalid credentials: The node will throw an error if the required API credentials are not provided or invalid. Ensure that the API key/token and other credential details are correctly configured in n8n.
  • Resource or Operation not found: If the specified resource or operation does not exist, the node throws an error indicating the missing element. Verify that the resource is set to "Power Shell Script" and the operation to "Get One Power Shell Script".
  • Invalid Id parameter: Providing an invalid or non-existent script ID may result in an API error or empty response. Confirm the ID corresponds to an existing Power Shell script.
  • API request failures: Network issues, incorrect base URL, or permission problems can cause request failures. Check connectivity and API permissions.
  • JSON parsing errors: If additional query parameters or request bodies are malformed JSON, the node may fail. Ensure proper JSON formatting when using advanced options.

Links and References


If you need more details on other resources or operations, feel free to ask!

Discussion