C# Scripting

Access current Account uuid in C# script

Last Updated: February 18, 2025

To get the Account uuid of the current Task during script runtime as a string variable. Use the following method: This will get a string variable like 75839be4-89e9-4c00-b507-e7e9418e3e62.

Access current Instance uuid in C# script

Last Updated: February 18, 2025

To get the Instance uuid of the current Task Instance during script runtime as a string variable. Use the following method: This will get a string variable like fbfa8388-7a23-46a9-a318-7f86f4b96955.

Access current Task uuid in C# script

Last Updated: February 18, 2025

To get the Task uuid during script runtime as a string variable. Use the following method: This will get a string variable like 888cec5b-6615-4e3d-80ed-8a328a4f71ba.

Access first Key secret by default in C# script

Last Updated: February 21, 2025

This method helps to exclude secrets and passwords from the script itself. So be compliant right from the start. The Key secrets are stored as hash values in the Robogator database. Just in time, in fact, only during the script runtime are the key secret available as decoded values. Add the Key secrets you want…

Access Key secrets in C# script

Last Updated: February 21, 2025

This method helps to exclude secrets and passwords from the script itself. So be compliant right from the start. The Key secrets are stored as hash values in the Robogator database. Just in time, in fact, only during the script runtime are the key secret available as decoded values. Add the Key secrets you want…

Access Task Parameters in C# script

Last Updated: February 20, 2025

This shows how the typed Parameter value is accessible in the script. To get a Parameter value as string during the Task script runtime, use the following method: This method returns the string hello world. Parameters are always read only, so you are not able to set them to a new value during the Task…

C# auto-interpretation of extended object-oriented code

Last Updated: February 16, 2025

Default is true

Create a Robogator Chat message

Last Updated: February 20, 2025

The preferred way to write to the Robogator Chat with C# is to use the following method: This example above generates a single Robogator Chat message with hello world as content.

Create a Robogator error Chat message

Last Updated: February 20, 2025

It is possible to set the state of a Chat message manually to: Error occurred in runtime. The method above writes This is an error to the Chat and sets the Chat message state also to error occurred in runtime. Use of this is to log partial errors during the running Task. When using try…

Get a list of followed unique Task uuid’s

Last Updated: February 21, 2025

It is possible to get a unique list of all Task uuid’s which this Task will trigger after it is finished. To access any followed Task uuid loop through the array with the following method: This will create some Chat messages with all Followed by Task uuids as content: A unique list means that if…

How task cancellation works for C# scripts

Last Updated: February 16, 2025

Start a new Task inside the C# script

Last Updated: February 16, 2025

Use of bold text in Robogator Chat messages

Last Updated: February 20, 2025

If you want to highlight a part of a string in bold letters. Just use * at the start and at the end of the part in the Chat message. This example above generates a single Robogator Chat message with hello world is bold as content and world is in bold letters.

Use of clickable links in Robogator Chat messages

Last Updated: February 20, 2025

It is often wisely to add to a static text link in a Chat message a one click action. This is possible for web and local file links. Just use % at the start and at the end of the link in the Chat message. Robogator knows automatically by itself when to open the standard…