Automations

Automate Workflows and Pipeline Runs

Note: Automations currently must be created through the VectorShift website, but you can still interact with and configure your automations via the SDK.

Similar to other VectorShift objects, interacting with automations also require API keys. If the API keys have already been set as environment variables, they do not need to be supplied in those methods. The output of all methods invoking APIs is a dictionary representing the API JSON response.

vectorshift.automation.Automation(
    id: str,
    name: str,
    description: str,
    app: str,
    event: str,
    trigger: str,
    pipeline: dict,
    mappings: list,
)

Represents an automation object. Note: To work with automation objects, we suggest using the fetch and fetch_all methods instead.

Arguments:

  • id: The id of the automation.

  • name: The name of the automation.

  • description: A brief description of the automation.

  • app: The integration or application associated with the automation.

  • event: The type of trigger that sets off the trigger.

  • trigger: The actual trigger that kicks off a pipeline run.

  • pipeline: The associated pipeline for this automation that is to be run ever time the automation is triggered.

  • mappings: A mapping between the fields provided by the automation and the pipeline inputs of your selected pipeline.

fetch_all(
    api_key: str = None, 
)

A method fetch all the automation you have in your account.

Arguments:

  • api_key: The VectorShift API key.

fetch(
    automation_id: Optional[str] = None,
    automation_name: Optional[str] = None,
    api_key: str = None, 
)

A method to fetch a specific automation.

Arguments:

  • automation_id: The id of the automation.

  • automation_name: The name of the automation you want to fetch.

  • api_key: The VectorShift API key.

delete(
    api_key: str = None, 
)

A method that deletes your automation.

Arguments:

  • api_key: The VectorShift API key.

get_apps(
    api_key: str = None, 
)

A method that retrieves all the apps you can select when creating a new automation.

Arguments:

  • api_key: The VectorShift API key.

get_events(
    app_id: str,
    api_key: str = None, 
)

A method that retrieves all the types of events that are valid for a given app.

Arguments:

  • app_id: The id of the application you wish to use for your automation.

  • api_key: The VectorShift API key.

get_triggers(
    app_id: str,
    event: str,
    api_key: str = None, 
)

A method to sync all the documents in all vector stores that contain the associated integration.

Arguments:

  • app_id: The id of the application you wish to use for your automation.

  • event: The type of event you have selected to trigger your automation.

  • api_key: The VectorShift API key.

get_payloads(
    api_key: str = None, 
)

A method that retrieves a payload associated with an automation (commonly a webhook).

Arguments:

  • api_key: The VectorShift API key.

deploy(
    active: bool,
    api_key: str = None, 
)

A method to toggle an automation to be active/inactive.

Arguments:

  • active: The status of your automation.

  • api_key: The VectorShift API key.

get_apps(
    api_key: str = None, 
)

A method to sync all the documents in all vector stores that contain the associated integration.

Arguments:

  • api_key: The VectorShift API key.

process_payloads(
    api_key: str = None,
)

A method to run the pipeline associated with your automation and to process the payloads you have received already.

Arguments:

  • api_key: The VectorShift API key.

Last updated