Skip to main content

Cinchy Automations

tip

Cinchy Automations and the Cinchy Scheduler were added to the platform in v5.11.

Cinchy Automations is a platform tool that allows users to schedule various tasks along a configurable frequency. To reduce the time and manual effort spent on reoccurring tasks, you can now tell Cinchy to perform the following automatically:

  • Executing queries
  • Triggering batch syncs
  • Extracting and running a code bundle, which can contain any number of queries or syncs needed to perform a task.

Using the Automations capability, you can also build an automation that performs multiple tasks in sequence (known as "Automation Steps") to allow for more complex use cases.

Prerequisites

  • Cinchy Automation and Scheduler only works on a Kubernetes deployment of the platform.
    • Customers on IIS are recommended to use Windows Scheduler for their use case
  • Cinchy v5.11+ is required.

Important Terms

  • Automation: A bundle of 1 or more steps that are executed via the Cinchy Scheduler, on-demand, or manually.
  • Automation Steps: A step denotes an individual task that will be performed. Ex: Executing a function can be one step.
  • Automation Package: A package is a way to group Automations together either under a domain or a data product. For example, Automations related to Sales Leads might be packaged under a "Leads Analysis" package.
  • Schedules: The reoccurring frequency in which an Automation is run. This can be minutes, hours, bi-weekly, etc. Schedules use Debian Cron syntax.

Workflow

The general workflow of creating an automation is:

  • Define your outcome. This can be the execution of a query, the triggering of a batch sync, or the running of a code bundle. Once you have defined this, you must create the appropriate objects (i.e. create your query, configure your data sync, or prepare a code bundle zip file.)
  • (If required) Create your Automation Package via the [Cinchy].[Automation Packages] table. You may not need to create a new package for every Automation.
  • Create your Automation via the [Cinchy].[Automations] table.
  • Create your Automation Step(s) via the [Cinchy].[Automation Steps] table. Each Automation needs at least 1 step.
  • Enable your Automation.
  • Track your Automation execution via the [Cinchy].[Automation Execution History] table and the [Cinchy].[Automation Steps Execution History] table.

New Objects

The following objects are automatically deployed to a v5.11+ Cinchy platform.

info

The breakdown of each individual table column can be found in Appendix A.

Object NameObject TypeDescription
AutomationsTableThis table houses all of the Automations in your environment.
Automation StepsTableThis table houses all of the steps that make up the various Automations in your environment.
Automation PackagesTableThe Automation Packages table is used to group Automations together by which domain/data product they belong to.
SchedulesTableYou can set your Automation to run on a scheduled frequency, and these schedule options are housed in this table. It comes pre-loaded with a variety of common frequencies and you have the ability to add in others as needed.
DurationsTableThe durations table is used when configuring the Max Execution Time and SLA columns within the Automations table. It comes pre-loaded with a variety of common durations and you have the ability to add in others as needed.
Automation Execution HistoryTableThis table can be used to review the execution history of your Automations, including any exceptions that may occur.
Automation Steps Execution HistoryTableThis table can be used to review the execution history of individual steps, including any exceptions that may occur.
automations@cinchy.comUserThis user account is used to trigger Automations. All steps are run under this user unless a PAT is specified when building the automation.
cinchy_automationsIntegrated ClientThe Automations integrated client is used when authenticated your Automation tasks, as required.

Create an Automation

This section will guide you through the creation of an example Automation.

Example use case: To monitor for project risk levels, you combine the following query and data sync to run daily:

  • A saved query is executed on a [Project] table that updates a "Risk" column based on the number of days between the current date and a "Project Due Date" column.
  • A data sync runs and filters for any rows with the "Risk" column set to high. It syncs the filtered data into an [Urgent Tasks] table.

Create Objects

The example objects used in this scenario are:

  • A saved query, ex: "Due Date Risk"
  • A data sync, ex: "Project > Tasks sync"

Create the Package

For this example we will be creating a new Automations Package to hold the Automation.

  1. Navigate to the [Cinchy].[Automation Packages] table.
  2. Insert the following data in a new row to create the package:
    1. Name: Project Management
    2. Description: Contains the Automations related to projects.
    3. Domain: Product

Create the Automation

  1. Navigate to the [Cinchy].[Automations] table.
  2. Insert the following data in a new row to create the automation:
    1. Package: Project Management
    2. Name: Project Risk Automation
    3. Description: This automation helps monitor the risk level for projects
    4. Enabled: Set this to false/unchecked until you are ready to start the Automation
    5. Schedule: At 1am every day
    6. Schedule Strategy: Cinchy Scheduler
    7. Concurrency Policy: Ignore
    8. SLA: 1 hour
    9. Max Execution Time: 30 minutes
tip

If needed, you can create a new schedule value in the [Cinchy].[Schedules] table.

If needed, you can also create new SLA and/or Max Execution Time values in the [Cinchy].[Durations] table.

Create the Automation Steps

  1. Navigate to the [Cinchy].[Automation Steps] table.
  2. Insert the following data in a new row to create the first step:
    1. Automation: Project Risk Automation
    2. Sequence: 1
    3. Description: Sets the risk level of the project based on number of days until due date.
    4. Saved Query: "Due Date Risk"
    5. SLA: 1 hour
    6. Max Execution Time: 5 minutes
  3. Repeat with another row to create the second step:
    1. Automation: Project Risk Automation
    2. Sequence: 2
    3. Description: Syncs at risk projects into the tasks table.
    4. Data Sync Configuration: "Project > Tasks sync"
    5. SLA: 1 hour
    6. Max Execution Time: 10 minutes

At this point, you can return to the [Cinchy].[Automations] table and enable your Automation.

As needed, refer to the [Cinchy].[Automation Execution History] and [Cinchy].[Automation Steps Execution History] tables to monitor the execution of your Automation.

Appendix A - Table Columns

This section breaks down the column definitions for certain tables used in the Automations process.

Automation Packages Table

Column NameColumn DefinitionExample
NameMandatory. A unique name for the package.Project Management
DescriptionA description of the package.Contains the Automations related to projects.
DomainMandatory. The domain where your package is contained.Product

Automations Table

Column NameColumn DefinitionExample
PackageMandatory. Select the package you want to group your Automation under. This column links to the [Cinchy].[Automation Packages] table.Project Management
NameMandatory. The name of your Automation.Project Risk Automation
DescriptionA brief description of your Automation.Sets the risk level of the project based on number of days until due date.
EnabledSets whether the Automation will execute or not.Enabled
ScheduleMandatory. Sets the frequency at which the Automation will execute.At 1am every day
Schedule StrategyMandatory. Sets how the Automation is executed. This value is either:

- Cinchy Scheduler (will be executed automatically based on the frequency configured above)
- Manual (a non-query/sync/code bundle task that a user is notified to execute manually)
- Run on Demand (a query, sync, or code bundle that a user is notified to execute manually)
Cinchy Scheduler
Concurrency PolicyMandatory. Sets how the scheduler handles concurrent executions of the Automation. This can be either:

- Ignore: Proceed with the new Automation independently of the previous one.
- Wait: Delay the new Automation until the previous one completes. This ensures a sequential execution.
- Skip: Bypass the new Automation if a previous one is running.
Ignore
SLAMandatory. The Service Level Agreement associated with the Automation. This value is linked from the [Cinchy].[Durations] table.1 hour
Max Execution TimeMandatory. The maximum amount of time the Automation will run before aborting execution. This value is linked from the [Cinchy].[Durations] table.30 minutes

Automation Steps Table

Column NameColumn DefinitionExample
AutomationMandatory. Select the Automation that this step will execute as part of. This column links to the [Cinchy].[Automations] table.Project Risk Automation
SequenceThe order in which the step will take in the Automation. A sequence value of "1" will execute first. Note: If no sequence is set (or multiple steps are set to the same sequence), the Automation will run the steps in alphanumeric order based on the Description value.1
DescriptionA brief description of your Automation Step.Runs the "Due Date Risk" query.
Data Sync ConfigurationIf the step runs a batch sync, enter the name of the data sync here. This value links to the [Cinchy].[Data Sync Configurations] table."Projects > Task sync"
Saved QueryIf the step executes a query, enter the name of the saved query here. This value links to the [Cinchy].[Saved Queries] table."Due Date Risk"
Code BundleIf the step extracts and runs a code bundle, attach the .zip file here.RiskManagement.zip
Code Bundle CommandIf the step uses a Code Bundle, you must specify a command to execute it. This value expects a linux command (Ex: Powershell/Python/Bash)
Personal Access TokenBy default, Automation Steps are run as the admin-level Automation user account. If desired, you can instead specify a Personal Access Token for an account you want to run the step instead. The PAT must be configured as a secret in the [Cinchy].[Secrets] table first. Note that the PAT user must also have the entitlements to run the query/execute the data sync, if necessary.PAT1
Continue on FailureSetting this value to true will tell the Automation to continue with subsequent steps in the sequence even if this specific step fails to execute.False
SLAMandatory. The Service Level Agreement associated with the Automation Step. This value is linked from the [Cinchy].[Durations] table.1 hour
Max Execution TimeMandatory. The maximum amount of time the Automation Step will run before aborting execution. This value is linked from the [Cinchy].[Durations] table.10 minutes