How to create Triggers


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: 

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.

For instant triggers webhook are used. 

🔴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

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.