Message Builder

Most recent version: v1.0.0

See the changelog of this Action type here.

Overview

The Message Builder Action allows users to define new messages by combining different input fields.

AI Action Assistant

This Action has an AI-powered chat feature that can help you configure its parameters. Read more about it in this article.

Ports

These are the input and output ports of this Action:

Input ports
  • Default port - All the events to be processed by this Action enter through this port.

Output ports
  • Default port - Events are sent through this port if no error occurs while processing them.

  • Error port - Events are sent through this port if an error occurs while processing them.

Configuration

1

Find Message Builder in the Actions tab (under the Formatting group) and drag it onto the canvas. Link it to the required Listener and Data sink.

2

To open the configuration, click the Action in the canvas and select Configuration.

3

Enter the required parameters:

Parameter
Description

Fields*

This is where you specify the fields you wish to include in your message, color coded by type.

Fields beginning with _ are internal fields.

Destination Field Name*

Give your message a name to identify it by in the end destination.

Output format*

Choose how to send your message from the following formats: CSV, JSON, Key Value, Free Mode. See the tabs below for the settings specific to each one.

4

Save

Click save when you have composed your message.

To include a field in your message, drag it from the Fields area and drop it into the Message area.

You can add a Field Delimiter to separate the fields in your message string. Choose between : , , , | , ; .

This will generate an output CSV.

Example

Let's say you have received raw data in JSON format and wish to extract the fields and format them as a CSV.

1

Raw data

[
  {
    "username": "user_1",
    "method": "POST",
    "endpoint": "breach log",
    "ip": "10.XXX.XX.XX",
    "description": "[Role] User performed an action on breach log",
    "viewport": [1920, 955],
    "usage": true
  },
  {
    "username": "user_1",
    "method": "POST",
    "endpoint": "event log",
    "ip": "10.XXX.XX.XX",
    "description": "[Role] User performed an action on event log from breach log",
    "viewport": [1920, 955],
    "usage": true
  },
  {
    "username": "service_user",
    "method": "POST",
    "endpoint": "/admin/age",
    "ip": "127.0.0.1",
    "status": 400
  },
  {
    "username": "user_2",
    "method": "POST",
    "endpoint": "/sso/login",
    "ip": "10.XXX.XX.XX",
    "status": 302
  }
]
2

Parse the JSON

Add a Parser to the canvas and extract the fields using the automatic parsing.

You have extracted the endpoint, ip, method, status and username into separate fields.

3

Build the message

Now use the Message Builder to create a CSV containing these fields as one message.

Drag the following fields to the Message area:

  • method

  • description

  • object

  • endpoint

  • ip

  • status

  • username

  • port

Fields delimiter: ,

if delimiter matches: Put "" in quotes.

Last updated

Was this helpful?