Skip to content

Running Workflows

workflows can be ran in a variety of ways, depending on their trigger type. Now matter how complicated the integration may be, there is surely a workflow trigger that will work for your use case. On occasion, you may want to utilize multiple workflows!

System Events

As mentioned earlier, system events is the ubiquitous workflow trigger. These triggers allow you to directly react to user inputs within the VibeIQ app. You can not control when a system event is triggered, but you can mock it using Manual Triggers.

External Events

External events allow you to react to (you guessed it) external events from other systems. They are triggered via an API call to our (you guessed it again) external events service. The external events trigger goes through an authentication process, requiring an App API token. In this way, external events are tightly coupled with App development.

curl --request POST \
    --url https://api.vibeiq.com/prod/api/external-events \
    --header 'Content-Type: application/json' \
    --header 'X-Api-Key: API_KEY' \
    --header 'X-Api-Org: ORG_KEY' \
    --data '{
        "details": {
            "eventType": "load"
        },
        "actionType": "imageLoad"
    }'
import {Entities} from "@contrail/sdk";
await new Entities().create({
        entityName: 'external-event',
        object: {
          details: {
            eventType: "load",
          },
          actionType: "imageLoad"
        },
    });

Webhook

Webhooks are a special integration tool in the VibeIQ platform that allow you to hook into and react to events in external systems.

Webhooks bypass the token-based authentication protocol entirely, and really on the developer to authorize the caller accordingly. The most common pattern is using one half of a symmetrical encryption key in the header, and verifying the signature in your app’s action. Sadly, webhooks are not a standardized protocol of W3 yet, so we can only suggest best practices here. Code Safely!

Learn about creating webhooks.

Scheduled Trigger

Some workflows were born to be CRON tasks. We offer first party support for CRON scheduling of workflows out of the box.

To create a schedule for a workflow, go to Schedules in the side menu and click on the “+ New” button. Add a name, the run frequency, and select the workflow you’d like to run. Scheduled can be disabled and enabled, without deleting them.

CRON jobs are limited at a 5 minute granularity. For example a CRON of * * * * * (translates to runs every minute) still only runs once every 5 minutes.

Manual Trigger

Every workflow, regardless of the trigger type, can be ran via a manual trigger. You can pass custom event data to the manual trigger. This is useful when testing expected behavior of your workflow or debugging issues with the workflow.