Skip to content

Redis Actions

Actions are the operations (or API operations) that you can perform on Redis by a simple drag and drop and data mapping of elements and values from input trigger, derived values using formulas or a desired constant that you may wish to map.

All of the actions that you see below automate what you can do manually on Redis.

As shown below, you can manage various types of Redis data in response to a trigger event.

Connect iPaaS supports 5 common Redis data types:

  1. Hash: Redis Hashes are mapped between string fields and string values, so they are the perfect data type to represent objects (e.g. A User with a number of fields like name, surname, age, and so forth)
  2. List: Redis Lists are simply lists of strings, sorted by insertion order.
  3. Sets: Redis Sets are an unordered collection of Strings.
  4. Sorted Sets: Redis Sorted Sets are similar to Redis Sets, non-repeating collections of Strings.
  5. String: Strings are the most basic kind of Redis value. Redis Strings are binary safe; this means that a Redis string can contain any kind of data. For instance, a JPEG image or a serialized Ruby object.

Action for Redis Application on Connect iPaaS

Figure 1. Action for Redis on RoboMQ Connect iPaaS

Set Data As Hash

Action for Set Data As Hash in Redis Application on Connect iPaaS

Figure 2. Set Data As Hash

You can use the "Set Data As Hash" action to manage your hash data. There are three commands available for you to manage your hash data:

  1. HINCR BY: Increment the integer value of a hash field by the given number
  2. HINCR BY FLOAT: Increment the float value of a hash field by the given amount
  3. HSET: Set the string value of a hash field

Set Data As List

Action for Set Data As List in Redis Application on Connect iPaaS

Figure 3. Set Data As List

You can use the "Set Data As List" action to manage your list data. There are two commands available for you to manage your list data:

  1. LPUSH: Prepend one or multiple elements to a list

  2. RPUSH: Append an element to a list, only if the list exists

Set Data As Sets

Action for Set Data As Sets in Redis Application on Connect iPaaS

Figure 4. Set Data As Sets

You can use the "Set Data As Sets" action to manage your set data. Using SADD operation, you can add one or more members to a set.

Set Data As Sorted Set

Action for Set Data As Sorted Set in Redis Application on Connect iPaaS

Figure 5. Set Data As Sorted Set

You can use the "Set Data As Sorted Set" action to manage your sorted set data. Using ZADD operation, you can add one or more members to a sorted set, or update its score if it already exists.

Set Data As String

Action for Set Data As string in Redis Application on Connect iPaaS

Figure 6. Set Data As String

You can use the "Set Data As String" action to manage your string data. Using ZADD operation. There are two commands available for you to manage your string data:

  1. INCR: Increment the integer value of a key by one
  2. SET: Set the string value of a key

Set up Redis action in your workflow

To use a Redis action, you need to:

  1. Pick a Redis action with the data type that you want to operate on.
  2. Set up Redis Connection.
  3. Choose a command for operating your Redis data.
  4. Set up arguments required for the Redis Command.

Action for Set Data As string in Redis Application on Connect iPaaS

Figure 7. Set up Redis action in your workflow

When a new customer is created in Magento 2.x, as shown in the example above, the Email of the new member will be saved into Redis sets with the set name as MemberList.