Define inputs and setup parameters

The next step of the Create Alert Action wizard allows us to define inputs to the alert action and to create a one-time setup page for the add-on.

Add inputs to the alert action

The input to the alert action will be a URL that we want to pass to the VirusTotal API to scan.

  1. On the Alert Actions Inputs tab, drag a text field from the Component Library to the center of the panel.
  2. Click the text field to select it, then enter the properties for it under Property Editor:
    • For Display Label, enter "URL".
    • For Internal Name, enter "url".
    • Leave Default Value blank.
    • For Hints & Help, enter "URL to query".
    • Select Mandatory.

[Alert action inputs]

Create an add-on setup page

The setup page applies to the entire add-on, and is used for prompting the add-on user for one-time setup information. Preconfigured setup options include user credentials, proxy settings, and logging preferences, but you can also define custom settings. For this add-on, we want to prompt users for the VirusTotal API key.

  1. Click the Add-on Setup Parameters tab.
  2. Under Add-on Setup Built-in Parameters, select any preconfigured options you want to use, such as Add Proxy if you need to use a proxy, and Add Logging to capture logging information.
  3. Drag a password field from the Component Library to the center of the panel. We'll use a password field rather than text because a password field encrypts the API key on the filesystem.
  4. Click the password field to select it, then enter the properties for it under Property Editor:
    • For Display Label, enter "API key".
    • For Internal Name, enter "apikey".
    • Leave Default Value blank.
    • For Hints & Help, enter "Your VirusTotal API key".

[Setup page]

Click Next.

>>  Continue to 4. Define the Python code for the alert action.