RobotForce.Sophona.PluginConnector 1.0.18

dotnet add package RobotForce.Sophona.PluginConnector --version 1.0.18
                    
NuGet\Install-Package RobotForce.Sophona.PluginConnector -Version 1.0.18
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RobotForce.Sophona.PluginConnector" Version="1.0.18" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RobotForce.Sophona.PluginConnector" Version="1.0.18" />
                    
Directory.Packages.props
<PackageReference Include="RobotForce.Sophona.PluginConnector" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RobotForce.Sophona.PluginConnector --version 1.0.18
                    
#r "nuget: RobotForce.Sophona.PluginConnector, 1.0.18"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RobotForce.Sophona.PluginConnector@1.0.18
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RobotForce.Sophona.PluginConnector&version=1.0.18
                    
Install as a Cake Addin
#tool nuget:?package=RobotForce.Sophona.PluginConnector&version=1.0.18
                    
Install as a Cake Tool

Sophona Studio � Library Plugin Development Guide

This document explains how to build your own Instruction Block (Node) for Sophona Studio using RobotForceConnector.

The goal is to create a simple Hello World instruction:

  • Text input field
  • Dropdown field
  • Output variable assignment

  1. Project Setup

Create a new Class Library project:

dotnet new classlib -n MyPlugin

Add reference to RobotForceConnector in your .csproj:

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup> <TargetFramework>net8.0</TargetFramework> </PropertyGroup>

<ItemGroup> <PackageReference Include="RobotForceConnector" Version="1.0.0" /> </ItemGroup>

</Project>


  1. Plugin Structure

Every plugin contains two main parts:

  1. Tile Configuration Class
  2. Commands Class (instructions implementation)

  1. Hello World � Full Example

3.1 Tile Configuration

using System; using System.Reflection; using RobotForceConnector; using static RobotForceConnector.RobotConnector;

namespace MyPlugin { public static class HelloWorld { public static string description = "Simple Hello World instruction";

    private static string title = "Hello World";

    private static ActionCategory[] category =
    [
        ActionCategory.System
    ];

    public static string frontendHtml =
        new InstructionConfig(
            Type.GetType($"{MethodBase.GetCurrentMethod().DeclaringType.Namespace}.Commands")
                .GetMethod(MethodBase.GetCurrentMethod().DeclaringType.Name),
            category,
            title,
            description
        ).result;
}

}


3.2 Instruction Implementation

using System; using System.Threading.Tasks; using RobotForceConnector;

namespace MyPlugin { public partial class Commands : RobotConnector { [RobotInstruction] public Task<object> HelloWorld(

        // Text input field
        [RobotFieldConfig(
            fieldType = typeof(string),
            defaultValue = "World",
            tooltip = "Text to greet"
        )]
        ScriptVariable name,

        // Dropdown field
        [RobotFieldConfig(
            fieldType = typeof(string),
            isDropdown = true,
            dropdownArray = new string[] { "Console", "WorkflowVariable" },
            defaultValue = "Console",
            tooltip = "Where to send result"
        )]
        ScriptVariable outputMode,

        // Output variable selector
        [RobotFieldConfig(
            fieldType = typeof(string),
            isVariableDropdown = true,
            tooltip = "Variable to store result"
        )]
        ScriptVariable outputVariable
    )
    {
        try
        {
            string message = $"Hello {name.Value}!";

            if (outputMode.Value.ToString() == "Console")
            {
                Console.WriteLine(message);
            }
            else
            {
                // Assign result into workflow variable
                robotScriptState
                    .GetVariable(outputVariable.Name)
                    .Value = message;
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
        }

        return null;
    }
}

}


  1. How Variables Work

All instruction parameters must be of type:

ScriptVariable

Read input value:

name.Value

Get workflow variable name:

outputVariable.Name

Assign value into workflow:

robotScriptState .GetVariable(outputVariable.Name) .Value = "Some result";

Important:

  • Instructions do NOT return values via return
  • Always assign outputs via robotScriptState

  1. All Available RobotFieldConfig Options

[RobotFieldConfig( fieldType = typeof(string), // Logical type defaultValue = "Default", // Default value tooltip = "Tooltip text", // Tooltip in UI

isDropdown = false,                  // Render dropdown
dropdownArray = new object[] {},     // Dropdown values
dropdownEnableCustomInput = false,   // Allow custom dropdown input

isVariableDropdown = false,          // Workflow variable selector

addIndicateOnScreenButton = false,   // Adds "Indicate On Screen" button

addCustomButton = false,             // Adds custom button
customButtonName = "Button",         // Button label
customButtonJS = "console.log(value)"// JS executed on click

)]


  1. UI Field Types

UI field type is determined automatically:

  • isVariableDropdown = true → workflow variable dropdown
  • isDropdown = true → dropdown list
  • addIndicateOnScreenButton → selector field
  • none of above → text input

  1. Build and Deploy

Build project:

dotnet build -c Release

Take generated DLL from:

bin/Release/

Place DLL into Sophona Studio plugins folder.

Restart Sophona Studio.

Your instruction block will appear automatically.


Best Practices

  • Always use ScriptVariable parameters
  • Always provide tooltip text
  • Always provide output variable
  • Handle exceptions properly
  • Keep instructions small and focused

Common Mistakes

  • Missing [RobotInstruction]
  • Commands class not inheriting RobotConnector
  • Output not assigned into workflow variable
  • Tile class name does not match method name

Result

After loading the plugin, Sophona Studio will display:

  • Hello World tile
  • Text input field
  • Dropdown field
  • Output variable selector

The instruction behaves like a native workflow block.

Happy building.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (13)

Showing the top 5 NuGet packages that depend on RobotForce.Sophona.PluginConnector:

Package Downloads
ShareFileInChatPlugin

Package Description

RobotForce.SystemActions

Package Description

RobotForce.UIAutomation

Package Description

RobotForce.Excel

Package Description

RobotForce.RESTAPI

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.18 302 3/25/2026
1.0.17 138 2/18/2026