FAQ
Plugin Builder
Triggers

Triggers

What is a Trigger?

A trigger is the starting point of a workflow. It listens for a specific event—like a new form submission, a CRM update, or a scheduled interval—and automatically kicks off a series of actions.

Think of it as the “when” in your automation:
“When this happens → do that.”


Use Cases

  • When a new lead is added in your CRM

  • When a payment is received via your payment gateway

  • Every 5 minutes, check for new rows in a Google Sheet

  • When a webhook is called by your app


Types of Triggers

viaSocket supports two types of triggers:


Instant Trigger (Webhook-based)

Listens for real-time events from external apps via a webhook.

How it works:

  • You subscribe to an event using an API

  • viaSocket receives the event when it occurs

  • Your workflow runs instantly

For Detailed Steps, Click here


Scheduled Trigger (Polling-based)

Checks for new data from your API at regular intervals.

How it works:

  • You define the polling frequency (e.g. every 5 mins)

  • viaSocket fetches new data via API

  • If new data is found, the workflow begins

For Detailed Steps, Click here


Trigger Logic Behind the Scenes

  • You configure input fields and test APIs

  • Output is used to pass data to the next step

  • Triggers can also use headers, tokens, or context variables (e.g., context.authData)


Testing Your Trigger

viaSocket allows you to:

  • Preview sample data from your API

  • Simulate the trigger with test responses

  • Monitor logs and troubleshoot in real time

Instant Triggers in viaSocket

Instant Triggers allow your workflow to respond in real-time whenever an event occurs in another app. These are powered by webhooks, which are automatic data notifications sent from your app to viaSocket.


How It Works

  • Your app is configured to send a webhook whenever a specific event happens (e.g., a new user signs up, a payment is made, or a task is completed).

  • viaSocket receives the webhook instantly at a designated endpoint.

  • The corresponding workflow is triggered immediately—no delay, no polling.


What Are Webhooks?

A webhook is an HTTP callback—essentially a message sent from one app to another when something happens.

In this case:

  • Your app → sends data to → viaSocket

  • The data is sent in JSON format via POST request

  • viaSocket parses it and kicks off the linked workflow


Use Cases

  • New order placed → Send confirmation email via Gmail

  • New contact added in CRM → Trigger Slack notification

  • Form submission → Save data to Google Sheets

  • Helpdesk ticket created → Assign to agent + send SMS


Setting Up an Instant Trigger in viaSocket

You will configure:

  • Input fields: for dynamic API mapping

  • Subscribe API: tells your app to start sending data to viaSocket’s webhook

  • Perform List: sample response for testing

  • Perform: endpoint to process the incoming webhook data

  • Unsubscribe API (optional): tells your app to stop sending webhooks

  • Transfer Data: passes data to the next step in your workflow


Best Practices

  • Always test with real sample data using the Perform List API

  • Use unique webhook URLs per user when supported

  • Secure your webhook with auth headers or signature validation

  • Monitor the logs tab in viaSocket to debug incoming payloads

Instant Trigger Demo
Instant Trigger Demo

Click through a step-by-step, interactive demo walkthrough of Viasocket, powered by Supademo.

https://app.supademo.com/embed/cm67grs0300akyvdwuu63y36b?embed_v=2

Instant Triggers
Aug 1, 2025

Scheduled Triggers let you run workflows on a recurring basis by polling an API at regular intervals. They're perfect for apps that don't support webhooks or where real-time events aren’t available.


How It Works

  • viaSocket calls your configured API endpoint every few minutes

  • If new or updated data is found, it starts the workflow

  • This happens per active workflow, automatically

🔄 The polling frequency depends on the user’s pricing plan—typically every 5 to 15 minutes


Use Cases

  • Check for new rows in a Google Sheet or Airtable

  • Pull updated leads from your CRM every 10 mins

  • Sync newly created records from any API-based app


Smart Filtering with __executionStartTime__

viaSocket gives you a built-in variable called __executionStartTime__—this represents the exact timestamp when the scheduled trigger runs.

You can use it to fetch only new data since the last run.


Example: Get Records X Minutes Ago

Use this logic in your API request logic to filter results:

const minutesAgo = new Date(__executionStartTime__ - context?.inputData?.scheduledTime * 60 * 1000);
  • __executionStartTime__ → the current run’s timestamp

  • context?.inputData?.scheduledTime → user-defined interval (e.g., 10 minutes)

  • minutesAgo → gives the timestamp for “X minutes ago”

Now you can query your API for records created after minutesAgo.

Scheduled Trigger Demo
Scheduled Trigger Demo

Click through a step-by-step, interactive demo walkthrough of Viasocket, powered by Supademo.

https://app.supademo.com/embed/cm66g55s9055e1xdhbwfas6oa?embed_v=2

Scheduled Triggers
Aug 1, 2025