Introduction
RemoteLink allows you to add configurable Actions to a Task Script, providing a low-code method of building intelligent work processes.
Here’s an example of a Task Script that sends an email via Microsoft 365 to the support team when an application issue is detected during a RemoteLink Job. In this case, the Send Email (MS 365) Custom Action leverages the Microsoft Graph API to generate the email. Note: Credentials for access to the Graph API, including a tenant and app ID and app secret, must be defined in the Microsoft 365 admin.
‘Send Email (MS 365)’ is a Custom Action that was built by a RemoteLink administrator. Below, we break down how it was created.
Action Definition
Action Objective
Provide the ability to send an email via MS 365 with input parameters such as recipient, subject and message.
General Information
The first step when creating an Action is to define some basic details about it. In this case the ‘Run Scope’, or location where the Action can run is set to ‘Server’, which only allows the operation to run on the Server when the Action is added to a Task Script.
Fields
The fields, which are presented when adding the Action into a Task Script, are the input parameters that will be consumed during the execution of the Action. The following fields are defined for this Action:
- Sender – email address for the sender of the message (allows variables)
- Recipient – email address for the recipient of the message (allows variables)
- Subject – text for the subject of the message (allows variables)
- Message – text for the body of the message (allows variables)
- appSecret – the security secret created for use by RemoteLink (provided by 365 admin)
Note: The two other Microsoft 365 admin provided credential elements, the tenantId and appId, are included in the PowerShell script since they are less likely to change. - varName – the return code for the email delivery web request status
Payload
This Action leverages a PowerShell script to perform the function. Below is the first part of the Payload that will be executed when the Action is run. You can see references to the fields that were defined as inputs.
Task Output/Logging
The RemoteLink Session Log captures details about each Task Action that is executed. As you can see in the logs from the example Task Script referenced in the introduction, an email was successfully delivered to the support group when an automated application error was detected by the RemoteLink Client.
About Actions
Actions are the building blocks for creating Task Scripts. There are dozens of native ‘System Actions’ that enable such work as sending/getting files, controlling registry keys and values, and managing script variables. In addition, administrators can create their own reusable ‘Custom Actions’ that leverage common languages, such as PowerShell or Bash, and/or command programs or shells. Both System and Custom Actions are distributed, executed and logged the same, providing a consistent and complete experience.
Want a copy of this Action?
If you are running v4.5 R3 and would like a copy of this Custom Action that you can import into your environment, just send us an email at support@unwiredremotelink.com.
Want to learn more about Actions?
We’re always happy to discuss the ways RemoteLink can help you solve your endpoint management challenges.
