Zappy

Creating Custom Zappy Actions

Creating a Custom Action

An action is the building block of a process automation. Zappy Task Editor comes with various built-in Template Action, as well as dedicated Actions (PDF, Mail, Excel, Word, Chrome etc.). You can read The Zappy Activities Guide for more details and examples, as well as additionally, you can create custom activities to better automate processes based on your needs.

There are two major steps required to create a custom action:

  1. Writing the custom action code.

  2. Adding the external assembly (.dll or .nupkg ) in Zappy Task Editor.

Note that the following components are required to create a custom action:

Microsoft Visual Studio with the .NET desktop development workload installed.

You can write the code for your custom action either deriving from Template Action, the two activities look rather similar, but there are differences

Sample Project - https://github.com/zappyai-limited/ExtendZappy

Writing the Custom Action Code

To better understand how to write the code for a custom action, we are going to create one action which asks the user for a String, then Display it in the Message Box.

Note:

In order to write the code for your custom action you need to install Microsoft Visual Studio with the .NET desktop development workload.

  1. Launch Microsoft Visual Studio.

  2. Click File > New >Project… (shortcut: Ctrl + Shift + N). The New Project window is displayed.

  3. Click Visual C#. The list of all dependencies using C# is displayed. Select Class Library (.NET Framework) and click OK. This helps us export the custom action as a .dll file.

  1. Optionally, fill in the Name field with a preferred name for your custom action. In our case, we can use “Zappy.CustomAction” You Must add “Zappy.” Before Project Name
  1. Click Project > Add Reference> Manage NuGet Packages….
  1. Search for the Zappy.SharedInterface Install this Interface.
  1. We rename “Class.cs” as “NewZappyAction.cs” you can change according to your action Behavior or Keep as it is, Then Inherit the “TemplateAction”.
  1. In the Using directive In the Using directive code:
  1. Write the code for your custom activity. In our case, it needs to look something like this:
    We are adding code snapped which shows the sample code.

Adding the external assembly (.dll or nuget Package) in Zappy Task Editor

A] Adding Nuget Package in Zappy Task Editor

  1. Right Click on Zappy Icon > Option > Nuget Manager
  1. Click on Install Nuget Package Button
  1. Select the *.nupkg file which you want to Install, After Successfully Installing the Package.

  2. Launch Zappy Task Editor. Activity is added at the End of Activities.

B] Adding .dll File in Zappy Task Editor

1.Right Click on Zappy Icon > Option > Nuget Manager

2.Click on Load Dll Button

  1. Select the *.dll file which you want to Load, After Successfully Load the *.dll file.

  2. Launch Zappy Task Editor. Activity is added at the End of Activities.


Creating Custom Zappy Actions


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.