viaSocket Help

Scheduled Triggers

#

What it does

Scheduled Trigger runs your workflow at regular time intervals.

👉 It keeps checking your app for new data
👉 If something new is found → workflow runs


#

Simple understanding

👉 No real-time updates
👉 viaSocket checks again and again

Example:

  • Check every 5 minutes

  • If new data → run workflow


#

When to use

Use this when your app does NOT support webhooks

👉 No instant trigger available
👉 Data needs to be checked manually


#

How it works

  1. You set a time interval

  2. viaSocket calls your API repeatedly

  3. It checks for new or updated data

  4. If found → workflow starts


#

Real examples

  • New row in Google Sheet → every 5 min

  • New lead in CRM → every 10 min

  • New order → every 15 min


#

⚙️ Setup (What you actually need to do)

#

Step 1 — Choose Scheduled Trigger

👉 Select Scheduled Trigger in Trigger Type

Screenshot 2026-04-04 at 2.46.21 PM.png
#

Step 2 — Set Interval

👉 Choose how often to check

Examples:

  • Every 5 minutes

  • Every 10 minutes

⚠️ Faster interval = more API usage


#

Step 3 — Configure API (Perform)

👉 This is the API that fetches data

👉 It should return:

  • Latest records

  • Or recently updated data

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”


#

Step 4 — Add Sample Data (Perform List)

👉 Used for testing

👉 Helps viaSocket understand:

  • What data looks like

  • What fields to pass forward


#

5. Transfer Data (Optional)

#

What it is

Transfer Data allows you to use existing (historical) data instead of only new events.


#

What it means in simple terms

Normally:

👉 Trigger runs → only new data is processed

With Transfer:

👉 You can also use past data that already exists


#

What it does

  • Lets you run workflows on old data

  • Enables bulk processing

  • Useful for data migration or syncing

#

When to use this

  • You want to process existing records

  • You need bulk operations

  • You are migrating or syncing data


#

💡 Simple Flow

👉 Subscribe → Receive data → (Optional modify) → Send to workflowHow It Works