The snippet uses UiPath Orchestrator API to pull jobs which were running for more than a certain threshold of time in UiPath Orchestrator along with the last log message, how long ago it was logged, RobotName and job StartTime.
The assets to be created are:
Threshold Time - Int Type (in hours)
User credentials with UiPath Orchestrator access
SMTP credentials, SMTP Host and SMTP Port
In case you do not want to use SMTP to send emails, please replace the code with send Outlook mail activity.