Skip to main content

2 posts tagged with "Connector"

View All Tags

· 4 min read
Vipul Kumar

Introduction

Welcome to the realm of connector development!

Connectors are vital for improving efficiency in various processes. In this study, we'll explore how to create connectors in the Ignite environment, specifically focusing on making a subflow. In this subflow, we'll use two numeric input values, and the final result will be the product of these two variables, demonstrating how connectors can enhance operational results.

What is a Subflow?

Subflow is a way to encapsulate and reuse a group of nodes within a flow. It allows you to create a custom set of nodes and logic and then use that set as a single node within your flows. Subflows are particularly useful when you have a sequence of nodes that you want to use in multiple places in your flows or when you want to modularize and organize your flows for better maintainability.

Certainly, let's outline the creation of a subflow:

Step 1: Create a Subflow

To initiate the subflow creation process, kindly access the Hamburger menu and subsequently select the "Create subflow" option within the Subflow section.


Step 2: Input Node Configuration

Begin by setting up your input node. This involves adding two environment variables and assigning a value to each of them.


we should not hard-code any of these values inside the subflow. We will now pick these values from the user inputs. These can be picked using env of the subflow.

Note: The parameters of the env.get function are case-sensitive.

Let's also add override properties to this connector. Override properties are useful when the user wants to supply inputs to connector through msg object and not input fields.

msg.event={

"num1": env.get('num1') || msg.config.num1;

"num2": env.get('num2') || msg.config.num2;

}

Step 3: Product of the Variables

Next, implement the logic for the product of the variables within a Function Node.


Step 4: Node Integration

Connect the input node to the function node. Additionally, establish a connection to a debugger node to capture any results or errors.


Step 5: Create a Connector

To organize the workflow, select all nodes and utilize the 'Selection to Subflow' option. This action will create a connector containing the selected nodes.


Adding Documentation to Connector

Certainly! Here are the steps to enhance your connector with documentation, broken down step by step:

Step 1: Access Connector Properties

Click on "Edit Properties" for the connector you want to document.

Step 2: Navigate to Description Tab

In the connector properties window, navigate to the "Description" tab. This is where you can add documentation to your connector.

Step 3: Use Markdown Editor

Within the "Description" tab, you'll find a provided markdown editor. This editor allows you to input documentation using markdown text formatting. Markdown is a lightweight markup language for text that is easy to read and write while providing formatting options.

Step 4: Write Documentation

Utilize the markdown editor to write detailed documentation for your connector. You can include information such as the connector's purpose, usage instructions, parameters, examples, and any other relevant information to assist users in understanding and using the connector effectively.

Step 5: Save Changes

After you've written and formatted your documentation using markdown, make sure to save your changes within the editor.

Step 6: Deploy Changes

Click on the "Done" button to save your connector's properties and documentation.

Step 7: Access Documentation

Now, when you go to the subflow that uses this connector, you should be able to access your newly added documentation in the "Doc" section. Users will be able to refer to this documentation to understand how to use the connector and its functionality.

By following these steps, you'll enhance your connector with clear and informative documentation, making it easier for users to utilize your connector effectively.

Branding the Connector action

Let's change the look of this connector now. Double click on the subflow and click edit properties >> Appearance


Make any required changes and deploy.

Conclusion

Congratulations. You have successfully created a connector.

Similarly you can create more connectors.

Stay tuned for more Igniteconnex Tutorials.

· 4 min read
Ahana Drall

Introduction

Hello World! Have you also been captivated by the remarkable seamlessness that connectors bring to the table? Well, let's delve into the realm of crafting connectors within the Ignite environment.

We will be integrating with Alloy today.

Alloy API Reference

Alloy stands as a pioneering platform that redefines identity verification and risk management. With an unwavering focus on security and innovation, Alloy empowers businesses to seamlessly verify identities, detect fraud, and make informed decisions. Leveraging cutting-edge technology, Alloy offers a comprehensive suite of tools that enable enterprises to streamline onboarding processes, enhance customer experiences, and mitigate potential risks. By amalgamating sophisticated data analytics, intuitive workflows, robust evaluations, and intricate entity recognition, Alloy transforms the landscape of identity verification, safeguarding businesses and customers alike in an interconnected digital world.

Let's look at the API reference provided by Alloy.

In the image below, we can see all the api definitions provided by Alloy. To access any of these APIs, we will need an authentication method. For the same, lets look at the authentication guide for Alloy.


The authentication guide mentions various authentication methods.


For clarity and ease of use, let's first try to access the auth token using postman.


We need to provide our username and password in auth headers and the success response of api will return an access token.

Let's Start

It's time to dive into the editor and start to create a connector.

We will be using a function node and an http request node for this case. The first step is to create this http request in the editor.


Now, you need to select the function node and the http request node, click on 'selection to subflow'. The subflow will be created.



It's time to add properties to this connector and make it generic. Let's figure out all the properties we need to get from the user.

  • Username
  • Password
  • Base URL

Since all the above can be different based on different businesses, we cannot hard-code any of these values inside the subflow. We will now pick these values from the user inputs. These can be picked using env of the subflow.


Note: The parameters of the env.get function are case-sensitive.

Let's also add override properties to this connector. Override properties are useful when the user wants to supply inputs to connector through msg object and not input fields.


Now we will modify our api call to use these values,


Make sure to configure the http request node to pick method and url from the msg object.


Adding Documentation to Connector Action

Now let's add documentation to our connector action.

Click on edit properties, and navigate to description tab.

This is a markdown editor which accepts markdown text.


Click done and deploy.

Click on the subflow and in the doc section, you will be able to see your brand new doc.


Branding the Connector Action

Let's change the look of this connector now. Double click on the subflow and click edit properties >> Appearance


Make any required changes and deploy.

Conclusion

Congratulations. You have successfully created a connector action for alloy.

Similarly you can create more connector actions.

Stay tuned for more Igniteconnex Tutorials.