viaSocket Help

Scheduled Triggers

Use this trigger for apps that do not support webhooks, enabling the platform to poll for data at set intervals.

#

Configuration Steps

  1. Interval: Choose the frequency for checking (e.g., Every 5 minutes). Note: Faster intervals increase API usage.

  2. API Configuration: Provide the endpoint to fetch the latest or recently updated records.

  3. Data Filtering: Use the executionStartTime variable to request only new data since the last run.

  4. Sample Data: Provide a JSON payload to help the builder understand field mapping.

  5. Transfer Data: (Optional) Enable to process historical records for bulk sync or migration.

#

Implementation Logic

Use executionStartTime to fetch data incrementally.

// Filter logic example:
const minutesAgo = new Date(__executionStartTime__ - context?.inputData?.scheduledTime * 60 * 1000);
#

Technical Solution

Challenge

Solution

Duplicate Events

Use unique event_id keys to deduplicate records.

Rate Limits

Implement exponential backoff in your API logic.

Historical Data

Enable Transfer Data for initial bulk sync.

💡 Best Practice: Always provide a Sample Data JSON payload. Without it, users cannot map fields, which will break your integration.