Creating a Workflow

Workflows allow you to automate running sequential actions and development workflows based on contextual data that exist inside your workspace. On this page, learn how to create a Workflow in the Cortex UI.

For information on creating Workflows via GitOps, see Workflows as code.

How to create a Workflow

Prerequisites

Before getting started:

  • You must have the Edit Workflows permission.

  • If you plan to manage Workflows in the UI, make sure GitOps editing is disabled under Settings > GitOps > Workflows.

Understanding RBAC for Workflows

It is possible to configure specific users, teams, or roles who are allowed to run a Workflow, or you can require the user to be an Owner or Editor of an entity in order to run the Workflow. This is described in more detail under Step 2: Configure your Workflow settings.

It is also possible to add a "Manual approval" block to your Workflow, requiring approval from specific team members. Read more about configuring this under Step 3: Add blocks to your Workflow.

Step 1: Choose a template or a blank Workflow

You can choose to create a Workflow from a template or you can choose to create one from scratch.

  1. In the lefthand navigation menu of Cortex, click Workflows.

  2. In the upper right corner of the page, click Create Workflow.

  3. Choose whether to start with a template or a blank workflow.

    • Workflow Template: Click the tile for the template you wish to use.

      • There are templates available for the following common Workflows: Create a AWS S3 bucket, create an AWS EC2 instance, create a ServiceNow incident, create an Azure function, and create a Jira issue.

      • Note: Each tile displays the requirements for secrets you must define before using the template; make sure to follow the template's requirements before you proceed.

    • Blank Scorecard: Click the "Blank Workflow" tile at the top of the page.

Step 2: Configure your Workflow settings

  1. On the Create Workflow page, fill in the fields to configure your Workflow. The name, slug, and description are prepopulated for templates.

    • Name: Enter a descriptive name for your Workflow.

    • Slug: Enter a unique slug. If you have previously used a template, make sure to update the prepopulated slug when you use the template again.

    • Description: Optionally enter a description of the Workflow.

    • Display icon: Select an icon that will be used when displaying this Workflow across Cortex.

    • Run response template: Optionally enter a response template.

    • Scope: Select Entity to narrow the Workflow's scope to a specific entity, or select Global if the Workflow should not be scoped to a specific entity.

      • If you choose Entity:

        • Entity Type: Select the entity type that this Workflow applies to.

          • Optionally, you can also choose groups to include or exclude.

        • User relation to entities: Specify the relation to the entity that the user running the Workflow must have in order to run the Workflow. You can require the user to be an Owner or an Editor of the entity in order to run the Workflow. If you choose Editor, you must have the Team ownership entity setting enabled.

  2. Optionally, if you want to first save this Workflow as a draft, toggle on Save as draft at the top of the page.

    • When a Workflow is saved as a draft, it is only visible to users with the Workflow edit permission.

  3. By default, a Workflow will be visible to all users in your organization who have permission to view Workflows. If you want to adjust view permissions for your Workflow:

    1. Click Access at the top of the page.

    2. Turn off the toggle for Organization access.

    3. Configure the users, teams, or roles who should have access to your Workflow.

      • In order for a user to run the Workflow, they must have the Workflow runs execute permission and they must match at least one of the users, teams, or roles that you specify here.

    4. Click Apply.

  4. At the top of the page, click Save Workflow.

Step 3.1: Add blocks to your Workflow

Workflows are made of individual blocks, which are each responsible for a specific task when a Workflow is run. Cortex provides a library of blocks to choose from, including core blocks, Cortex-based blocks, and integration-related blocks.

To add a block to your Workflow:

  1. Click + in the Workflow visual in the center of the page.

  2. Choose the type of block.

Click the + in the center of the Workflow page to start adding blocks.
Click + to add a block

Step 3.2: Configure the blocks in your Workflow

For instructions specific to each type of block, see the Blocks documentation.

Additional information on blocks

To learn about using request signing with blocks, duplicating a block, and templating a block, see the Blocks documentation.

For information on referencing previous blocks and Workflow states, see Referencing Workflow state in a block.

Next step: Running a Workflow

To learn more, see Running a Workflow.

Last updated

Was this helpful?