Skip to main content
Workflow Studio

Djuno workflow studio is managed, low codeworkflow automation application, focusing on integrating both on-chain and off-chain applications.

Djuno Support avatar
Written by Djuno Support
Updated over a week ago

Overview

Djuno workflow studio is fully managed, low code/no code workflow automation application, focusing on integrating both on-chain and off-chain applications. The project is licensed under Apache License Version 2.0, source available and free to self-host. it allow people building workflows involving on-chain and off-chain applications, with simple drag and drop interface.

Use cases

primary focus is on web3 developers to automate tasks after smart contracts have been deployed. However it's usage is not limited to just that. Even if you are not a web3 developer, you can still use it to automate your tasks using the list of supported apps.

  • Monitor smart contract events and functions (e.g: Transfer, Approve) and send notification via Discord, Teams, Slack or Email

  • Send notification to Discord server when NFT is minted

  • Notify user when a transaction does not get through on-chain

  • Triggers automatic top-up if balance (e.g: BNB, ETH, Matic) dropped below certain threshold

  • Keep an eye on @elonmusk tweet to see if it contains keyword "Dogecoin", if yes buy Dogecoin through Binance.

How it works

Workflows

Workflow is a series of actions, designed to be executed automatically without human intervention, to carry out specific task more efficiently. In simpler term: if X happens, execute Y. Nodes are used to execute those actions, and they are connected via edges to form a workflow.

Workflow can only be started when "something" happened. Trigger or Webhook nodes are used to specify those events. For instance, if ETH balance in my wallet exceeds 5ETH, send me an email notification, otherwise get the latest mined block.

Workflow format

workflow uses JSON format. Workflow can be easily exported and loaded.

workflow example

{   "nodes": [     {       "width": 200,       "height": 66,       "id": "ETHBalanceTrigger_0",       "position": {         "x": 639.9142135623731,         "y": 117.47918471982868       },       "type": "customNode",       "data": {         "label": "ETH Balance Trigger",         "name": "ETHBalanceTrigger",         "type": "trigger",         "inputAnchors": [],         "outputAnchors": [           {             "id": "ETHBalanceTrigger_0-output-0"           }         ],         "selected": false       },       "selected": false,       "positionAbsolute": {         "x": 639.9142135623731,         "y": 117.47918471982868       },       "dragging": false     },     {       "width": 200,       "height": 66,       "id": "ifElse_0",       "position": {         "x": 640.5,         "y": 229.75       },       "type": "customNode",       "data": {         "label": "If balance > 5ETH",         "name": "ifElse",         "type": "action",         "inputAnchors": [           {             "id": "ifElse_0-input-0"           }         ],         "outputAnchors": [           {             "id": "ifElse_0-output-0"           },           {             "id": "ifElse_0-output-1"           }         ],         "selected": false       },       "selected": false,       "positionAbsolute": {         "x": 640.5,         "y": 229.75       },       "dragging": false     },     {       "width": 200,       "height": 66,       "id": "alchemy_0",       "position": {         "x": 513.3040405071067,         "y": 340.74137802864846       },       "type": "customNode",       "data": {         "label": "Get latest block",         "name": "alchemy",         "type": "action",         "inputAnchors": [           {             "id": "alchemy_0-input-0"           }         ],         "outputAnchors": [           {             "id": "alchemy_0-output-0"           }         ],         "selected": false       },       "selected": false,       "positionAbsolute": {         "x": 513.3040405071067,         "y": 340.74137802864846       },       "dragging": false     },     {       "width": 200,       "height": 66,       "id": "emailSend_0",       "position": {         "x": 782.8309524416879,         "y": 344.08452377915603       },       "type": "customNode",       "data": {         "label": "Send Email Notification",         "name": "emailSend",         "type": "action",         "inputAnchors": [           {             "id": "emailSend_0-input-0"           }         ],         "outputAnchors": [           {             "id": "emailSend_0-output-0"           }         ],         "selected": false       },       "selected": false,       "positionAbsolute": {         "x": 782.8309524416879,         "y": 344.08452377915603       },       "dragging": false     }   ],   "edges": [     {       "source": "ETHBalanceTrigger_0",       "sourceHandle": "ETHBalanceTrigger_0-output-0",       "target": "ifElse_0",       "targetHandle": "ifElse_0-input-0",       "type": "buttonedge",       "id": "ETHBalanceTrigger_0-ETHBalanceTrigger_0-output-0-ifElse_0-ifElse_0-input-0",       "data": {         "label": ""       }     },     {       "source": "ifElse_0",       "sourceHandle": "ifElse_0-output-0",       "target": "alchemy_0",       "targetHandle": "alchemy_0-input-0",       "type": "buttonedge",       "id": "ifElse_0-ifElse_0-output-0-alchemy_0-alchemy_0-input-0",       "data": {         "label": "true"       }     },     {       "source": "ifElse_0",       "sourceHandle": "ifElse_0-output-1",       "target": "emailSend_0",       "targetHandle": "emailSend_0-input-0",       "type": "buttonedge",       "id": "ifElse_0-ifElse_0-output-1-emailSend_0-emailSend_0-input-0",       "data": {         "label": "false"       }     }   ] }

Deploy workflow

Once a workflow is deployed, it will stay active and listen to event specified by Trigger node, or webhook call from Webhook node. Deployed workflow will automatically kick off an execution through the connected nodes when an event/webhook is received.

Under the hood

Djuno workflow studio uses child_process module to spawns multiple subprocesses whenever a workflow is to be executed. Node AbortController is used to abort subprocesses. Breadth First Search algorithm is used to find and execute next connected nodes. To avoid infinite loop, maximum of 3 loops is specified. This means we will only executes the same loop for 3 times before terminating the execution.

Nodes

A node is script or function written to perform a single action. For instance: API calls using axios, cron jobs, set timeout, send email and etc. This is how node works:

  1. Receive inputs from user

  2. Execute function using the input parameters received

  3. Emit and save results

Three types of nodes in Outerbridge:

  • Action Node

  • Trigger Node

  • Webhook Node

It is recommended to test out every node before deploying the whole workflow

Action Node

Action node is a node that performs an action / execute a function.

How to test action node

  1. Add a new action node

  2. For each section, fill in the required fields

  3. Click Continue to get a green check

  4. Lastly, click Test Node to test the action node

Trigger Node

Trigger node is a node that listens to event via NodeJS Event Emitter.

How to test trigger node

  1. Add a new trigger node

  2. For each section, fill in the required fields

  3. Click Continue to get a green check

  4. Click Test Node to test the trigger node

  5. Send the event (e.g: an email, a token transfer)

Webhook Node

Webhook node is a node that listens to webhook calls.

How to test webhook node

  1. Add a new webhook node

  2. For each section, fill in the required fields

  3. Click Continue to get a green check

  4. Click Save & Test Webhook to test the webhook node. Note: workflow will be automatically saved at this point.

  5. Call the Webhook URL

Edges

Edges are simply links connecting nodes.

Credentials

Some nodes need to be authenticated to perform an action. For instance, API & Secret keys, Bearer Token, Email password and etc. User can create a new set of credential to store these sensitive information. Credentials will be encrypted and stored in database. Credentials will automatically get decrypted when testing the node or when the node is executed in a deployed workflow.

all credentials stored are encrypted.

Executions

An execution will be started whenever an event/webhook kickstart a deployed workflow. Execution will be saved along with the results of each executed node.

There are 4 stages of Execution:

  • INPROGRESS: When execution is still running

  • FINISHED: When execution has finished

  • ERROR: When there is error executing node

  • TERMINATED: When user manually stop the deployed workflow while an execution is still running

  • TIMEOUT: When the execution time exceeds specified timeout

Contracts

Verified smart contracts on selected blockchain network can be imported. Events and functions from imported smart contracts can be monitored and executed.

How to import smart contract

  1. At dashboard, select Contracts from side bar

  2. Click Add New

  3. Select blockchain network

    • Mainnet

    • Rinkeby

    • Kovan

    • Ropsten

    • Goerli

    • Polygon

    • Polygon Mumbai

    • Binance Smart Chain Mainnet

    • Binance Smart Chain Testnet

    • Optimism Mainnet

    • Optimism Kovan

    • Arbitrum Mainnet

    • Arbitrum Rinkeby

  4. Select registered credential or add new. This is needed in order to retrieve smart contract ABI

  5. Fill in the Contract Name and Address. ABI will be fetched automatically using the crendential API key

  6. Imported contracts will be available to pick from nodes

Wallets

Hot wallet can be created on selected blockchain network. Each wallet will have its own private key that can be used to sign transaction on blockchain (e.g: create new token, execute smart contract function). Sensitive information such as private key and mnemonic of the wallet will be encrypted and stored in database. Only user with the right encryption.key will be able to decrypt the data.

How to add wallet

  1. At dashboard, select Wallets from side bar

  2. Click Add New

  3. Select blockchain network

    • Mainnet

    • Rinkeby

    • Kovan

    • Ropsten

    • Goerli

    • Polygon

    • Polygon Mumbai

    • Binance Smart Chain Mainnet

    • Binance Smart Chain Testnet

    • Optimism Mainnet

    • Optimism Kovan

    • Arbitrum Mainnet

    • Arbitrum Rinkeby

  4. Select registered credential or add new. This is needed in order to retrieve the balance

  5. Fill in the Wallet Name

  6. Created wallets will be available to pick from nodes

Pricing

to check out flexible pricing see this link

Did this answer your question?