Developer hub
Related Docs
Steps to make Plugin...
viaSocket’s Plugin builder empowers both app developers and everyday users to create custom integrations, bringing new apps into the platform with ease. Whether you're an app company looking to extend your app's reach or a user wanting to automate tasks across your favorite tools, viaSocket offers the flexibility you need.

For Developers: Expand Your App’s Ecosystem
As an app developer, you understand the value of making your app accessible across multiple platforms. With viaSocket’s Plugin builder, you can easily integrate your app into the viaSocket ecosystem, making it available to a broad audience.
Why Integrate with viaSocket?
- Wider Reach: By bringing your app into viaSocket, you tap into a diverse user base, increasing your app’s visibility and usage.
- Custom Workflows: Allow users to create custom workflows that incorporate your app, enhancing its utility and user engagement.
- Ease of Integration: The Plugin builder simplifies the integration process, even if your app has complex functionalities.
Example Use Case - Imagine integrating a project management tool with viaSocket, enabling users to automate task creation, status updates, and notifications directly within their workflows.
For Individual Users: Bring Your Favorite Apps to viaSocket
Are you using an app that isn't yet available on viaSocket? With the Plugin builder, you can bring your favorite apps into the platform, provided the app’s API is publicly accessible. This feature allows you to create custom automations and workflows tailored to your needs.
Why Use the Plugin Builder?
- PersonalizedAutomation: Tailor workflows to fit your specific needs by integrating the apps you love.
- NoCodingRequired: The Plugin builder is user-friendly, making it accessible even if you don’t have a technical background.
- EnhancedProductivity: Automate repetitive tasks, streamline processes, and save time by connecting your apps within viaSocket.
Example Use Case - If you use a messaging app like Slack that isn’t pre-integrated, you can bring it into viaSocket using the Plugin builder. You could then set up a workflow that sends notifications to Slack when specific events occur in another app.
How to Get Started
- Access the Plugin Builder: Log in to viaSocket and navigate to the Plugin builder In Developers Hub.
- Define Visibility Configuration: Set the visibility of your integration, determining whether it is public or restricted to certain users.
- Define Authentication: Configure the authentication method for your app integration, such as API keys or OAuth.
- Define Triggers and Actions: Set up the events (triggers) that will initiate workflows and the tasks (actions) that will be performed in response.
- Testing and Customization: Thoroughly test your integration to ensure it functions correctly, and make any necessary customizations.
- Deploy and Use: Once tested, deploy your integration and start using it to automate tasks and enhance your workflows.
With the ability to integrate virtually any app, viaSocket enables you to unlock new possibilities and streamline your processes like never before.
What is Plugin Build...
viaSocket's Plugin builder allows you to create custom integrations between your favorite apps and the viaSocket platform. This detailed guide will walk you through each step of the process, from initial setup to deployment, ensuring you can create powerful and efficient workflows tailored to your needs.
The Plugin builder in viaSocket is designed to be user-friendly, enabling both developers and non-developers to create custom app integrations. Whether you want to bring a new app into viaSocket or enhance the functionality of an existing app, the Plugin builder provides the necessary tools and flexibility.The following steps will guide you through creating a plugin in viaSocket.
Visibility Configuration
Authentication
Create Triggers
Create Actions
Define Input Fields
AI Assistance at every step
viaSocket’s AI is designed to make the plug creation process as simple and efficient as possible. At each step, the AI provides valuable support, such as automatically fetching the icon of an app when you provide its domain and recommending most useful triggers and actions based on your needs.
Access the Plugin Builder
- Navigate to the Developer Hub section.
Click on the Plugin Builder option.
Once inside the Plugin Builder, select "+Create New Plug" to begin creating your custom plug.
1. Visibility Configuration
This includes choosing a unique and descriptive name, uploading a relevant logo for display in viaSocket's app library, and deciding on the plugin's audience. You can set your plugin to Private, making it available only to your account or organization, or Public, which allows it to be listed in viaSocket's "Integration" library for access by all users.
2. Authentication
In the authentication step, you determine how users will authenticate their accounts before connecting the app to viaSocket for workflows. This process ensures secure communication between viaSocket and the integrated app. Authentication methods can vary depending on the app:Basic Authentication: Requires users to enter an API key or username and password.
OAuth 2.0: Involves providing a client ID, client secret, authorization URL, and token URL for more secure and scalable access.
The choice of authentication method depends on the specific requirements of the app being integrated.
3. Create Triggers
Triggers are the events that start workflows .When creating triggers for your plugin, you can choose between two types:Instant Triggers: These use webhooks to initiate workflows instantly when an event occurs in the integrated app.
Scheduled Triggers: These use APIs to poll data at regular intervals, such as every 15 minutes, to check for updates and trigger workflows accordingly.
For example, "New Email Received" in an email app or "New Order Created" in an e-commerce platform.
4. Create Actions
Actions are tasks executed in response to triggers within your plugin. They perform specific functions or operations in the integrated app based on the data received from the trigger.For example, "Send a Message" in a messaging app or "Update a Record" in a CRM system.
5. Define Input Fields
Input fields are the parameters that users need to provide to execute triggers or actions.
- Clearly define the input fields, including their names, data types (text, number, date, etc.), and validation rules.
Ensure that all required fields are clearly marked, and optional fields are identified accordingly.
Testing and Deployment
Test Your Plugin: Before deploying, thoroughly test your plugin to ensure all triggers, actions, and authentication methods work correctly. Use the "Test" feature in viaSocket to simulate various scenarios.
Publish Your Plugin: Once your plugin is tested and customized, click "Publish" to make it live. Choose whether to keep it private or make it public on the viaSocket.
Monitor and Maintain: After deployment, monitor your plugin's performance through the viaSocket dashboard. Update and maintain your plugin regularly to fix bugs, add new features, or improve performance based on user feedback.
Creating a plugin in viaSocket is a powerful way to extend the capabilities of your apps and automate workflows. By following this step-by-step guide, you can create robust and efficient integrations tailored to your specific needs, enhancing productivity and streamlining processes.
How to create Plugin...
The Visibility Configuration step in viaSocket is essential for defining how your plugin (referred to as a "plug" in viaSocket) will be displayed and accessed by users. This initial setup ensures that your app is correctly identified and categorized within the viaSocket ecosystem. Properly configuring visibility is crucial for maximizing the usability and discoverability of your custom integration. This guide will walk you through the process of configuring the visibility settings for your plug in viaSocket.
Steps to configure Visibility Configuration:
To begin configuring the visibility of your plug, follow these steps:Specify App Name and Domain
Once you click on "+Create New Plug," you will be prompted to provide the App Name and Domain in the correct format.
App Name: Enter the name of the service for which you want to create a plugin.
Example: If you are creating a plug for MailChimp, type "MailChimp."
Domain: Enter the domain of the app, which is the official website or URL of the application.
Example: For MailChimp, enter "mailchimp.com."
AI Assistance in Visibility Configuration
When you provide the App Name and Domain while creating a plug in viaSocket, our AI automatically fetches all the necessary details for the visibility configuration, such as the app description, logo, category, and more. This saves time and ensures accuracy. You can then review these details and make any changes as needed to align with your specific requirements. This process simplifies setting up your plug and optimizes it for visibility and engagement on viaSocket.
Required Details for Visibility Configuration
Below is the list of details you need to provide and adjust during the Visibility Configuration step:
- App Name: Enter the name of the service you wish to create a plugin for.
- Example: "MailChimp" if you are creating a plug for MailChimp.
- App Description: Provide a detailed description of the service, including what it does and where it can be used.
- Example: "MailChimp is a leading email marketing service that allows businesses to create, send, and analyze email campaigns. It offers a range of tools for designing emails, managing subscriber lists, and tracking campaign performance."
- Domain: Enter the domain of the app. This is the website or URL associated with the application.
- Example: "mailchimp.com"
- Example: "mailchimp.com"
- Audience: Indicate whether the plugin is public or private.
- Private: Only people within the creator’s workspace can access and use the plug.
- Public: The plug is available for all viaSocket users to access and utilize.
- Category: Select the category that best describes your plugin. viaSocket provides a list of categories for various types of applications.
- Icon URL: Specify the URL for the icon of your plugin. If the correct domain is entered in the previous step, viaSocket will automatically set the icon URL.
- Tags/Keywords: Add relevant tags or keywords to enhance the searchability of your plugin within viaSocket.
- App’s Primary Color: Specify the primary color of the app. This helps in better visual integration of your plug within the viaSocket interface.
- Whitelist URL: Include the base URL of the service API. This is crucial for making API requests.
- Example: "https://api.mailchimp.com/3.0/"
- Requires Fixed IP Checkbox: Check this box if your application requires a dedicated IP for making API calls. If selected, viaSocket will provide the necessary IP details for whitelisting purposes.
Importance of Visibility Configuration
Visibility Configuration is a crucial step when creating a plugin (plug) in viaSocket, especially if you choose to make your plug public. The settings and details you provide during this step determine how your plug will be displayed and accessed by users within the viaSocket platform.
Why Visibility Configuration Matters
Enhanced Discoverability in the App Library
For public plugs, visibility configuration directly impacts their presence in viaSocket's app library, accessible at viasocket.com/integrations. This library is a central hub where users can browse and discover various integrations available on viaSocket. By setting your plug’s visibility to public, it becomes part of this app library, enhancing its discoverability among all viaSocket users.- Dedicated Web Page for Public Plugs
When you make your plug public, viaSocket not only lists it in the app library but also creates a dedicated page for your plug on its website. This page provides detailed information about your plug, helping potential users understand its functionality and benefits. The URL for this page follows the format:
viasocket.com/integrations/[AppName].- Example: If your plug is for MailChimp, the URL would be:
viasocket.com/integrations/MailChimp
- Example: If your plug is for MailChimp, the URL would be:
Utilization of Plug Details for Web Page Content
The information you specify during the Visibility Configuration step is crucial because it is used to populate the content of the dedicated web page for your public plug. This includes:App Name: The name of your app or service, helping users quickly identify the plug.
Logo: The visual representation of your app, enhancing brand recognition.
Category: Helps categorize your plug in the app library, making it easier for users to find it under the appropriate category.
About App: A detailed description of what your app does, its key features, and the problems it solves. This section informs users about the benefits of integrating with your app.
Redirection to Your Website: A link that directs users from the viaSocket page to your app's website, potentially driving traffic and increasing user engagement.
Consistent and Custom Branding with App’s Primary Color
To enhance the visual identity of your plug, viaSocket uses the primary color provided by you during the visibility configuration on the dedicated page for your public plug. This allows the page to reflect your brand’s color scheme, ensuring a unique and cohesive presentation that aligns with your app’s branding.
Benefits of Proper Visibility Configuration
Increased User Engagement: By making your plug public and configuring its visibility correctly, you enhance its visibility and appeal, potentially leading to increased user engagement and adoption.
Improved Marketing Opportunities: The dedicated web page serves as a marketing tool, promoting your app to a broader audience and providing a platform to highlight its key features and benefits.
Greater Reach and Exposure: Public plugs in viaSocket benefit from being part of a centralized app library, making it easier for users to discover and use your app, thus expanding your reach within the viaSocket community.
Visibility Configuration is not just a technical step but a strategic one that affects how your plug is presented to and perceived by viaSocket users. For public plugs, proper visibility configuration ensures that your plug is prominently displayed in the app library and has a dedicated web page that accurately represents your app. By carefully providing the necessary details, including your app’s primary color, you maximize the visibility and impact of your plug within viaSocket, enhancing both discoverability and user engagement.
Private vs Public Plugs in viaSocket
When configuring the visibility of your plug in viaSocket, you have the option to choose between making it Private or Public. Understanding the difference between these options is crucial for determining how your plug will be accessed and utilized.
Private Plugs
Visibility: Private plugs are only visible within your workspace.
Access: Only you and members of your workspace can see and use the plug.
Use Case: Ideal for internal tools or integrations that are specific to your team or organization.
Public Plugs
Visibility: Public plugs are available to all users of viaSocket.
Access: Any viaSocket user can discover and use the plug.
Additional Exposure:
Your plug will be listed in the viaSocket app library, increasing its visibility to a broader audience.
A dedicated page for your app will be created on the viaSocket website, with a URL in the format: viasocket.com/integrations/[AppName].
Use Case: Best suited for widely applicable tools or services that you want to share with all viaSocket users.
Benefits of Using Public Plugs
Increased Exposure: Public plugs gain visibility across the entire viaSocket user base, potentially attracting more users to your service.
Marketing and Branding: The dedicated page on the viaSocket website serves as a marketing tool, showcasing your app and its features to a broader audience.
Community Engagement: Encourages engagement and collaboration within the viaSocket community, allowing more users to benefit from your integration.
Choosing between a private and public plug depends on your goals and the intended audience for your integration.
Next Steps
After completing the Visibility Configuration, you will proceed to the next steps of creating a plug, including Authentication and Actions & Triggers. These steps will further define the functionality of your custom integrations, allowing you to maximize the potential of your app within viaSocket.
For more detailed guidance on each step, refer to the specific documentation sections on Authentication and Actions & Triggers.
Visibility Configura...
Next step to set authentication for your plugin. In Authentication Configuration viasocket provide three types of authentication methods for your application :
- No Auth
Basic Auth
OAuth 2.0 (viaSocket supports the types of authentication in OAuth 2.0: Authorization Code, Implicit, Client Credentials, Password Credentials)
🔴 NOTE : If any service support base64 conversion then select Basic auth in that case.
Typically, 'No Auth' is used when the service does not require authentication to access its API. This is commonly applicable for open APIs.
Authentication Configuration - Basic Auth
Typically, basic authentication requires the service's api-key. The processes to obtain an API key and the necessary fields are covered in detail in the service's documentation. Click here to know how basic auth works in viaSocket.
Authentication Configuration - OAuth 2.0
Auth2.0 works by delegating user authentication to the service that hosts the user account and authorizing third-party applications to access the user account.
Type 1: Authorization Code
To implement OAuth 2.0 (Authorization Code) for a particular service, you typically need to register your application with the service to obtain a client ID and client secret, set up redirection endpoints to handle callbacks, and create logic to obtain and refresh access tokens using the client credentials. Click here to learn more about Authorization code.
Type 2: Implicit Auth
Implicit authentication, an OAuth 2.0 grant type, enables the client application to receive the access token directly from the authorization server via the redirection URI, without needing an intermediate authorization code, using only the client ID. Click here to learn more about Implicit auth in viaSocket.
Type 3: Client Credentials
The Client Credentials grant type in OAuth 2.0 uses a client ID and secret to get an access token. Register with the OAuth 2.0 provider to receive these credentials. Upon successful authentication, the server issues an access token. Click here for more details.
Type 4 : Password Credentials
This OAuth 2.0 grant type exchanges a user's username and password directly for an access token. Register your application with the OAuth 2.0 authorization server to obtain a client ID and client secret. To learn more about password credentials authentication type in viaSocket Click here.
🔴NOTE : The fields you created for authentication are required to create actions and triggers. Use this value format : `${context.authData.fieldkey_name}`.
Test Me API:
To complete the process of authentication the final step is to add the Test Me API . It is a simple GET API which is getting user details, profile information.This API is invoked during the authentication process of the plugin.
Sample Request with Response:
Connection Label:
It is a label provided to show authentication by the user when using the plugin in any of the flows. For security purposes, "Mask connection label value" is used to essentially conceal the actual value of the connection label.
Append Headers/Query params/Body: The interface you are looking at allows you to set default key-value pairs for headers, query parameters, or the body of HTTP requests where you want to send authentication data. These defaults will be applied to all actions or triggers that use the specified authentication version, ensuring consistent and necessary data is sent with each request.
Suppose your API accepts api-key the query params and, so add Key: api-key (or the specific syntax required by your service) Value: The authentication key entered by users
Now in any action and trigger no need to add authentication in any api it will fetch automatically
Support
For further assistance, visit the viaSocket support page or contact our support team at support@viasocket.com.
Authentication
Typically, basic authentication requires the service's api-key. The processes to obtain an API key and the necessary fields are covered in detail in the service's documentation.Step by step guide on how to set up Basic auth to create plugs in viaSocket
Version of authentication: Viasocket provides v1 version of authentication automatically.
🔴NOTE : We need to create a new authentication version if we have used authentication version in any action. We can not edit an authentication version which is used by any action.
Field Label : Viasocket provides field auth_key by default for basic auth, but one can add additional fields accordingly.
Configure additional Input Fields (if required) :
Click on Add Field and fill the field details
Key: Uniquely identifies the input field. It is essential for referencing and processing the data associated with this field.Ex: auth_key , domain.
Label: The name of the field. It will be visible on the UI. This is what users will see as the name of the input field.
Help : Provide any instruction to the user such as:documentation link,format etc.
Type: Specifies the data type of the field, such as string for text, number for numeric values, etc. As of now it is set to string.
Required: Indicates whether the field is obligatory. If checked, users must provide a value for this field during authentication.
Authentication - Bas...
Auth2.0 works by delegating user authentication to the service that hosts the user account and authorizing third-party applications to access the user account.
Type01: Authorization Code
To implement OAuth 2.0 (Authorization Code) for a particular service, you would typically need to register your application with the service to obtain a client ID and client secret, implement redirection endpoints for handling callbacks, and implement the logic to obtain and refresh access tokens using the client credentials.
Scopes : Scopes define and limit the access that a client application has to a user's resources on a resource server. They play a crucial role in determining the extent of the authorization granted during the OAuth flow.
There are two types scopes :
- Space Separated : In some OAuth 2.0 implementations, scopes are represented as a space-separated list within the scope parameter. For example: scope=read write profile
- Comma Separated : In other OAuth 2.0 implementations, scopes are represented as a comma-separated list within the scope parameter. For example: scope=read, write, profile.
🔴In the scope field when you write any scope you have to press ENTER KEY so that the scopes will get saved.
🔴Add fields process is same as Basic auth.
🔴Format to use response of authorization is `${context.authData.code}`. Replace code with key in the response you want to use.
Next step is to add required API’s and authenticate a user, the API’s you need to provide for your service is:
Access Token API :
Once the authorization code is generated, the next step is obtaining an access token. The primary purpose of an access token is to securely grant limited access to specific resources on behalf of a user or an application.
Example :
Refresh Token API :
The refresh token serves to refresh the validity of the access token by generating a new token and extending the access token's duration.
Example :
Revoke Token API :
If you wish to disable an access or refresh token, simply send a request to the /revoke endpoint of the appropriate authorization server.
Example :
🔴To use response of this block for is `${context.authData.revoketokencode.______}`
Test Me API :
Same as basic auth
Example :
Append Headers/Query params/Body:
The interface you are looking at allows you to set default key-value pairs for headers, query parameters, or the body of HTTP requests where you want to send authentication data. These defaults will be applied to all actions or triggers that use the specified authentication version, ensuring consistent and necessary data is sent with each request.
Support your API accepts api-key the query params and, so add Key: api-key (or the specific syntax required by your service) Value: The authentication key entered by users
Now in any action and trigger no need to add authentication in any api it will fetch automatically.
🔴Using try/catch in the code is a best practice for catching errors and debugging and in return always add response.data
Authentication Auth2...
Implicit authentication is one of the OAuth 2.0 grant types designed for an implicit flow.
The client application receives the access token directly from the authorization server as part of the redirection URI without an intermediate authorization code with client ID only.
🔴Click on authorize button will obtain access token for provided services . All other fields(Authorization URL, Scopes, response type, additional fields) and API’s (Refresh Token,Test Me API, Connection label ) are the same as described above authorization code .
Authentication Auth2...
The Client Credentials grant type in OAuth 2.0 is used to obtain an access token with users' client ID and secret.

- Client application is registered with the OAuth 2.0 service provider.
During registration, the client receives a Client ID and a Client Secret.
If the authentication is successful, the server issues an access token to the client application
🔴All other fields(Authorization URL, Scopes, response type, additional fields) and API’s (Access Token API, Refresh Token,Test Me API, Connection label) are the same as described above authorization code .
Authentication Auth2...
This grant type in OAuth 2.0 involves exchanging a user's username and password directly for an access token.

- Register your application with the OAuth 2.0 authorization server to obtain a client ID and client Secret.
🔴All other fields(Authorization URL, Scopes, response type, additional fields) and API’s (Access Token API, Refresh Token,Test Me API, Connection label) are the same as described above authorization code .
Authentication Auth2...
A trigger is an event that initiates your automated workflow, serving as the catalyst for a series of predefined actions whenever a specific event occurs.
viaSocket provides two types of triggers:- Instant Triggers
Scheduled Triggers.
This documentation will guide you through the process of creating and managing these triggers.
Instant Triggers
Instant Triggers are designed to respond immediately to specific events or conditions. When the criteria for the trigger are met, the associated actions or processes are executed without delay. This type of trigger is ideal for real-time responses, such as sending notifications or updating records as soon as a change occurs.
📌For example, an instant trigger could be "New Order Placed in Shopify." This trigger immediately activates the workflow as soon as a customer places a new order in a Shopify store.
🔴Webhook Url is the url you need to provide at the time of webhook creation. Pass its context `${context.inputData.hookurl} so when the trigger is included in the flow it automatically considers webhook of the flow to trigger.
🔴The JSON part is the same as action JSON.
Next step is to add required API’s for create instant trigger, the API’s you need to provide for your service is:
Add PerformList API
🔴In this API you can add sample webhook payload or a GETapi which return response as webhook get when event performed.
Example:
Add Perform Subscribe API:
Example :
ADD PerformUn-Subscribe API:
🔴Use above created webhook Id to delete that webhook. Format to use that webhook ID is `${context?.inputData?.performSubscribe.id}
Example :
Scheduled Triggers are designed to activate at predetermined times or intervals. Unlike instant triggers, which respond immediately to events, scheduled triggers run based on a schedule you set. This is useful for tasks like periodic data synchronization, regular report generation, or routine maintenance activities.
📌For example, a common Scheduled trigger is the "New Spreadsheet Row" trigger in Google Sheets. This trigger checks for new rows added to a specified Google Sheets spreadsheet at regular intervals.
Add PerformList API
🔴In this API you can add sample webhook payload or a GETapi which return response as webhook get when event performed.
Example :
Add Perform API
🔴In this API you can add sample webhook payload or a GET api which return response as webhook get when event performed.
Example :
Support
For further assistance, visit the viaSocket support page or contact our support team at support@viasocket.com.
How to create Trigge...
After completing the authentication process, the next step is to create the desired action for the plugin in viaSocket. This guide will walk you through the process of creating an action, defining necessary scopes, constructing the action JSON, and adding the final perform API.
Actions are specific tasks or operations executed as part of an automated process. These tasks are triggered by certain events or conditions and can range from simple data manipulations to complex API interactions. Actions are fundamental to automating workflows, allowing seamless integration and interaction between different applications.
📌For example, an action could be "Send an Email in Gmail." This action occurs after a trigger event, such as receiving a new form submission in a web app.
Add additionally required scopes
To perform the particular action if any other scopes is required enter it in the action scopes.
Now we have to write Action JSON:
The concept of "action JSON" in a viaSocket plugin refers to the structured JSON format used to define the fields of an action that are selected by the user when he/she uses that plugin. This JSON structure typically includes text fields,dropdowns, input groups etc .
Here is a simplified version of what an action JSON might look like :
🔴To Get value of the field use `${context.inputData.field_key}`
🔴To know more about the JSON and its fields types refer the doc https://viasocket.com/faq/create-plugin
🔴For escape json use https://www.freeformatter.com/json-escape.html#before-output
Perform API:
The last step to complete the action is to add a final perform API. This API is responsible for performing the action. For detailed explanation Click here.
Example :
Support
For further assistance, visit the viaSocket support page or contact our support team at support@viasocket.com.
How to create Action...
Actions/Triggers in plugins require an input form because they always need a way for users to send data to your app’s API to find, update, or create a new object. When building a plugin action or trigger on the Platform viaSocket, use the JSON or GUI to create the user input form for your app's API.
JSON (JavaScript Object Notation) : When building a plugin, JSON is used to define the structure and behavior of forms that users interact with. Here’s how JSON is typically utilized in this context:
Defining Input Fields: JSON is used to specify the fields that users will fill out. Each field is represented as a key-value pair with attributes that describe the field.
Specifying Field Attributes: Attributes include the field’s name, label, type, required status, and more. These attributes guide how the form will look and function within the plugin’s interface.
viaSocket GUI : The GUI functions like other form builders, creating forms within the Platform UI. Add fields to the form matching the data required by your app, using the same names as in your app’s UI.
This guide covers:
Adding Input Fields in JSON:
Define the structure and attributes of input fields using JSON.
Adding Fields through GUI:
Use the GUI to add and configure input fields seamlessly within the platform.
Adding Input Fields in JSON:
Log into the viaSocket.
Select the org in which you want to create app integration.
Go to the Developer hub and click on the ‘new plug’ button.
A json structure with default input fields will appear (as shown above), you can edit these fields according to plugin needs. In JSON editor, add in details about your input field,JSON input field attributes are:
key: A unique identifier for the field. It should be concise, without spaces, and ideally match the key for each field, used to send data in API , such as ‘username’.
Label: A name or label visible on the UI for the field, such as "Name".
type: Defines the type of input field, such as string, number, dropdown, input groups, etc. Refer to the plugin input fields documentation for more details on types.
help (optional): A longer description that appears under the field, with markdown formatting support .For example “Enter or select Account username”.
placeholder (optional): A placeholder for a field, shown inside the input field for example text. This can be used as an alternative to help text.
required : Indicates whether the field is mandatory. If the key is not provided, it defaults to false. If the field is required by the API and users must provide a value, set it to true.
Source: In case of dynamic data in the field a new JSON key is added “source”. Specifies the source of the data for the field, such as a URL or API endpoint. Discussed in advance input fields section
children: Similarly a new key required in case of dropdown,input groups which hold child elements of fields. Explained in advance input fields section
Adding Input Fields using GUI:
Log into the viaSocket.
Select the org in which you want to create app integration.
Go to the Developer hub and click on the ‘new plug’ button.
Switch to the GUI tab. Select type of field you want to add :
- Add the field required and to edit the field click on setting button (Editing in GUI also reflect in JSON automatically)
- Edit all attributes of field
Remember to save changes after every change in fields.
Adding Fields to Act...
Input fields are elements in a user interface (UI) where users can enter data. They are fundamental components of forms, allowing users to provide information such as text, numbers, dates, and selections. Each input field is designed to capture a specific type of data, ensuring that the information entered by the user can be processed correctly by the application. Also Click here., for instructions on adding input fields in JSON when creating a plugin and action.
Static Input Fields
Static input fields are predefined and do not change based on user interactions. They are essential components in forms and user interfaces for collecting and displaying specific types of data. Here's an overview of different static input field types and their functions:
String
A string input field collects text data, such as names, addresses, and email addresses. For example, a field labeled "Name" might guide users with an initial value like "John Doe."
Number
A number input field collects numerical data, ideal for ages, quantities, or prices. It ensures users enter valid numbers and can enforce constraints like minimum and maximum values.
Boolean
Boolean input fields capture binary choices (true/false, yes/no) using checkboxes or toggles. They are useful for preferences like agreeing to terms or subscribing to newsletters.
Static Dropdown
Static dropdown fields provide a fixed list of options, ensuring consistent data entry. They are ideal for selections like country or status, offering users a predefined list to choose from.
Input Group
Input groups are collections of related input fields under one label, useful for capturing complex data like addresses or contact information. They help organize related data, making forms more user-friendly.
Default
The default value sets the initial content of an input field, providing users with a hint or example of the expected input. This improves form usability and ensures data consistency.
Click here. to know more about static input fields.
Click here. for instructions on adding input fields in JSON when creating a plugin and action.
Advanced Input Fields
Advanced input fields enhance the user experience by offering more functionality and flexibility in data collection. They address specific needs beyond basic input fields, improving data accuracy and usability. Here are some key types of advanced input fields:
Dynamic Dropdown
A dropdown menu is a UI element that displays a list of options when clicked. Users can select a single value from here. Children here are dynamically fetched via a source. The source here is a JavaScript code that runs and gives the dynamic option. Here is the data type to render dropdown fields in the plugin. Check source section to for more details on source.
Dynamic Multiselect
A multiselect is a tool that lets you pick multiple options from a list at the same time. Children here are dynamically fetched via a source. The source here is a JavaScript code that runs and gives the dynamic option. Here is the data type to render multiselect fields in the plugin. Check source section to for more details on source.
Hidden Fields
This field type is used to hide other fields based on value selected from its children, the key fieldsToHide will have a mapping of children key corresponding to which other keys of the parent json will be hidden on that children being selected.
Help Text
Help text provides additional instructions or examples near input fields, reducing user confusion and errors. It ensures users understand how to complete each field correctly, improving the overall user experience.
Dictionary
It helps you organize and store information using pairs of related data. Each pair consists of a unique key and a value. In this data type, we define the keys and values template. This template allows the user to define the datatype of individual input fields.
Dynamic Input Groups
Dynamic input groups allow users to add or remove sets of related input fields as needed. This feature enhances flexibility by letting users modify the form structure, such as adding multiple phone numbers or email addresses dynamically.
To know more about adding these input fields in any action or trigger, Click here.
This document provides an extensive explanation of creating dynamic input fields for plugins. For knowing the Json structure of all these fields go to their corresponding pages.
Plugin Input Fields
Actions/Triggers in plugins require an input form because they always need a way for users to send data to your app’s API to find, update, or create a new object. Syntax to create static type fields through JSON are as follow:
string :
number:
Static input group:
When designing APIs or building user interfaces that interact with APIs, it's crucial to inform users about default values, especially if these defaults may impact the behavior of the system or the data processing. User can edit this default value
For string/number/boolean
For dropdown
Static input fields
Useful in scenarios where users need to select multiple items, such as tags, categories, or preferences in such cases enables users to make multiple selections from a set of options. So this is an array with a comma-separated list of entries sent in the API request. Do not ask users to type this manually use the built-in functionality instead.
Multiselect values with static children
Multiselect values with dynamic children refer to a feature in dropdown menus where the options available for selection change based on API. For this JSON looks the same but a new key is added called “source”.
The source API includes a JavaScript call to fetch the required data. Once retrieved, the data is shown in the dropdown as an array of objects, each containing a label, sample, and value for the child options. Example : If you want to create sites multiselect dropdown for webflow application so this is what you have to integrate:
Take a get API for get all sites from webflow API documentation
Configure it in javascript API call code
Return a object containing label,sample,value for all sites
This code can be added through the GUI or via JSON by including a key "source" with the escaped code as its value.Use EscapeJSON to properly format the code for JSON.
Response :
On selecting multiple value from the dropdown, it returns an array of that field and comma separated values in it. To use this value in the entire action , the path is ${context.inputData.fieldName} :
Dynamic multiselect
We are excited to invite you to integrate and test your app on viaSocket, a powerful workflow automation tool.
- Sign Up: Create an account on viaSocket.
- Promo Code: Use the promo code provided by us to access premium features.
- Test Your Integration:
- When - Trigger: Test how your app initiates workflows.
- Do - Action: Test how your app responds within workflows.
For instance, if your app is an email marketing tool, you might test triggers like “New Subscriber” and actions like “Send Welcome Email.”
Detailed Testing Checklist
Testing Triggers
- Search Your App: Look for your app on our “App Integrations” page. Verify that your app’s name and logo are correct.
- Select Trigger: Choose the trigger you want to test first.
- Authentication: Ensure that all triggers have the correct type of authentication.
- Description: Check the description of each trigger to ensure accuracy.
- Fields Verification: Verify all the fields in each trigger.
- API Response: Check the APIs' responses in the response block.
- Testing Multiple Triggers: You can test all your triggers from the same flow by clicking on “Change” beside the trigger name in the slider. Once authenticated, you can continue with the same authentication.
- Further Testing: Use any of our in-built tools or your own app’s actions to test further.
Testing Actions
- Create a Flow: Start with a Webhook or Cron as the trigger. You can also use your own app's triggers.
- Select Action: Choose the action you want to test first.
- Authentication: Ensure that all actions have the correct type of authentication.
- Description: Check the description of each action to ensure accuracy.
- Fields Verification: Verify all the fields in each action.
- API Response: Check the APIs' responses in the response block.
- Testing Multiple Actions: Continue adding all the actions of your app in the same flow. Once authenticated, you can continue with the same authentication.
After you’ve tested your integration, you might have suggestions for improvements or additional Triggers and Actions you want to implement.
Please reach out to us at plugs@viasocket.com with your feedback and requests.
Featuring Your App
We’re committed to showcasing our integrations prominently. Once your integration is verified, we will feature your app on our website at viaSocket Integrations.
We will also create a dedicated page for your app at viaSocket/integrations/[your_app].
For example, https://viasocket.com/integrations/emailoctopus.
Highlighting Popular Use Cases
We know that showcasing real-world applications of your integration is vital. On your app's dedicated page, we will feature popular use cases. We invite you to share with us the combinations and use cases you want highlighted. You can email these details to us, and we will ensure they are prominently displayed.
Promotion and Collaboration
Our promotional efforts extend beyond our website. We actively post about new integrations and popular use cases on social media and include them in our email newsletters. If you have specific use cases you want us to promote, let us know, and we will include them in our communications. Additionally, we can provide you with images and content to share with your own audience.
Final Steps
Once you have completed the testing and verification, we will publish your app on our tool and website.
Thank you for partnering with us. We look forward to seeing the innovative ways in which your app can integrate with viaSocket.
For any queries, feel free to contact us at plugs@viasocket.com.
Let's make automation smarter together! 🚀
Test Your App Integr...
This API is responsible for executing the primary action defined in a plugin. When users configure an action, the Final Perform API handles the actual process of sending or receiving data to the target application or service and performing the desired operation, such as creating, updating,getting or deleting records.
For example if creating a action “new entry” in Google Sheets plugin, the Final Perform API will:
Collect data from the input form. The input fields which are created from JSON or GUI we have to collect the data and send it in the api where needed using ${context.inputData.fielfName}.
For example: If Json Have fields username,email,phone to access them in final perform API use field key.
In google API docs a API is defined to create a new record in the sheet, make javascript code for that API call and Send above collected data to the Google Sheets API. For include authentication use: ${context.authData.access_token/fieldName}
Include input fields use : ${context.inputData.fieldName}
Save the API code. For Testing the Api you can run code by clicking the “Test” button. Viasocket also provide option to optimize your code you can optimize your code by clicking “optimize” button
API Configuration
A dictionary, also known as a hash map or associative array, is a data structure that stores key-value pairs. Each key is unique and maps to a specific value. In viaSocket, a dictionary is a field type that allows users to add custom key-value pairs, providing flexibility for various use cases.
📌For example this is particularly useful for actions like creating entries in a CRM, where users might need to add custom fields based on their specific requirements. Dictionary looks like :
🔴Note : Dictionary does not support dynamic API calls for children. Field types supported in the dictionary are string,number,boolean,and dropdown.
The JSON for creating a dictionary field includes a new keyword “template”, which defines the structure of key-value pairs. Key objects hold attributes for the left pair and value is for the right pair.
Return a object containing key and value for given pairs
key is used to access this specific column value ex: ${context.inputData.dictionaryName.key}
Dictionary
A dynamic input group is a set of input fields that can be added, removed, or modified in real-time based on user interactions or API response . This feature allows for the creation of optional fields and can hide them when not in use, providing flexibility and enhancing user experience.
📌For example When creating a new record in an airtable, dynamically fetch and display columns inside an input group. Users can then input data only into the columns they need, making the process efficient and user-friendly using following steps and achieve result :
Take a get API for get all columns from airtable API documentation
Configure it in javascript API call code
Return an array containing a object containing key,label,type,help for columns
key is used to access this specific column value ex: ${context.inputData.inputgroupName.coloumnName}
Label shown on the UI
type decide type of the field using if condition in input group source code you can change type for a field also
help text can be static or dynamic. Handle source code
This code can be added through the GUI or via JSON by including a key “source” with the escaped code as its value. Use EscapeJSON to properly format the code for JSON.
Response :
it returns a key-value pair. If the key for the column is "name", the returned value will be in the format {site: "site_id"}. To use this value, the path is ${context.inputData.inputgroupName.coloumnName}:
Dynamic Input group
A dynamic dropdown updates its options in real-time based on user interactions or API. The values are fetched from an API using a JavaScript call, and the data is displayed as an array of objects, each containing a label, sample, and value. (Dropdown allows only single value to select)
The source API includes a JavaScript call to fetch the required data. Once retrieved, the data is shown in the dropdown as an array of objects, each containing a label, sample, and value for the child options. Example : If you want to create sites dropdown for webflow application so this is what you have to integrate :
Take a get API for get all sites from webflow API documentation
Configure it in javascript API call code
Return a object containing label,sample,value for all sites
This code can be added through the GUI or via JSON by including a key “source” with the escaped code as its value. Use EscapeJSON to properly format the code for JSON.
Response :
On selecting a value from the dropdown, it returns a key-value pair. If the key for sites is "site", the returned value will be in the format {site: "site_id"}. To use this value, the path is ${context.inputData.site} :
Dynamic dropdown
Dynamic help text is a contextual help popup shown to users based on specific conditions handled in the source code. When these conditions occur, the help text provides guidance to help users understand the plugin's behavior. In short dynamic help text provides real-time feedback based on user interactions.
📌For example, if you're creating an action for Google Sheets to create a new entry, you can use dynamic help text to alert the user if the selected sheet has no columns, making it easy for the user to understand and debug the issue.
Take a get API for get all columns of sheet(example) from google API documentation
Configure it in javascript API call code
Return an array containing label,key,type,help etc for all column, with this add a condition in code if condition not fulfilled return empty array in children and message
This code can be added through the GUI or via JSON by including a key “source” with the escaped code as its value. Use EscapeJSON to properly format the code for JSON.
Dynamic Help Text
🔴Note : Hidden Fields does not support dynamic API calls for children.
Hidden Fields: Use the “hidefields”type to make fields invisible while passing necessary data.
Conditional Hidden Fields: Use “fieldsToHide”to hide fields based on conditions from other fields.
Dropdown Children: Condition applicable on dropdown children. If nothing is selected in the dropdown all the fields are visible to the user.
Show fields based on selected field:
Hidden Fields
If you want to make an app for viaSocket or you want to call its API then you may need its authentication.
Contact us at support@viasocket.com to generate your Client ID and Client secret or use this API to generate https://techdoc.viasocket.com/p/0WvNcdDId/e/wzRzn6tQr/ViasocketThis client ID and secret are organisation wise. Every organisation gets one unique client id.
ORG id - Get it from URL like
title - Name of your Auth, could be anything.
To make this API work, login and then click on Run.
NEXT Step (Authorization URL) -
we will redirect to your redirect URL with Access token redirect_URL?code=<code>&any additional query param found in above url
Whitelist redirect URL at viasocket
https://techdoc.viasocket.com/p/0WvNcdDId/e/ei1ucyviF/Viasocket
Next (Token URL) ->
https://dev-api.viasocket.com/oauth/v1/token
Detail documentation
https://techdoc.viasocket.com/p/0WvNcdDId/e/hiAA0hsMf/Viasocket
You call our backend API from your backend with Client secret to generate Access token