# LLM Connections Source: https://docs.openops.com/ai-assistance/llm-connections How to integrate OpenOps with an LLM provider of your choice Using [AI assistance](/ai-assistance/overview) in OpenOps requires enabling AI in OpenOps settings and configuring at least one connection to a large language model (LLM) provider. ## Configuring an LLM connection To enable AI and configure an LLM connection: 1. In the OpenOps left sidebar, click the **Settings** icon at the bottom: 2. In the **Settings** view, click **OpenOps AI**: OpenOps AI settings 3. Under **AI Connection**, click the dropdown and select **Create new connection**. The **Create AI Connection** view opens: Create AI Connection 4. In the **Provider** dropdown, select one of the supported LLM providers. Anthropic, Azure OpenAI, Cerebras, Cohere, Deep Infra, DeepSeek, Google Generative AI, Google Vertex AI, Groq, Mistral, OpenAI, OpenAI-compatible providers, Perplexity, Together.ai, and xAI Grok are currently supported. 5. In the **Model** dropdown, select one of the models your LLM provider supports. (If you're configuring Azure OpenAI, select **Custom** instead of a model and complete the other [Azure OpenAI-specific steps](#azure-openai).) 6. (Optional) If the model you're looking for is not listed, specify a custom model in the **Custom model** field. This overrides whatever you've selected under **Model**. 7. Enter your API key for the selected LLM provider in the **API Key** field. 8. (Optional) Enter a **Base URL** for the selected model. This is useful if you want to use a proxy or if your LLM provider does not use the default base URL. If you selected *OpenAI Compatible* as the provider, then you are required to enter the base URL. 9. (Optional) Use the **Provider settings** and **Model settings** fields to specify custom parameters as JSON. The JSON schema varies depending on the chosen provider and model: * See the [Azure OpenAI](#azure-openai) and [Google Vertex AI](#google-vertex-ai) instructions for custom provider settings required by these providers. * If you've selected OpenAI, use **Provider settings** for JSON you'd normally pass to the `createOpenAI` function, and **Model settings** for JSON you'd normally pass to the `streamText` function. For more details, see the [OpenAI documentation](https://platform.openai.com/docs/api-reference). 10. Click **Save** to apply your changes in the **Create AI Connection** view. 11. (Optional) Back in the **OpenOps AI** section, if you're working with AWS and you want your AI connection to have access to AWS MCP servers, go to the **MCP** section and select an [AWS connection](/cloud-access/access-levels-permissions/#aws-connections) in the **AWS Cost** dropdown: AWS Cost MCP connection This enables access to AWS Cost Explorer MCP Server, AWS Pricing MCP Server, and AWS Billing and Cost Management MCP Server. Configuring an LLM connection enables all [AI assistance features](/ai-assistance/overview) in OpenOps. ## Provider-specific settings Some LLM providers require additional configuration beyond the API key or may require non-standard settings. This section offers guidance for some of the most common providers in this category. ### Azure OpenAI When configuring an AI connection where Azure OpenAI serves as the provider: 1. In the **Model** dropdown, select **Custom**. 2. In the **Custom model** field, enter the name of a model deployment in your Azure OpenAI resource (for example, `my-gpt-5`). 3. In the **API Key** field, enter the API key from a service principal that has access to your Azure OpenAI resource. 4. In the **Provider settings** field, enter the following JSON: ```json theme={null} {"resourceName": "Azure AI resource name"} ``` The value of `resourceName` must match the name of your Azure OpenAI resource — the same name that appears in the endpoint URL, e.g. `https://.openai.azure.com/`, or, if you're using Azure AI Foundry, `https://.services.ai.azure.com/`. ### Google Vertex AI When configuring an AI connection where Google Vertex AI serves as the provider, add the following to the **Provider settings** field: ```json theme={null} {"project":"your-google-cloud-project-id","location":"global"} ``` In this JSON: * `your-google-cloud-project-id` is the ID of the Google Cloud project where your API key was created. You can look up the project ID in the Google Cloud Console by opening the project selector: Google Cloud project ID * Use `global` for `location` or, if needed, specify one of the [supported locations](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/locations#google_model_endpoint_locations) for your chosen model. # MCP Server Source: https://docs.openops.com/ai-assistance/mcp-server How to connect AI agents such as Claude Code and Codex to OpenOps OpenOps provides a Model Context Protocol (MCP) server that lets an AI agent running on your machine work with your OpenOps environment. Once connected, you can ask the agent about your workflows, runs, and connections, and have it act on them for you. The agent never receives your OpenOps password. Instead, you approve access once in your browser, and you can revoke it at any time. This page is about connecting external agents to OpenOps. For the AI assistant built into OpenOps, see [AI Assistance](/ai-assistance/overview). ## Prerequisites * An OpenOps environment with the MCP server enabled. If you administer the environment, see [Enabling the MCP server](#enabling-the-mcp-server). * A user account in that OpenOps environment. * An AI agent that can connect to remote MCP servers and sign in through your browser, such as Claude Code, Codex, or the Claude app. Throughout this page, the MCP server URL is: ```text theme={null} https:///mcp ``` Replace `` with the host you use to open OpenOps in your browser. ## Connecting your agent There are two ways to add the OpenOps MCP server to an agent: run the agent's `add` command, or add an entry to its configuration file. Both point the agent at the same URL. After adding the server, authorize it once from the agent, as described in [Authorizing access](#authorizing-access). Run the following command: ```bash theme={null} claude mcp add --transport http openops https:///mcp ``` Alternatively, add the server to `.mcp.json` in your project, or to `~/.claude.json` for all projects: ```json theme={null} { "mcpServers": { "openops": { "type": "http", "url": "https:///mcp" } } } ``` Run `/mcp` inside Claude Code and select **openops**: The /mcp server list in Claude Code Select **Authenticate**. Claude Code opens the OpenOps authorization page in your browser, where you grant access to the agent. Alternatively, run `claude mcp login openops` from your terminal. The openops server details in Claude Code with the Authenticate option To remove the server later, run `claude mcp remove openops`. Run the following commands: ```bash theme={null} codex mcp add openops --url https:///mcp codex mcp login openops ``` Alternatively, add the server to `~/.codex/config.toml` and then run `codex mcp login openops`: ```toml theme={null} [mcp_servers.openops] url = "https:///mcp" ``` Codex doesn't start the authorization flow on its own, so the `login` command is required in both cases. The Codex CLI, the Codex IDE extension, and the ChatGPT desktop app share this configuration file. In the Claude desktop or web app, go to **Settings → Connectors**, click **Add custom connector**, enter the server URL, and click **Add**. Then click **Connect** next to the OpenOps connector to authorize. To remove it later, open the connector's menu and choose **Remove**. Any client that can connect to a remote MCP server works with the same URL. Add the server the way you add other remote MCP servers in that client. ## Authorizing access When you authorize your agent for the first time: Authorize access dialog 1. When you start authorization from your agent, it opens OpenOps in your browser. If you're not logged in, log in first. 2. OpenOps shows the **Authorize access** dialog on the **Connected apps** settings page. The dialog names the application asking for access and lists what it will be able to do: * View your workflows, runs, and connections * Create and change workflows on your behalf * Run workflows and retry runs * Act in any project you have access to 3. Click **Allow access**. The browser returns control to the agent, which now has access to the OpenOps tools. To deny the request, click **Cancel** or close the dialog. **Only approve requests you started:** The dialog shows the name of the application asking for access. If you didn't start connecting from that application, click **Cancel**. Access is renewed automatically while the agent is in use. You're asked to approve again only if you disconnect the agent in [Connected apps](#managing-connected-apps), your account is deactivated, or the agent isn't used for 30 days. ## Using your agent with OpenOps Once connected, ask your agent about your OpenOps environment in plain language. For example: * "Which workflows are enabled in my OpenOps environment, and what do they do?" * "Show me the failed runs of the EBS gp2 to gp3 migration workflow from this week and explain why they failed." * "Retry the run that failed this morning." * "Which connections does the Slack notification workflow use?" * "Create a workflow that finds unattached Elastic IPs every Monday and posts them to Slack, then test the first step." (Enterprise edition) * "Switch to the Production workspace and list its workflows." (Enterprise edition) ### What the agent can do The tools available to the agent depend on your OpenOps edition. See [pricing](https://www.openops.com/pricing/) for the differences between editions. | Capability | Community | Enterprise | | - | - | - | | List and inspect workflows | Yes | Yes | | List runs, inspect run details, and retry a run | Yes | Yes | | List, inspect, and update connections | Yes | Yes | | List tables, read their columns, and query rows | Yes | Yes | | Create, update, and delete table rows | Yes | Yes | | Create tables, and add, update, and delete their columns | Yes | Yes | | Create workflows, add, update, and delete steps | No | Yes | | Test a step or start a test run of a workflow | No | Yes | | Work in more than one workspace | No | Yes | **Workspaces (Enterprise edition):** An authorized agent isn't limited to one workspace. Name the workspace you want to work in, and the agent passes it along with each request. If you don't name one, the agent acts in your default workspace. ## Managing connected apps Connected apps Every agent you authorize appears in OpenOps, where you can review and disconnect it: 1. In the OpenOps left sidebar, click the **Settings** icon at the bottom. 2. In the **Settings** view, click **Connected apps**. Each entry shows the application name, when it was connected, and when it was last used. If you connect the same agent from two machines, you see two entries. 3. To revoke access, click **Disconnect** next to an entry and confirm. The agent loses access immediately and has to be authorized again to reconnect. Other connected apps aren't affected. Removing the server from your agent's configuration doesn't revoke the agent's access in OpenOps. The agent stays listed in **Connected apps** until you disconnect it there. To fully disconnect, do both. ## Enabling the MCP server This section is for OpenOps administrators. The MCP server is disabled by default and requires OpenOps [0.7.0](https://github.com/openops-cloud/openops/releases/tag/0.7.0) or later. To upgrade, see [Updating OpenOps](/getting-started/updating-openops). Agents sign in through OAuth, which OpenOps serves only over HTTPS; plain `http` is accepted only when `OPS_PUBLIC_URL` is `http://localhost`. ### Docker Compose 1. Enable TLS for your installation. See [Enabling TLS](/getting-started/deployment/aws-ec2#enabling-tls) in the deployment guide. 2. Open the `.env` file in your OpenOps installation directory and set the following variables. If your installation was created before 0.7.0, the variables aren't in the file yet, so add them: ```shell theme={null} OPS_OAUTH_ENABLED=true OPS_OAUTH_ISSUER_URL=${OPS_PUBLIC_URL}/api OPS_MCP_RESOURCE_URL=${OPS_PUBLIC_URL}/mcp OPS_OAUTH_RS_CLIENT_SECRET= COMPOSE_PROFILES=mcp ``` Generate the secret with `openssl rand -hex 32`. The MCP container doesn't start while the secret is empty. `COMPOSE_PROFILES=mcp` makes `docker compose up -d` start the MCP container. 3. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` 4. Verify that the server is reachable: ```shell theme={null} curl https:///.well-known/oauth-protected-resource/mcp ``` The command returns a JSON document that names your host as the `resource`. A `502 Bad Gateway` response means the MCP container isn't running. Check that `COMPOSE_PROFILES=mcp` is set and the secret isn't empty, then inspect the container with `sudo docker compose logs openops-mcp`. To disable the MCP server, set `OPS_OAUTH_ENABLED=false`, remove the `COMPOSE_PROFILES=mcp` line, and run `sudo docker compose --profile mcp down` followed by `sudo docker compose up -d`. All connected agents lose access. ### Helm chart The [OpenOps Helm chart](https://github.com/openops-cloud/helm-chart) version [0.7.0](https://github.com/openops-cloud/helm-chart/releases/tag/0.7.0) or later includes the MCP server as an opt-in component. Your release must already serve OpenOps over HTTPS, whether through the chart's ingress TLS settings or a load balancer that terminates TLS. See [TLS/HTTPS configuration](https://github.com/openops-cloud/helm-chart#tlshttps-configuration) in the chart's README. Then add the following to your values file and upgrade the release: ```yaml theme={null} global: publicUrl: "https://" openopsEnvSecrets: OPS_OAUTH_RS_CLIENT_SECRET: "" mcp: enabled: true ``` The chart derives the remaining OAuth settings from `publicUrl`. See [MCP server for external agents](https://github.com/openops-cloud/helm-chart#mcp-server-for-external-agents) in the chart's README for details, including how to supply the secret from an external secret manager. ## Troubleshooting * **The agent reports that the server needs authentication:** Run the agent's login step, such as `/mcp` in Claude Code or `codex mcp login openops`, and check that the server URL ends with `/mcp`. * **The browser shows "This authorization request cannot be completed":** The request has expired or has already been used. Connect again from your agent. * **Tool calls fail with an authorization error after working before:** The agent was disconnected in **Connected apps**, your user account was deactivated, or the agent hasn't been used for 30 days. Connect again from your agent. * **The agent works in the wrong workspace (Enterprise edition):** Name the workspace in your prompt. See the note in [What the agent can do](#what-the-agent-can-do). ## Support Feel free to join our [Slack community](https://slack.openops.com) if you have any questions or need help with your installation. # AI Assistance Source: https://docs.openops.com/ai-assistance/overview How to use AI assistance in OpenOps OpenOps can use a large language model (LLM) of your choice to help you with: * Answering questions about OpenOps and FinOps using the AI assistant chat * Using prompts as workflow steps based on outputs from previous steps * Generating CLI commands for AWS, Azure, and GCP * Writing SQL queries for AWS Athena, BigQuery, Snowflake, and Databricks * Generating JavaScript code for custom code steps in your workflows You can do all this right inside the workflow editor, without switching context. ## Enabling AI assistance OpenOps doesn't lock you into a specific AI model. Instead, you **bring your own AI keys** and [connect them to OpenOps](/ai-assistance/llm-connections). Supported LLMs include OpenAI, Anthropic, Google Generative AI, Groq, Mistral, Perplexity, xAI Grok, and more. ## Using AI assistance AI assistance in OpenOps is available in several forms: * The AI assistant chat, where you ask free-form questions * A standalone **AI Step** action that lets you send prompts that use the outputs of previous workflow steps as context * The **Generate with AI** command in step properties, which helps you generate commands, queries, and code snippets ### AI assistant chat Once enabled, the AI assistant chat becomes available in sidebars in every OpenOps view: You can use it to ask a variety of questions about OpenOps, your cloud resources, and FinOps in general, such as: * "What can I do in OpenOps and how do I use its [features](/introduction/features-and-benefits/)?" * "How do I [create a workflow](/workflow-management/building-workflows/) that does what I want to achieve?" * "What [actions](/workflow-management/actions/) and [connections](/cloud-access/access-levels-permissions/) are used in workflows in my installation?" * "What are the recent trends in OpenOps [workflow runs](/workflow-management/investigate-workflow-run/), and are there any anomalies?" * "Why has a specific workflow started to fail, and why hadn't it failed before?" * "What kind of data does a specific [OpenOps table](/reporting-analytics/tables/) contain, and what workflows use it?" * "What are the recent trends in the FinOps community?" To provide in-depth answers about your OpenOps installation, the AI assistant takes advantage of the built-in OpenOps MCP server, which is enabled by default. OpenOps also lets you connect external AI agents such as Claude Code or Codex to your environment. See [MCP Server](/ai-assistance/mcp-server) for details. It can also work with Amazon MCP servers, namely AWS Cost Explorer MCP Server, AWS Pricing MCP Server, and AWS Billing and Cost Management MCP Server. Connecting to these servers enables you to ask questions about your AWS expenses like "How much did I spend on EC2 last month?". However, you need to explicitly enable OpenOps to access the MCP servers. See [LLM Connections](/ai-assistance/llm-connections) for how to connect. When available, the AI assistant includes reasoning in its replies, showing which tools (such as MCP servers) it used, displaying the raw data retrieved from those tools, and outlining next steps in plain language. ### AI Step action The **AI Step** action lets you run AI prompts in a separate step in your workflow, using outputs of its previous steps as context. You add **AI Step** as you would [add any other action](workflow-management/building-workflows#adding-more-actions). You then specify a prompt in the **Prompt** field and any relevant outputs of previous steps in the **Additional input** section: Alternatively, you can combine prompt text and outputs from previous steps in the **Prompt** field. ### Generating commands and queries Whenever you work with an [action](/workflow-management/actions) that requires writing a CLI command or SQL query, you'll see the **Generate with AI** command next to the relevant property in the action's properties pane: When you click **Generate with AI**, use the AI chat window to describe the outcome you want the command or query to achieve, and your LLM will generate it for you: Click **Inject command** in the AI chat window to insert the generated command into the action's **Command** field. ### Generating code steps When existing no-code actions aren't a good fit for your workflow, you can use AI assistance to generate JavaScript code for custom code steps. In the properties pane of your **Code** step, click **Generate with AI**. When the AI chat window opens, enter a prompt with details about the task you want to accomplish. The AI will generate a code snippet that respects the format expected by the code step. Click **Use code** to insert the generated code into the step's **Source Code** field: Generate code steps with AI Test the step to ensure the generated code works as expected. If it doesn't on the first try, you can refine your prompt, explicitly provide the output of the previous step, and generate a new code snippet. # Access Levels and Permissions Source: https://docs.openops.com/cloud-access/access-levels-permissions Understanding access to cloud resources in OpenOps Although some workflows can be performed without direct access to cloud resources, the power of automations that you build in OpenOps depends on the permissions that you assign. That said, you control which level of access to provide, as needed by the workflows that you build. One strategy is to start with providing OpenOps read-only permissions, and when you're ready to automate update operations, provide more permissions. Access to cloud resources in OpenOps is defined using "connections": sets of resource credentials. OpenOps provides a separate tab to list and create connections: Connections Each workflow can use one or more connections, including multiple connections per resource. For example, you can have one connection for read-only AWS access and a different connection for updates. You can set up connections in two ways: 1. Upfront by going to the **Connections** tab and clicking **New Connection**. This opens a pop-up that lets you first select a connection type: 2. While editing the workflow, in action properties, by opening the **Connection** dropdown and clicking **Create Connection**: ## AWS connections In OpenOps, AWS connections are used for actions that access **AWS** resources, as well as for **AWS Athena**, **AWS CloudFormation**, and **AWS Compute Optimizer** actions. You can choose one of two approaches to configure connections to your AWS resources: 1. [**Using access keys**](#connecting-using-access-keys): a pair consisting of an access key ID and a secret access key. 2. [**Using an IAM role attached to the EC2 instance**](#connecting-using-an-iam-role-attached-to-your-ec2-instance) where OpenOps is hosted. This is a more secure approach and is recommended for production use. However, it requires that OpenOps is [hosted on an AWS EC2 instance](/getting-started/deployment/aws-ec2/). Whichever approach you choose, you'll need to specify the default AWS region for the connection. If your AWS account doesn't already have a default region, you can [set it in the AWS Management Console](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/change-default-region.html) separately. ### Connecting using access keys This approach requires specifying your access key ID, secret access key, and the default region in the AWS connection properties: You can [create an IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in the AWS Management Console. When you do, you'll get an access key ID and a secret access key to enter in the AWS connection configuration form. The specific set of permissions you assign to the user depends on what you want to do in the workflows that will use the AWS connection. For example, if you want your workflow to turn off EC2 instances, assign the `ec2:StopInstances` permission as shown in [this guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_ec2_tag-owner.html). If you have multiple AWS accounts and want one of them to define all the permissions that may be needed for workflows defined by [OpenOps templates](/workflow-management/workflow-templates/), consider installing the [OpenOpsApp AWS Role Stack](/cloud-access/aws-cf-role-stack/). Even if you don't, you can [download the stack](https://openops.s3.us-east-2.amazonaws.com/OpenOpsAppRoleStack.yml) and use it as a reference when configuring permissions for your workflows. ### Connecting using an IAM role attached to your EC2 instance If you host OpenOps [on an AWS EC2 instance](/getting-started/deployment/aws-ec2/), you can use an IAM role attached to the instance instead of access keys. This is a more secure approach and is recommended for production use of OpenOps. Here's what you need to do: 1. If your EC2 instance doesn't already have an IAM role attached, attach one by following [this guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/attach-iam-role.html). 2. Open the `.env` file in your OpenOps installation directory. Inside the file, set the `OPS_AWS_ENABLE_IMPLICIT_ROLE` variable to `true`. 3. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` 4. Create an AWS connection in OpenOps. In the connection properties, leave the **Access key ID** and **Secret access key** fields empty, and specify the default region. The connection will now automatically use the IAM role attached to your EC2 instance. ### Connecting to multiple AWS accounts OpenOps supports two approaches for working with multiple AWS accounts. If you prefer to work with each account separately, you can create an AWS connection for each account [using AWS access keys](#connecting-using-access-keys). In this case, each connection should include that account's access key ID, secret access key, and default region. You can then assign different connections to different workflow actions. If you want to access multiple accounts together (for example, create a workflow that finds EC2 instances in multiple accounts), you can connect to the accounts from a single OpenOps connection. One account would have to have an assume-role trust with the other accounts. It is common to use the "payer" account in an organization for that purpose. To configure the connection in OpenOps: 1. In the AWS connection UI, configure a connection to your central account using [access keys](#connecting-using-access-keys) or [an IAM role attached to your EC2 instance](#connecting-using-an-iam-role-attached-to-your-ec2-instance). This account must have permission to assume roles in the other accounts. 2. In the **Roles** section, add an entry for each additional AWS account, either one at a time or in bulk: * To add a single account, click **Add Item** and specify: * **Assume role ARN**: the Amazon resource name (ARN) of the IAM role to assume in this account (e.g., `arn:aws:iam::123456789012:role/OpenOpsExecutionRole`). * **Assume role external ID**: a shared secret defined in the IAM role's trust policy. Leave this field blank if the role does not require an external ID. * **Account alias**: a convenience label used to identify this account in your workflows (e.g., `dev`, `prod`, `billing`). * To add many accounts that share the same IAM role name (for example, a role deployed to every account with a CloudFormation StackSet), click **Add multiple accounts** and specify: * **Account IDs**: one account per line as the 12-digit account ID, optionally followed by an alias. If you don't provide an alias, the account ID is used. You may use this format: ```text theme={null} 123456789012 111122223333 prod 444455556666 prod-eu ``` * **Role name**: the name of the IAM role to assume in each listed account. OpenOps builds every ARN as `arn:aws:iam:::role/`. * **External ID**: the shared secret defined in the roles' trust policies. Leave this field blank if the roles do not require an external ID. Then click **Add**. OpenOps adds one entry to the **Roles** section per account. Account IDs that aren't 12 digits or are already listed are skipped and reported so you can fix them. 3. Review the entries in the **Roles** section and edit any of them if needed, then click **Save**. OpenOps verifies that it can assume every role and, if any fail, lists all of them with the reason so you can fix them in one go. When configuring a workflow, you'll be able to choose which account to use with each action. ## Azure connections A connection to Azure requires specifying your application (client) ID, client secret, and directory (tenant) ID: If you don't already have these credentials, you can acquire them by creating an Azure service principal. There are two ways to do this: with the [Azure CLI](#creating-an-azure-service-principal-using-the-azure-cli) or the [Azure Portal](#creating-an-azure-service-principal-using-the-azure-portal). Alternatively, instead of creating a connection, you can use your [local Azure CLI credentials](#using-local-azure-cli-credentials). ### Creating an Azure service principal using the Azure CLI Run the following Azure CLI command to create an Azure application and a service principal with the "Contributor" role at the subscription level: ```shell theme={null} az ad sp create-for-rbac --name "SomeAppName" ``` If you'd rather assign a different role to the service principal, specify the role using the `--role` flag instead. For example, this command assigns the "Reader" role to the service principal: ```shell theme={null} az ad sp create-for-rbac --name "SomeAppName" --role "Reader" ``` Whichever role you choose, the command returns JSON output similar to the following: ```json theme={null} { "appId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "displayName": "", "password": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "tenant": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } ``` Copy the values from the output into the respective fields in OpenOps connection properties: * `appId` to **Application (client) ID** * `password` to **Client Secret** * `tenant` to **Directory (tenant) ID** ### Creating an Azure service principal using the Azure Portal 1. From the Azure Portal home screen, go to **App registrations** and click **New registration** to create a new application: Creating a new registration 2. In the **Overview** section of the new application, you should now see the client ID and tenant ID. Copy these values into OpenOps. 3. Go to the **Certificates & Secrets** submenu and create a new secret. Copy the secret to OpenOps now, as it will only be shown once. 4. Go to the **Subscriptions** page and select a subscription for your new application's service principal. 5. Under the selected subscription, click **Access control (IAM)** on the left-side menu bar. In the view that opens, click **Add**, then select **Add role assignment**: 6. In the **Role** step, select the role that you want your Azure connection to have. For a safe testing experience, use "Reader" or another read-only role. If you want to enable OpenOps to make changes to your Azure assets, choose "Contributor" or a more privileged role. 7. In the **Members** step, click **Select members** and specify the name of your application. If your application does not appear in the dropdown immediately, search for it by name. 8. Click **Review + assign**. Your service principal is now ready to be used with your Azure connection in OpenOps. ### Using local Azure CLI credentials If you're running the Azure CLI on the same machine as your OpenOps installation, you can share your local Azure CLI session with OpenOps instead of creating a connection. To do this, open the `.env` file in your OpenOps installation directory and set the following environment variables: * `OPS_ENABLE_HOST_SESSION=true` to enable sharing of the host session with the OpenOps container. * `HOST_AZURE_CONFIG_DIR=/root/.azure` to define the path to the host machine's Azure configuration folder that will be shared with the OpenOps container. Before running OpenOps, log in to Azure using the CLI: ```shell theme={null} sudo az login ``` After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Google Cloud connections There are two ways to connect to Google Cloud Platform (GCP) from OpenOps: * [Using a service account](#connecting-with-a-gcp-service-account) * [Using local GCP CLI credentials](#using-local-google-cloud-cli-credentials) ### Connecting with a GCP service account A connection to Google Cloud Platform (GCP) requires creating a [GCP service account](https://cloud.google.com/iam/docs/service-account-overview) with permissions to use GCP services that you want OpenOps to interact with. Google Cloud Platform connection Once you have created a service account and exported a JSON service account key file, paste the contents of the file into the **Key file content** field, save the connection, and you're good to go. ### Using local Google Cloud CLI credentials If you're running the Google Cloud CLI on the same machine as your OpenOps installation, you can share your local CLI session with OpenOps instead of creating a connection. To do this, open the `.env` file in your OpenOps installation directory and set the following environment variables: * `OPS_ENABLE_HOST_SESSION=true` to enable sharing of the host session with the OpenOps container. * `HOST_CLOUDSDK_CONFIG=/root/.config/gcloud` to define the path to the host machine's Google Cloud configuration folder that will be shared with the OpenOps container. Before running OpenOps, log in to Google Cloud using the CLI: ```shell theme={null} sudo gcloud auth login ``` After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` # AWS IAM Role Creation Source: https://docs.openops.com/cloud-access/aws-cf-role-stack How to set up AWS roles for OpenOps using CloudFormation or Terraform OpenOps provides infrastructure-as-code templates to create IAM roles in your AWS account with the necessary permissions to connect to your AWS resources. Two roles are available: the **OpenOpsApp role** for running workflows, and the **Benchmark role** for running cost optimization benchmarks. ## OpenOpsApp Role Creates the `OpenOpsApp` role with permissions to run workflows from the OpenOps template catalog. The template contains all the read permissions needed to execute all templates in our library; you can still restrict the scope to the permissions needed for the templates you are actually running. Write permissions are optional and only needed if you want to apply remediation actions directly to cloud resources. The role can be created with either [AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) or [Terraform](https://developer.hashicorp.com/terraform) - both produce the same role and permissions. Besides the IAM role, the template by default also sets up cost management resources: it creates an S3 bucket (`openops-cur-`) and a [Cost and Usage Report](https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html) definition that continuously exports billing reports to that bucket. This is why the role **must** be created in the `us-east-1` region as CUR is only available there. If you don't want these resources, disable the `CostUsageReport` parameter (CloudFormation) or set `cost_usage_report = false` (Terraform); the template then creates IAM resources only and can be deployed in any region. ### Using CloudFormation **[Create OpenOpsApp stack](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=OpenOpsApp\&templateURL=https://openops.s3.us-east-2.amazonaws.com/OpenOpsAppRoleStack.yml)** | [Download template](https://openops.s3.us-east-2.amazonaws.com/OpenOpsAppRoleStack.yml) **Parameters:** AWS account ID (required), `CostUsageReport` (optional, default `true`), permission sets (optional) 1. Click the **Create OpenOpsApp stack** link above. 2. On the **Specify stack details** page, enter the required parameters, then click **Next**. 3. On the **Configure stack options** page, click **Next**. 4. On the **Review and create** page, scroll down to the **Capabilities** section and acknowledge the creation of IAM roles: Capabilities 5. Click **Submit**. The stack will be created with the configured permissions. ### Using Terraform **[Download template](https://openops.s3.us-east-2.amazonaws.com/OpenOpsAppRole.tf)** | [View on GitHub](https://github.com/openops-cloud/cloudformation-examples/tree/main/openops-app-role-aws/terraform) **Variables:** `aws_account_id` (required), `external_id` (optional), `role_name` (optional, default `OpenOpsApp`), `cost_usage_report` (optional, default `true`), permission toggles (optional) Download the template into an empty directory and apply it: ```bash theme={null} mkdir openops-role && cd openops-role curl -O https://openops.s3.us-east-2.amazonaws.com/OpenOpsAppRole.tf terraform init terraform apply -var 'aws_account_id=' ``` Replace `` with the ID of the AWS account where your OpenOps environment is deployed - the account that will assume the role. The template can also be consumed as a Terraform module, which makes it easy to roll the role out across many AWS accounts. See the template's [README](https://github.com/openops-cloud/cloudformation-examples/tree/main/openops-app-role-aws/terraform#multi-account-rollout) for details. ## Benchmark Role Stack Creates a read-only `OpenOpsBenchmarkRole` specifically for running AWS cost optimization benchmarks. Includes Compute Optimizer permissions, resource read access (EC2, RDS, ELB, DynamoDB, CloudWatch, Cost Explorer, CloudTrail), and Pricing API access. This role is available as a CloudFormation template. **[Create Benchmark stack](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=OpenOpsBenchmark\&templateURL=https://openops.s3.us-east-2.amazonaws.com/OpenOpsBenchmarkRoleStack.yml)** | [Download template](https://openops.s3.us-east-2.amazonaws.com/OpenOpsBenchmarkRoleStack.yml) | [View on GitHub](https://github.com/openops-cloud/cloudformation-examples/tree/main/aws-benchmark-permissions) **Parameters:** TrustedAccountId (required), ExternalId (optional, recommended for security) To install, click the **Create Benchmark stack** link above and follow the same steps as for the [OpenOpsApp stack](#using-cloudformation). The Benchmark stack can be created in any region. ## Modification You're welcome to download any of the templates and modify specific permissions according to your needs. Notice that some AWS components in OpenOps workflows may not function properly as a result. ## Support Feel free to join our [Slack community](https://slack.openops.com) if you have any questions or need help with your installation. # Azure RBAC Custom Roles Source: https://docs.openops.com/cloud-access/azure-rbac How to set up Azure custom roles for OpenOps Benchmark using RBAC OpenOps provides Azure custom role definitions to create RBAC roles in your Azure subscriptions with the necessary permissions to run benchmark assessments and collect cost optimization data. ## Available Custom Roles ### OpenOps Azure Benchmark Reader Creates the `OpenOps Azure Benchmark Reader` custom role with read-only permissions for running Azure cost optimization benchmarks. This role includes: * **Compute resources**: Virtual machines, managed disks, snapshots, and images * **Networking**: Network interfaces and public IP addresses * **App Services**: Web apps, App Service Plans, and App Service Environments * **Databases**: Azure SQL servers, databases, and elastic pools * **Cost and billing**: Cost Management queries, consumption usage details, and billing properties * **Monitoring**: Azure Monitor metrics * **Optimization**: Azure Advisor recommendations and metadata **[Download Bicep template](https://openops.s3.us-east-2.amazonaws.com/OpenOpsAzureBenchmarkReader.role-definition.bicep)** | **[Download JSON template](https://openops.s3.us-east-2.amazonaws.com/OpenOpsAzureBenchmarkReader.role-definition.json)** **Parameters:** AssignableScopes (required) ## Installation Steps Before creating the custom role, you must configure the `AssignableScopes` parameter to specify where this role can be assigned. ### Configure AssignableScopes Choose the appropriate scope for your deployment: **JSON:** ```json theme={null} "AssignableScopes": [ "/subscriptions/11111111-1111-1111-1111-111111111111" ] ``` **Bicep parameter:** ```bash theme={null} --parameters assignableScopes='["/subscriptions/11111111-1111-1111-1111-111111111111"]' ``` Use this when you want the role available in specific subscriptions but not across the entire management group. **JSON:** ```json theme={null} "AssignableScopes": [ "/subscriptions/11111111-1111-1111-1111-111111111111", "/subscriptions/22222222-2222-2222-2222-222222222222", "/subscriptions/33333333-3333-3333-3333-333333333333" ] ``` **Bicep parameter:** ```bash theme={null} --parameters assignableScopes='["/subscriptions/11111111-1111-1111-1111-111111111111","/subscriptions/22222222-2222-2222-2222-222222222222","/subscriptions/33333333-3333-3333-3333-333333333333"]' ``` Use this only if you want the custom role available across the entire management group scope. **JSON:** ```json theme={null} "AssignableScopes": [ "/providers/Microsoft.Management/managementGroups/my-management-group" ] ``` **Bicep parameter:** ```bash theme={null} --parameters assignableScopes='["/providers/Microsoft.Management/managementGroups/my-management-group"]' ``` ### Option 1: Deploy with Bicep (Recommended) 1. Update the `assignableScopes` parameter in the command below with your subscription ID(s): ```bash theme={null} az deployment sub create \ --name openops-azure-benchmark-reader-role \ --location westus2 \ --template-file "./OpenOps Azure Benchmark Reader.role-definition.bicep" \ --parameters assignableScopes='["/subscriptions/"]' ``` 2. For multiple subscriptions: ```bash theme={null} az deployment sub create \ --name openops-azure-benchmark-reader-role \ --location westus2 \ --template-file "./OpenOps Azure Benchmark Reader.role-definition.bicep" \ --parameters assignableScopes='["/subscriptions/sub-1","/subscriptions/sub-2"]' ``` **Notes:** * This is a subscription-scoped deployment. For management group scope, see the [management group configuration](#management-group-scope) above ### Option 2: Deploy with Azure CLI and JSON 1. Edit the `AssignableScopes` field in `OpenOps Azure Benchmark Reader.role-definition.json` with your subscription ID(s). 2. Create the role: ```bash theme={null} az role definition create \ --role-definition "./OpenOps Azure Benchmark Reader.role-definition.json" ``` 3. To update an existing role: ```bash theme={null} az role definition update \ --role-definition "./OpenOps Azure Benchmark Reader.role-definition.json" ``` ## Assign the Role to a Service Principal After creating the custom role, assign it to the service principal that OpenOps uses to connect to Azure. ### Assign at subscription scope ```bash theme={null} az role assignment create \ --assignee-object-id "" \ --assignee-principal-type ServicePrincipal \ --role "OpenOps Azure Benchmark Reader" \ --scope "/subscriptions/11111111-1111-1111-1111-111111111111" ``` ### Assign in multiple subscriptions Run the assignment once per subscription: ```bash theme={null} az role assignment create \ --assignee-object-id "" \ --assignee-principal-type ServicePrincipal \ --role "OpenOps Azure Benchmark Reader" \ --scope "/subscriptions/11111111-1111-1111-1111-111111111111" ``` ```bash theme={null} az role assignment create \ --assignee-object-id "" \ --assignee-principal-type ServicePrincipal \ --role "OpenOps Azure Benchmark Reader" \ --scope "/subscriptions/22222222-2222-2222-2222-222222222222" ``` ### Assign at management group scope ```bash theme={null} az role assignment create \ --assignee-object-id "" \ --assignee-principal-type ServicePrincipal \ --role "OpenOps Azure Benchmark Reader" \ --scope "/providers/Microsoft.Management/managementGroups/my-management-group" ``` ## Verification Verify the role definition was created: ```bash theme={null} az role definition list \ --name "OpenOps Azure Benchmark Reader" \ -o json ``` Check role assignments for your service principal: ```bash theme={null} az role assignment list \ --assignee "" \ --all \ -o table ``` ## Cost Management Access For subscription-scope cost queries, the role includes `Microsoft.CostManagement/query/action` for the POST query API. Azure Cost Management access commonly requires related read permissions in billing and cost surfaces. This role includes: * `Microsoft.CostManagement/query/action` * `Microsoft.CostManagement/*/read` * `Microsoft.Consumption/*/read` * `Microsoft.Billing/billingPeriods/read` * `Microsoft.Billing/billingProperty/read` * `Microsoft.Resources/subscriptions/read` * `Microsoft.Resources/subscriptions/resourceGroups/read` If you update the role and still get `RBACAccessDenied`, wait a few minutes and retry. Azure RBAC propagation is not always immediate. For subscriptions under EA or certain billing setups, cost visibility may also depend on billing-side settings such as view charges access. ## Important Notes * `AssignableScopes` is required for all Azure custom roles * A management group is above subscriptions in the Azure hierarchy * If you use multiple subscriptions in `AssignableScopes`, the role is limited to those subscriptions only * Role creation requires permission to manage custom roles for every scope listed in `AssignableScopes` ## Modification You're welcome to download and modify the role definition according to your needs. Note that some OpenOps benchmark workflows may not function properly if required permissions are removed. ## Support Feel free to join our [Slack community](https://slack.openops.com) if you have any questions or need help with your installation. # Supported Cloud Providers Source: https://docs.openops.com/cloud-access/supported-cloud-providers Details on cloud provider support in OpenOps OpenOps supports the big three cloud providers: [AWS](#aws), [Azure](#azure), and [Google Cloud](#google-cloud). [Actions](/workflow-management/actions/) in each cloud provider's block are implemented using the respective provider's official APIs. You can create workflows [across cloud providers](#automating-across-multiple-cloud-providers) if you're using more than one of them. ## AWS AWS actions use the latest available AWS CLI at the time of OpenOps installation. The full list of AWS actions is as follows: * **Build ARN**: Build ARN (Amazon Resource Name) from the given parameters * **Parse ARN**: Parse information from a given ARN (Amazon Resource Name) * **Get Price from Price Catalog**: Query AWS Pricing API to get the price of a service * **Get Account IDs**: Gets the account ids for the accounts under the selected connection * **EBS Get Volumes**: Get EBS volumes that match the given criteria * **EBS Modify Volume**: Modify the given EBS volume * **EBS Delete Volume**: Delete the given EBS Volume * **EBS Get Snapshots**: Get EBS snapshots that match the given criteria * **EBS Create Snapshot**: Create a snapshot of the provided EBS Volume * **EBS Delete Snapshot**: Delete the provided EBS Snapshot * **EC2 Get Instances**: EC2 Get Instances that match the given criteria * **EC2 Modify Instance**: Modify the given EC2 instance * **EC2 Start Instance**: EC2 start a given instance * **EC2 Stop Instance**: EC2 stop a given instance * **EC2 Terminate Instances**: Terminate the provided EC2 instances * **RDS Get Instances**: Get RDS instances that match the given criteria * **RDS Delete Instance**: Delete the provided RDS Instance * **RDS Get Snapshots**: Get RDS snapshots that match the given criteria * **RDS Create Snapshot**: Create a snapshot of the provided RDS instance * **RDS Delete Snapshot**: Delete the provided RDS Snapshot * **Tag Resources**: Add tags to the given resources * **Generate Runbook Execution Link**: Generate an AWS Console link to execute an SSM Automation Runbook * **AWS CLI**: Execute AWS CLI command Here's an example of a step in an AWS workflow that retrieves EBS volumes. For each volume, the workflow then proceeds to determine its unit cost: A sample AWS workflow See also: * [AWS templates](/workflow-management/workflow-templates#aws) * [Setting up AWS connections](/cloud-access/access-levels-permissions#aws-connections) * [Iterating over multiple AWS accounts](/cookbook/iterate-over-multiple-aws-accounts) ## Azure Azure actions use Azure CLI version 2.74.0, with the following extensions preinstalled: * *reservation* * *resource-graph* * *costmanagement* * *billing-benefits* * *quotas* * *ssh* Dynamic extension installation is allowed. This means that if you use the Azure CLI action to run a command that is not available in the preinstalled extensions, the action installs the required extension automatically. The full list of Azure actions is as follows: * **Azure CLI**: Execute Azure CLI command * **Get Advisor Cost Recommendations**: Get Azure Advisor Cost Recommendations * **Azure Resource Graph Query**: Query Azure Resource Graph using KQL to retrieve resources across multiple subscriptions * **Custom Azure API Call**: Make a custom REST API call to Azure. Here's an example of a step in an Azure workflow that fetches Azure Advisor cost recommendations for a specific resource group: A sample Azure workflow See also: * [Azure templates](/workflow-management/workflow-templates#azure) * [Setting up Azure connections](/cloud-access/access-levels-permissions#azure-connections) * [Iterating over multiple Azure subscriptions](/cookbook/iterate-over-multiple-azure-subscriptions) ## Google Cloud Google Cloud actions use Google Cloud SDK version 516.0.0, with beta versions of CLI commands enabled. The full list of Google Cloud actions is as follows: * **Google Cloud CLI**: Execute a Google Cloud CLI command * **Get Recommendations**: Fetch the recommendations for the selected recommenders * **Run BigQuery SQL Query**: Run a SQL query on BigQuery and return the results. * **Custom Google Cloud API Call**: Make a custom REST API call to Google Cloud. Here's an example of a step in a Google Cloud workflow that retrieves Google Cloud recommendations for a specific combination of a project and a recommender. The workflow then proceeds to analyze and act on each recommendation: A sample Google Cloud workflow See also: * [Google Cloud templates](/workflow-management/workflow-templates#gcp) * [Setting up Google Cloud connections](/cloud-access/access-levels-permissions#google-cloud-connections) * [Iterating over multiple Google Cloud projects](/cookbook/iterate-over-multiple-gcp-projects) ## Automating across multiple cloud providers If you're using multiple cloud providers, you can structure your workflows so that OpenOps provides automations across all of them. You can either combine actions related to multiple cloud providers in one workflow or have separate provider-specific workflows save findings to a central location, such as an OpenOps table. Using [OpenOps tables](/reporting-analytics/tables/), you can aggregate findings and recommendations across cloud providers into a single table, where you can track approval status or group potential savings by business unit. You can see how it works by using the three sample workflows for AWS, Azure and Google Cloud that your OpenOps instance suggests in the **Overview** view: These workflows collect recommendations from AWS Compute Optimizer, Azure Advisor, and Google Cloud Recommenders, respectively, and then log the recommendations to a single preconfigured [**Opportunities** table](/reporting-analytics/tables#opportunities). If you're using multiple clouds, you can structure your workflows in a similar way. # Authentication Source: https://docs.openops.com/contributing/authentication Block authentication methods supported by OpenOps OpenOps supports several forms of authentication for blocks: **basic**, **secret-based**, **custom**, and **OAuth2**. Block authentication defines which credentials the user must enter to log in to the API that your block integrates with. Once authentication is implemented for your block, the user can create a [connection](/cloud-access/access-levels-permissions). Apart from implementing authentication, no additional setup is required to enable the connection UI. Authentication for a block must be defined using the `auth` parameter in the `createBlock` function within your block definition, as well as in all `createAction` functions within your action definitions. Each block can use only one authentication type. ## Basic authentication This authentication type collects a username and password as two separate fields. It can also be used to pass an API key and an API secret, or similar pairs of public/private credentials, in which case they are sent in the HTTP `Authorization: Basic` header. ```typescript theme={null} BlockAuth.BasicAuth({ required: true, authProviderKey: 'myservice', authProviderDisplayName: 'My Service', authProviderLogoUrl: 'https://static.openops.com/blocks/myservice.png', description: '', username: { displayName: 'Username', description: 'Enter your username', }, password: { displayName: 'Password', description: 'Enter your password', }, }) ``` The connection UI for this authentication type requests two credentials, typically a username and a password: Connection UI - basic authentication Basic authentication is not currently used in any OpenOps blocks. ## Secret-based authentication Use secret-based authentication when an API key is all that's required to authenticate with a service you're integrating with, and the service's base URL is always the same. This authentication type is used by many OpenOps blocks, including [CloudHealth](https://github.com/openops-cloud/openops/blob/main/packages/blocks/cloudhealth/src/lib/auth.ts), [CloudZero](https://github.com/openops-cloud/openops/blob/main/packages/blocks/cloudzero/src/lib/auth.ts), [Flexera](https://github.com/openops-cloud/openops/blob/main/packages/blocks/flexera/src/auth.ts), [Linear](https://github.com/openops-cloud/openops/blob/main/packages/blocks/linear/src/index.ts), [Monday.com](https://github.com/openops-cloud/openops/blob/main/packages/blocks/monday/src/index.ts), [nOps](https://github.com/openops-cloud/openops/blob/main/packages/blocks/nops/src/lib/auth.ts), and [Vantage](https://github.com/openops-cloud/openops/blob/main/packages/blocks/vantage/src/lib/auth.ts). ```typescript theme={null} BlockAuth.SecretAuth({ displayName: 'API Key', required: true, authProviderKey: 'myservice', authProviderDisplayName: 'My Service', authProviderLogoUrl: 'https://static.openops.com/blocks/myservice.png', description: '', // Optional validation validate: async ({ auth }) => { if (auth.startsWith('sk_')) { return { valid: true, }; } return { valid: false, error: 'Invalid API Key', }; }, }) ``` The connection UI for this authentication type only requests an API key: Connection UI - secret authentication ## Custom authentication This type of authentication allows collecting multiple properties, such as a base URL and an access token. Use this type when you need the user to enter more than just an API key. In OpenOps, this is currently the most commonly used authentication type. It's used by blocks such as [AWS](https://github.com/openops-cloud/openops/blob/950ce3eaecf0d5f991f5828ab82f0cfc91bfe01b/packages/openops/src/lib/aws/auth.ts#L169), [Azure](https://github.com/openops-cloud/openops/blob/main/packages/openops/src/lib/azure/auth.ts), [Google Cloud](https://github.com/openops-cloud/openops/blob/main/packages/openops/src/lib/google-cloud/auth.ts), [Zendesk](https://github.com/openops-cloud/openops/blob/main/packages/blocks/zendesk/src/index.ts), [Ternary](https://github.com/openops-cloud/openops/blob/main/packages/blocks/ternary/src/lib/common/auth.ts), [ServiceNow](https://github.com/openops-cloud/openops/blob/main/packages/blocks/servicenow/src/lib/auth.ts), [Kion](https://github.com/openops-cloud/openops/blob/main/packages/blocks/kion/src/lib/auth.ts), [Flexera One](https://github.com/openops-cloud/openops/blob/main/packages/blocks/flexera-one/src/lib/auth.ts), [Databricks](https://github.com/openops-cloud/openops/blob/main/packages/blocks/databricks/src/lib/common/auth.ts), and [CloudFix](https://github.com/openops-cloud/openops/blob/main/packages/blocks/cloudfix/src/lib/common/auth.ts). Using the custom authentication type is demonstrated in [Contributing an Integration](/contributing/contributing-an-integration/), a guide that explains how to create a fully functional integration block. ```typescript theme={null} BlockAuth.CustomAuth({ authProviderKey: 'myservice', authProviderDisplayName: 'My Service', authProviderLogoUrl: 'https://static.openops.com/blocks/myservice.png', description: 'Enter custom authentication details', required: true, props: { baseUrl: Property.ShortText({ displayName: 'Base URL', description: 'Enter the base URL', required: true, }), accessToken: Property.SecretText({ displayName: 'Access Token', description: 'Enter the access token', required: true, }), }, // Optional validation validate: async ({ auth }) => { if (auth.baseUrl.endsWith('/')) { return { valid: false, error: 'Base URL must not end with a slash', }; } else { return { valid: true }; } }, }) ``` The connection UI for this authentication type requests whatever inputs you defined in the `props` object: Connection UI - custom authentication ## OAuth2 This authentication type allows logging in with an OAuth2 provider either on behalf of a specific user (authorization code grant) or on behalf of a service (client credentials grant). It's currently used by some OpenOps blocks, including [GitHub](https://github.com/openops-cloud/openops/blob/main/packages/blocks/github/src/lib/common/auth.ts), [Slack](https://github.com/openops-cloud/openops/blob/main/packages/blocks/slack/src/lib/common/authentication.ts), [Microsoft Teams](https://github.com/openops-cloud/openops/blob/main/packages/blocks/microsoft-teams/src/lib/common/microsoft-teams-auth.ts), and [Microsoft Outlook](https://github.com/openops-cloud/openops/blob/main/packages/blocks/microsoft-teams/src/lib/common/microsoft-teams-auth.ts). ```typescript theme={null} BlockAuth.OAuth2({ authProviderKey: 'bitbucket', authProviderDisplayName: 'Bitbucket', authProviderLogoUrl: `https://static.openops.com/blocks/bitbucket.png`, description: '', required: true, scope: [ 'account:write', 'repository:read', 'repository:write', 'pullrequest:write', ], authUrl: 'https://bitbucket.org/site/oauth2/authorize', tokenUrl: 'https://bitbucket.org/site/oauth2/access_token', }) ``` In the connection UI, the user can either click **Connect** to log in to the OAuth2 provider with their own credentials, or enter a client ID and client secret to authenticate a service. Connection UI - OAuth2 authentication ## No authentication If your block doesn't require authentication, declare this explicitly by assigning `BlockAuth.None()` to the `auth` property. # Contributing an Integration Source: https://docs.openops.com/contributing/contributing-an-integration Developing a fully working OpenOps block to integrate with a third-party service [Creating a Minimal Block](/contributing/creating-a-minimal-block/) demonstrated how to use scaffolding and make a block show up in the OpenOps UI. Let's now see how you would create a fully functional integration with a third-party service. OpenOps integrates with Jira Cloud and Linear, but what if you use a different service for tracking your cloud optimization opportunities? Let's see how you would create a block that integrates with [JetBrains YouTrack](https://www.jetbrains.com/youtrack/) via its [REST API](https://www.jetbrains.com/help/youtrack/devportal/youtrack-rest-api.html). The process of developing the YouTrack block will include: * Scaffolding the block and actions using the OpenOps CLI. * Implementing custom API key-based authentication that enables the user to set up a connection. * Developing a simple action that authenticates with YouTrack and retrieves data. * Developing an advanced action that involves several dynamic, interdependent properties and updates a YouTrack issue. This is not a step-by-step guide. Instead, it's an overview that highlights prominent parts of the process that you can use to develop your own blocks. ## Scaffolding a new block To scaffold a new block, you run the following command: ```bash theme={null} npm run cli blocks create ``` For a YouTrack integration, you would supply the following information to the CLI: 1. `Block name`: `youtrack` (lowercase). 2. `Package name`: leave blank to use the default. 3. `Authentication type`: select `Custom (Custom properties)`. 4. `Create opinionated folder structure with stubs for actions, tests, and common service layer`: select `Yes - Create full folder structure with stubs`. OpenOps generates a full project template inside `packages/blocks/youtrack/`, including `package.json`, TypeScript configuration files, ESLint and Jest configuration files, an entry point for the block at `src/index.ts`, and a starter test file at `test/index.test.ts`. Let's take a closer look at the generated files. ### src/index.ts `src/index.ts` is the entry point to the new block. It uses the `createBlock()` function from the OpenOps block framework to create a new block. This function takes a number of arguments, of which the most important ones are: * `auth`: authentication implementation for the block. It defines which credentials the user needs to specify in the block's [connection](/cloud-access/access-levels-permissions) properties to authenticate with the API that the block integrates with. * `actions`: an array that contains the actions that the block exposes. The scaffolded version includes a predefined action that allows making a custom API call to the block's API. ```ts theme={null} import { createCustomApiCallAction } from '@openops/blocks-common'; import { createBlock, Property } from '@openops/blocks-framework'; import { BlockCategory } from '@openops/shared'; import { youtrackAuth } from './lib/auth'; export const youtrack = createBlock({ displayName: 'Youtrack', auth: youtrackAuth, minimumSupportedRelease: '0.20.0', logoUrl: 'https://static.openops.com/blocks/youtrack.png', authors: [], categories: [BlockCategory.FINOPS], actions: [ createCustomApiCallAction({ baseUrl: () => 'https://api.youtrack.com', auth: youtrackAuth, additionalProps: { documentation: Property.MarkDown({ value: 'For more information, visit the [Youtrack API documentation](https://docs.youtrack.com/reference/introduction).', }), }, }), ], triggers: [], }); ``` ### src/lib/auth.ts Scaffolding generates a placeholder authentication implementation in a separate file. It uses the `CustomAuth()` helper function from the OpenOps block framework. The function takes several parameters, of which the most important ones are: * `props`: an object that defines the inputs required to authenticate with the service that the block integrates with. * `validate`: a function for optional validation of the inputs defined in `props`. ```ts theme={null} import { BlockAuth, Property } from '@openops/blocks-framework'; export const youtrackAuth = BlockAuth.CustomAuth({ authProviderKey: 'youtrack', authProviderDisplayName: 'Youtrack', authProviderLogoUrl: 'https://static.openops.com/blocks/youtrack.png', description: 'Configure your Youtrack connection', required: true, props: { apiKey: Property.SecretText({ displayName: 'API Key', required: true, }), baseUrl: Property.ShortText({ displayName: 'Base URL', description: 'The base URL for Youtrack API', required: true, }), }, validate: async ({ auth }) => { // Add validation logic here return { valid: true }; }, }); ``` ### Project files OpenOps uses [Nx](https://nx.dev/) as its build system. The `project.json` file defines how the new block is built, tested, and linted within the Nx workspace. It specifies the source root, output path, TypeScript configuration, package entry points, and assets. It also declares executors for build (`@nx/js:tsc`), test (`@nx/jest:jest`), and lint (`@nx/eslint:lint`). ```json theme={null} { "name": "blocks-youtrack", "$schema": "../../../node_modules/nx/schemas/project-schema.json", "sourceRoot": "packages/blocks/youtrack/src", "projectType": "library", "tags": [], "targets": { "build": { "executor": "@nx/js:tsc", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/packages/blocks/youtrack", "tsConfig": "packages/blocks/youtrack/tsconfig.lib.json", "packageJson": "packages/blocks/youtrack/package.json", "main": "packages/blocks/youtrack/src/index.ts", "assets": ["packages/blocks/youtrack/*.md"], "buildableProjectDepsInPackageJsonType": "dependencies", "updateBuildableProjectDepsInPackageJson": true } }, "test": { "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { "jestConfig": "packages/blocks/youtrack/jest.config.ts" } }, "lint": { "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"] } } } ``` `package.json` is a minimal metadata file that declares the block's name and version within the Nx workspace. Unlike typical npm packages, this file isn't meant for publication to the npm registry. Instead, it helps Nx identify the project and marks the block as a versioned unit within the larger repository. ```json theme={null} { "name": "@openops/block-youtrack", "version": "0.0.1" } ``` If your block requires additional dependencies, such as an SDK for the service you're integrating with, you can add them to the `dependencies` section of `package.json`. ### Test files `test/index.test.ts` is a stub Jest test fixture that includes a few sample tests for the block: ```ts theme={null} import { youtrack } from '../src/index'; describe('block declaration tests', () => { test('should return block with correct authentication', () => { expect(youtrack.auth).toMatchObject({ type: 'CUSTOM_AUTH', required: true, authProviderKey: 'youtrack', authProviderDisplayName: 'Youtrack', authProviderLogoUrl: 'https://static.openops.com/blocks/youtrack.png', }); }); test('should return block with correct number of actions', () => { expect(Object.keys(youtrack.actions()).length).toBe(1); expect(youtrack.actions()).toMatchObject({ custom_api_call: { name: 'custom_api_call', requireAuth: true, }, }); }); }); ``` You can run these tests using `nx test blocks-youtrack`. There's also a Jest configuration file, `jest.config.ts`, which inherits shared settings from the OpenOps Jest preset, references a TypeScript config file, defines recognized file extensions, and specifies where to store code coverage reports: ```ts theme={null} export default { displayName: 'blocks-youtrack', preset: '../../../jest.preset.js', setupFiles: ['../../../jest.env.js'], testEnvironment: 'node', transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], }, moduleFileExtensions: ['ts', 'js', 'html'], coverageDirectory: '../../../coverage/packages/blocks/youtrack', }; ``` ### TypeScript configuration files Scaffolding generates three TypeScript configuration files: `tsconfig.json`, `tsconfig.lib.json`, and `tsconfig.spec.json`. `tsconfig.json` is the base config for the block. It extends the workspace's root `tsconfig.base.json` and enforces strict compiler options but doesn't include any source files directly. Instead, it references the other two config files, serving as an entry point for both: ```json theme={null} { "extends": "../../../tsconfig.base.json", "compilerOptions": { "module": "commonjs", "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true }, "files": [], "include": [], "references": [ { "path": "./tsconfig.lib.json" }, { "path": "./tsconfig.spec.json" } ] } ``` `tsconfig.lib.json` applies to the block's source code. It outputs compiled files to `dist/out-tsc`, generates type declarations, and includes only non-test TypeScript files under `src/`: ```json theme={null} { "extends": "./tsconfig.json", "compilerOptions": { "module": "commonjs", "outDir": "../../../dist/out-tsc", "declaration": true, "types": ["node"] }, "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"], "include": ["src/**/*.ts"] } ``` `tsconfig.spec.json` is tailored for testing. It includes test and declaration files and configures Jest typings: ```json theme={null} { "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../../dist/out-tsc", "module": "commonjs", "types": ["jest", "node"] }, "include": [ "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" ] } ``` ### Other files `.eslintrc.json` defines JavaScript and TypeScript linting behavior for the block, extending the OpenOps repository's root ESLint configuration. The `overrides` section provides placeholders for block-specific linting rules if you want to introduce them. `README.md` stubs out documentation for the block. ## Post-scaffolding cleanup OpenOps may alter the spelling of your block's display name during scaffolding, so review this and run search and replace if needed. For example, with YouTrack it didn't use the proper casing for the product name, generating "Youtrack" instead of "YouTrack". ### Product logo OpenOps stores logo assets within the project at `packages/react-ui/public/blocks/`. When contributing an integration, add your product's logo file (PNG or SVG format) directly to this directory and reference it using the path `/blocks/[product-name].png` in your integration code. For example, if your product is called YouTrack, add `youtrack.png` to `packages/react-ui/public/blocks/` and set the logo URL to `/blocks/youtrack.png` in your integration definition. This ensures your logo is included in the PR and will work immediately without requiring additional steps. ### Categories When scaffolding a block, OpenOps sets the block's `categories` property to `[BlockCategory.FINOPS]`. The `BlockCategory` enum defines the categories that a block can belong to, such as: * `FINOPS`: integrations with tools that recommend cloud usage optimization opportunities. * `CLOUD`: integrations with cloud providers. * `WORKFLOW`: blocks providing workflow composition logic. * `COLLABORATION`: integrations with project management and collaboration tools. * `DATA_SOURCES`: integrations with databases, data warehouses, and other data sources. * `DEVOPS`: integrations with version control and infrastructure-as-code (IaC) tools. When a user adds a new action to their workflow, they can apply a category filter in the pop-up menu that lists actions. Most blocks belong to one category, but some may belong to multiple. Since YouTrack is a project management and issue tracking service, the most appropriate category is `COLLABORATION`. Even basic scaffolding introduces the new block to the OpenOps UI, though the block doesn't do much yet. Here's what you can see at this point if you run `npm run start` and open the OpenOps frontend at [http://localhost:4200/](http://localhost:4200/) in your browser: The scaffolded block in OpenOps UI ## Implementing authentication Now that you have a block, you could start building its actions. However, unless your block interacts with a publicly accessible API, you need to provide the user with a way to authenticate with the API that your block is built on. How you implement authentication defines what the user sees when they try to create a new [connection](/cloud-access/access-levels-permissions) for your block. Scaffolding generated a placeholder authentication implementation and referenced it from the YouTrack block's entry point. What's left is to implement the actual authentication logic in the `src/lib/auth.ts` file. As a reminder, here's what the scaffolded file initially looked like: ```ts theme={null} import { BlockAuth, Property } from '@openops/blocks-framework'; export const youtrackAuth = BlockAuth.CustomAuth({ authProviderKey: 'youtrack', authProviderDisplayName: 'Youtrack', authProviderLogoUrl: 'https://static.openops.com/blocks/youtrack.png', description: 'Configure your Youtrack connection', required: true, props: { apiKey: Property.SecretText({ displayName: 'API Key', required: true, }), baseUrl: Property.ShortText({ displayName: 'Base URL', description: 'The base URL for Youtrack API', required: true, }), }, validate: async ({ auth }) => { // Add validation logic here return { valid: true }; }, }); ``` As you can see, this block uses the `CustomAuth()` helper function to define YouTrack authentication. There are other [types of authentication](/contributing/authentication/), but `CustomAuth()` works best for YouTrack because, in addition to an API key, the user needs to specify a base URL. YouTrack can be cloud-hosted by JetBrains, with a unique base URL for each cloud instance, or self-hosted by customers. The values of the `authProviderKey`, `authProviderDisplayName`, `authProviderLogoUrl`, and `required` properties are fine as they are. What needs to be changed are the values of `props`, `validate`, and `description`. Let's start with `props`. ### Defining connection properties `props` defines the inputs required to authenticate with the service provider that the block integrates with. Each of these inputs is an OpenOps UI component: it can be a regular or masked input field, a checkbox, a dropdown, and more. This component library is used not only for defining connections but also for defining the actions that a block exposes. The first property, `apiKey`, is for the user to provide a YouTrack API key (a.k.a. permanent token). The scaffolded version of this property uses the `SecretText` property type, which is a masked input field, and it's exactly what we need for this kind of data. Let's expand the scaffolded version of the property to include a description: ```ts theme={null} apiKey: Property.SecretText({ required: true, displayName: 'API key', description: 'The API key (permanent token) for your YouTrack installation.', }) ``` The second property, `apiUrl`, is for the user to provide the base URL of their YouTrack instance. This property is a regular input field. The scaffolded version is a good start, but we can improve it by adding a clearer description, providing a default value, and using a predefined validation rule for URLs: ```ts theme={null} apiUrl: Property.ShortText({ displayName: 'Base URL', description: 'The base URL of your YouTrack installation without a trailing slash.', required: true, validators: [Validators.url], defaultValue: 'https://your-instance.myjetbrains.com/youtrack', }) ``` Note that for this to compile, we need to extend the import from the `@openops/blocks-framework` package to include the `Validators` object: ```ts theme={null} import { BlockAuth, Property, Validators } from '@openops/blocks-framework'; ``` `Validators.url` is not the only predefined validation rule. OpenOps provides a set of ready-to-use validation rules for value ranges, dates, emails, phone numbers, image formats, and more. ### Adding custom validation Adding predefined validation rules to properties is one way to enforce a specific format or pattern for user input. You can also add custom validation rules using the `validate()` function. Some blocks, such as [Linear](https://github.com/openops-cloud/openops/blob/7fad45c16a0ab4a01eaa5a2b9b50d304effc9f83/packages/blocks/linear/src/index.ts#L29C1-L39C5), use `validate()` to ensure that the API key conforms to a specific format. With YouTrack, there's no need for this. Instead, it makes sense to check that the base URL doesn't have a trailing slash, since YouTrack doesn't normalize URLs with double slashes. Here's how this could be done: ```ts theme={null} validate: async ({ auth }) => { if (auth.apiUrl.endsWith('/')) { return { valid: false, error: 'Base URL must not end with a slash', }; } else { return { valid: true }; } } ``` The `auth` object passed to `validate()` contains the values of all the properties provided by the user. This lets you introduce additional checks on `auth.apiUrl`, which holds the entered base URL. You could also use `validate()` to try authenticating the user with a given API key. For example, the [ServiceNow](https://github.com/openops-cloud/openops/blob/7fad45c16a0ab4a01eaa5a2b9b50d304effc9f83/packages/blocks/servicenow/src/lib/auth.ts#L34C1-L54C5) and [Umbrella](https://github.com/openops-cloud/openops/blob/7fad45c16a0ab4a01eaa5a2b9b50d304effc9f83/packages/blocks/anodot/src/lib/anodot-auth-property.ts#L37C1-L64C5) blocks make sample requests to their APIs to let the user know immediately if authentication fails. ### Adding a Markdown description When a user sets up a connection, they may not immediately know how to obtain an API key or another value required during connection setup. To guide them, use the `description` property. The best part about this property is that it isn't limited to plain text — you can provide a Markdown-formatted string, and OpenOps will render it in the connection UI, between the title and the first input. For YouTrack, a Markdown description could look like this: ```ts theme={null} const markdown = ` To get your YouTrack API key: 1. Go to your YouTrack installation. 2. In the navigation menu, click your user profile icon, then click **Profile**. 3. Open the **Account Security** tab. 4. Under **Tokens**, click **New token**. 5. Give the new token a name and select **YouTrack** in the list of scopes. 6. Click **Create**. 7. Copy the token to your clipboard.`; ``` When providing a description as a separate variable, as shown here, remember to assign that variable to the `description` property: ```ts theme={null} description: markdown ``` ### Adding an interface The last step in the `src/lib/auth.ts` file is to define an interface for the two authentication properties. This interface will be imported into the files that define the block's actions to provide typing for the action parameters. For YouTrack authentication, the interface could look like this: ```ts theme={null} export interface YouTrackAuth { apiUrl: string; apiKey: string; } ``` ### The resulting authentication code and connection UI After implementing authentication, the `src/lib/auth.ts` file looks like this: ```ts theme={null} import { BlockAuth, Property, Validators } from '@openops/blocks-framework'; const markdown = ` To get your YouTrack API key: 1. Go to your YouTrack installation. 2. In the navigation menu, click your user profile icon, then click **Profile**. 3. Open the **Account Security** tab. 4. Under **Tokens**, click **New token**. 5. Give the new token a name and select **YouTrack** in the list of scopes. 6. Click **Create**. 7. Copy the token to your clipboard.`; export const youtrackAuth = BlockAuth.CustomAuth({ required: true, authProviderKey: 'youtrack', authProviderDisplayName: 'YouTrack', authProviderLogoUrl: 'https://resources.jetbrains.com/storage/products/company/brand/logos/YouTrack_icon.png', description: markdown, props: { apiKey: Property.SecretText({ required: true, displayName: 'API key', description: 'The API key (permanent token) for your YouTrack installation.', }), apiUrl: Property.ShortText({ displayName: 'Base URL', description: 'The base URL of your YouTrack installation without a trailing slash.', required: true, validators: [Validators.url], defaultValue: 'https://your-instance.myjetbrains.com/youtrack', }), }, validate: async ({ auth }) => { if (auth.apiUrl.endsWith('/')) { return { valid: false, error: 'Base URL must not end with a slash', }; } else { return { valid: true }; } }, }); export interface YouTrackAuth { apiUrl: string; apiKey: string; } ``` With this code, if the user creates a new connection in OpenOps, they will see a connection type for YouTrack: When they click the YouTrack logo, a connection dialog appears with a properly rendered Markdown description and three input fields. The **Connection name** field is predefined and prefilled with a suggested name for the connection. The other two fields, **API key** and **Base URL**, are the properties we defined earlier: A YouTrack connection dialog If the user enters a base URL with a trailing slash, the connection dialog executes the validation logic defined above and shows an error message: Base URL validation error ## Adding a simple action We have a block, we've implemented authentication, and now it's time to move on to the core of every integration: actions. ### Removing the default action When you scaffold a block, OpenOps adds an action called **Custom API Call**. While we could tweak it to work for YouTrack, let's instead remove it and create a new action from scratch. After removing the scaffolded action, the `src/index.ts` file looks like this: ```ts theme={null} import { createBlock } from '@openops/blocks-framework'; import { BlockCategory } from '@openops/shared'; import { youtrackAuth } from './lib/auth'; export const youtrack = createBlock({ displayName: 'YouTrack', auth: youtrackAuth, minimumSupportedRelease: '0.20.0', logoUrl: 'https://resources.jetbrains.com/storage/products/company/brand/logos/YouTrack_icon.png', authors: [], categories: [BlockCategory.COLLABORATION], actions: [], triggers: [], }); ``` The `actions` array is now empty. Once we create an action, we'll need to add a reference to it there. ### Scaffolding the new action OpenOps provides scaffolding for actions as well, so let's run this in the terminal: ```bash theme={null} npm run cli actions create ``` The CLI asks four questions to define the new action: 1. `Enter the block folder name`: the folder where the block for the new action resides. For the existing YouTrack block, the value should be `youtrack`. 2. `Enter the action display name`: a human-readable name for the action that users will see in the UI. It's also used to name the action's file. In this case, we want an action that lists issues in a YouTrack instance, so let's call it `Get all issues`. 3. `Enter the action description`: a brief, informative text shown in the UI to explain the action's function and purpose. Let's enter `Retrieves all issues from a YouTrack instance`. 4. `Does this action modify data or state (e.g., create, update, delete)?`: enter `n` for "No" as this is a read-only action. With these values, the CLI scaffolds the action in a new file named `get-all-issues.ts` in the YouTrack block's `/src/lib/actions` directory. The file initially looks like this: ```ts theme={null} import { createAction, Property } from '@openops/blocks-framework'; export const getAllIssues = createAction({ isWriteAction: false, name: 'getAllIssues', displayName: 'Get all issues', description: 'Retrieves all issues from a YouTrack instance', props: {}, async run() { // Action logic here }, }); ``` As you can see, the scaffolding uses the `createAction()` helper function to define the action. The values of `displayName` and `description` are the same as the values provided in the CLI. The `props` property is empty, which means there are no configuration options for the user to set. For this first action, that's fine; we'll add another action with configuration options later. ### Adding action execution logic The scaffolded action has two prominent omissions: 1. It doesn't have an `auth` property referencing the block's authentication logic implemented earlier. 2. Its `run()` function, which should define the action logic, is empty. Let's fix these two issues by replacing the scaffolded version with the following: ```ts theme={null} import { httpClient, HttpMethod } from '@openops/blocks-common'; import { createAction } from '@openops/blocks-framework'; import { youtrackAuth, YouTrackAuth } from '../auth'; export const getAllIssues = createAction({ isWriteAction: false, name: 'getAllIssues', displayName: 'Get all issues', description: 'Retrieves all issues from a YouTrack instance', props: {}, auth: youtrackAuth, async run(context) { const endpoint = '/api/issues?query=for:%20me%20%23Unresolved%20&fields=id,project(shortName),numberInProject,summary,description&$top=10'; const auth = context.auth as YouTrackAuth; const requestUrl = `${auth.apiUrl}${endpoint}`; const response = await httpClient.sendRequest({ method: HttpMethod.GET, url: requestUrl, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); return { _debug: { request: { method: 'GET', requestUrl, }, response: { status: response.status, }, }, issues: response.body, }; }, }); ``` Here's what's changed: 1. The action now has an `auth` property that references the block's authentication logic. Both the authentication logic and its interface are imported from the block's `auth.ts` file. 2. The `run()` function now makes a request to a YouTrack API endpoint to retrieve the first 10 unresolved issues. 3. To make the API call, the `run()` function uses the imported `httpClient` constant, which is an OpenOps-provided wrapper around the Axios HTTP client. Some blocks, such as [Linear](http://github.com/openops-cloud/openops/blob/main/packages/blocks/linear/src/lib/common/client.ts) and [Jira](https://github.com/openops-cloud/openops/blob/main/packages/blocks/jira-cloud/src/lib/common/index.ts), create separate functions for making HTTP requests to their APIs. This can be useful for providing extra error handling or leveraging existing SDKs, but for YouTrack, we can just use `httpClient` directly. 4. The `return` statement of the `run()` function defines what the user sees as the output of the action. The format of the returned object is up to the block author. In this case, we're returning an object with two properties: `_debug` and `issues`. The `_debug` property is a container for debugging information useful during development. The `issues` property is an array of issues retrieved from the YouTrack instance. ### Referencing the action from the block definition Before testing the action, we need to add it to the block's definition. In the `src/index.ts` file, we need to import the action and add it to the `actions` array: ```ts theme={null} import { createBlock } from '@openops/blocks-framework'; import { BlockCategory } from '@openops/shared'; import { getAllIssues } from './lib/actions/get-all-issues'; import { youtrackAuth } from './lib/auth'; export const youtrack = createBlock({ displayName: 'YouTrack', auth: youtrackAuth, minimumSupportedRelease: '0.20.0', logoUrl: 'https://resources.jetbrains.com/storage/products/company/brand/logos/YouTrack_icon.png', authors: [], categories: [BlockCategory.COLLABORATION], actions: [getAllIssues], triggers: [], }); ``` ### Testing the action Let's see what happens in the OpenOps UI now that the action is in place. First, the action is visible in the workflow editor and available for selection: The Get All Issues action in the workflow editor In the **Configure** tab of the action's properties pane, there's a connection selector, which is provided automatically because the action requires authentication. There are also two toggles, **Continue on Failure** and **Retry on Failure**, which are available for all actions. There are no properties specific to this action since we haven't defined any. If we go to the **Test** tab and click **Test Step**, the action connects to the YouTrack instance configured in the connection and returns results in the format defined by the `return` statement in the action's `run()` function: ## Adding an action with properties We've seen how to create a simple action that doesn't require any configuration. More often than not, real-world actions do require the user to enter or select values in the properties pane, and the values of these properties often depend on one another. For a YouTrack integration, it makes sense to enable the user not only to get the list of issues but also to update specific issues. Let's add a new action that allows the user to change the status of an issue. This action will include several configurable properties, and one of these properties will depend on the value of another. ### Scaffolding the new action First, let's use the OpenOps scaffolding to create a stub for the new action: ```bash theme={null} npm run cli actions create ``` The values to provide to the CLI are as follows: 1. `Enter the block folder name`: as before, this should be `youtrack`. 2. `Enter the action display name`: let's call the new action `Change issue status`. 3. `Enter the action description`: let's describe the action as `Updates the status of a given issue`. 4. `Does this action modify data or state (e.g., create, update, delete)?`: it's `Y` for "Yes" as this action does update the state of an external system. With these values, the CLI scaffolds the action in a new file named `change-issue-status.ts` in the YouTrack block's `/src/lib/actions` directory: ```ts theme={null} import { createAction, Property } from '@openops/blocks-framework'; export const changeIssueStatus = createAction({ isWriteAction: false, name: 'changeIssueStatus', displayName: 'Change issue status', description: 'Updates the status of a given issue', props: {}, async run() { // Action logic here }, }); ``` ### Referencing the action from the block definition This time, let's reference the new action in the block's definition (`src/index.ts`) before working on the action logic: ```ts theme={null} import { createBlock } from '@openops/blocks-framework'; import { BlockCategory } from '@openops/shared'; import { changeIssueStatus } from './lib/actions/change-issue-status'; import { getAllIssues } from './lib/actions/get-all-issues'; import { youtrackAuth } from './lib/auth'; export const youtrack = createBlock({ displayName: 'YouTrack', auth: youtrackAuth, minimumSupportedRelease: '0.20.0', logoUrl: 'https://resources.jetbrains.com/storage/products/company/brand/logos/YouTrack_icon.png', authors: [], categories: [BlockCategory.COLLABORATION], actions: [getAllIssues, changeIssueStatus], triggers: [], }); ``` ### Adding authentication and imports Back in the action file, let's start by referencing the authentication logic we defined earlier. While we're at it, let's also import the `YouTrackAuth` interface, along with the HTTP client that OpenOps provides: ```ts theme={null} import { httpClient, HttpMethod } from '@openops/blocks-common'; import { createAction, Property } from '@openops/blocks-framework'; import { YouTrackAuth, youtrackAuth } from '../auth'; export const changeIssueStatus = createAction({ auth: youtrackAuth, isWriteAction: false, name: 'changeIssueStatus', displayName: 'Change issue status', description: 'Updates the status of a given issue', props: {}, async run() { // Action logic here }, }); ``` ### Adding an interface representing a YouTrack project Before adding properties, let's define an interface for the YouTrack project that the issue being updated belongs to. We'll use it both in the property that helps select a project and in another property that depends on it. We could create the interface in a separate file, but placing it at the end of the `change-issue-status.ts` file works just as well: ```ts theme={null} interface YouTrackProject { id: string; name: string; shortName: string; } ``` ### Adding a dropdown property to select a project We can now add the first property to the `props` parameter of `createAction()`. This property represents a dropdown that lets the user select a YouTrack project that the issue being updated belongs to: ```ts theme={null} props: { project: Property.Dropdown({ displayName: 'Project', required: true, refreshers: ['auth'], options: async ({ auth }) => { if (!auth) { return { options: [], }; } const requestAuth = auth as YouTrackAuth; const projectsRequest = await httpClient.sendRequest({ method: HttpMethod.GET, url: `${requestAuth.apiUrl}/api/admin/projects?fields=id,name,shortName`, headers: { Authorization: `Bearer ${requestAuth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); return { options: projectsRequest.body.map((project: YouTrackProject) => { return { label: project.name, value: project, }; }), }; }, }), } ``` Here's what happens inside the `project` property: * `displayName` is how the dropdown for this property is labeled in the UI. * `required` marks this property as required. The action will not run unless the user selects a value. * `refreshers` defines when the values of this property should be re-evaluated. The value `auth` in this array means that this property refreshes only when the connection used by this action changes. * `options()` defines the logic for populating the values of this property. A quick check on the value of the `auth` property allows returning an empty set of values when no connection is defined. * If a connection is defined, it's safe to make a request to the YouTrack API to retrieve the list of projects in the connected YouTrack instance. * When the YouTrack API request succeeds, its response is transformed into an array of objects representing the projects. Each object has two properties: `label` and `value`. The `label` property is the text shown in dropdown items, representing the name of each YouTrack project. The `value` property contains additional information about the project retrieved from the API, including its ID and short name — these will be useful later when passed to another property. * The array is assigned to the `options` property of a new object that serves as the return value of the `options()` function. If we launch OpenOps, we can see that the new action is now available in the workflow editor: The Change Issue Status action If we add the action and open the properties pane, we can see the **Project** dropdown listing the projects available in the connected YouTrack instance: ### Adding an input property for an issue ID The next property we'll add to `props` is an input field that lets the user enter the numeric part of the ID of the issue to update. This type of property is simple, declarative, and doesn't contain any custom logic: ```ts theme={null} props: { ... issueId: Property.Number({ displayName: 'Number from issue ID', description: 'If issue ID is PRJ-47, enter 47 in this field', required: true, }), } ``` In the OpenOps UI, the user can either enter the value manually or use **Data Selector** to select a value from a previous step: ### Adding a dropdown property for the new status The final property we'll add to `props` is another dropdown that lets the user select the new status for the issue. This property shows different values depending on what's selected in the **Project** dropdown. ```ts theme={null} props: { ... newStatus: Property.Dropdown({ displayName: 'New Status', refreshers: ['project'], required: true, options: async ({ auth, project, }: { auth?: YouTrackAuth; project?: YouTrackProject; }) => { if (!auth || !project) { return { disabled: true, options: [], placeholder: 'Please authenticate and specify a project', }; } const projectCustomFieldsResponse = await httpClient.sendRequest({ method: HttpMethod.GET, url: `${auth.apiUrl}/api/admin/projects/${project.id}/customFields?fields=id,field(id,name,fieldType),bundle(id)`, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); const statusBundle = projectCustomFieldsResponse.body.find( (item: { bundle?: { $type?: string } }) => item.bundle?.$type === 'StateBundle', ); if (!statusBundle) { return { disabled: true, options: [], placeholder: "The selected project doesn't have a Status field.", }; } const statusBundleId = statusBundle.bundle.id; const statusValuesResponse = await httpClient.sendRequest({ method: HttpMethod.GET, url: `${auth.apiUrl}/api/admin/customFieldSettings/bundles/enum/${statusBundleId}/values?fields=id,name`, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); return { disabled: false, options: statusValuesResponse.body.map( (statusValue: { name: string; id: string }) => { return { label: statusValue.name, value: { newStatusValue: statusValue, bundle: statusBundle, }, }; }, ), }; }, }) } ``` It's quite a lot of code, but most of it deals with the specifics of the YouTrack API. Let's break down what's happening here: * The `refreshers` array contains `project`, meaning this dropdown refreshes every time a new value is selected in the **Project** dropdown. This is exactly what we want because different projects have different status values. * The `options()` function receives two parameters: `auth`, which represents the block authentication, and `project`, which holds the object representing the selected project. Remember the `value` property we returned from the `options()` of the `project` property? That's what the `project` parameter contains here. * If either parameter is undefined — meaning a connection isn't configured or a project isn't selected — the dropdown is disabled. * Two calls are made to YouTrack API endpoints to retrieve the list of status values in the selected project. The first call uses the `project` parameter, which reflects the selected value of the **Project** dropdown. If the project doesn't have a Status field, the dropdown is disabled and a placeholder is shown. * Once the list of status values is obtained, it's returned as an array in the `options` property representing the dropdown items. The `label` is the name of each status shown in the dropdown, and `value` contains additional data that will be used later when the action is executed. Looking at the OpenOps UI now, we can see that the **New Status** dropdown is available and lists status values for the selected project: If we select another project with a different set of status values, the dropdown updates accordingly: ### Adding action execution logic The last step is to add the logic executed when the action runs. This logic makes a request to the YouTrack API to update the issue's status, using the inputs provided by the user in the properties we added above. ```ts theme={null} async run(context) { const { project, issueId, newStatus } = context.propsValue; const { auth } = context; const issueExistsResponse = await httpClient.sendRequest({ method: HttpMethod.GET, url: `${auth.apiUrl}/api/issues/${project.shortName}-${issueId}?fields=id,summary,description,customFields(id,name,value(id,name))`, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); const issueDbId = issueExistsResponse.body?.id; if (!issueDbId) { throw new Error( 'The issue does not exist. Please fix inputs to specify an existing issue', ); } else { const issueCustomField = issueExistsResponse.body?.customFields?.find( (x: { id: string; $type: string }) => x.id === newStatus.bundle.id, ); const updateIssueStatusResponse = await httpClient.sendRequest({ method: HttpMethod.POST, url: `${auth.apiUrl}/api/issues/${issueDbId}?fields=id,numberInProject,project,summary,description,customFields(id,name,value(id,name))`, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: { customFields: [ { value: newStatus.newStatusValue, id: issueCustomField.id, $type: issueCustomField.$type, }, ], }, }); return updateIssueStatusResponse.body; } } ``` Here's what's happening in this function: * The `run()` function receives the `context` object, which contains extensive data about the current action and the workflow's execution state, including the block authentication (`context.auth`) and the values of all the action's properties (`context.propsValue`). * The first call to the YouTrack API checks that the specified issue exists. In that call, we're using the values from both the **Project** dropdown and the **Number from issue ID** input field. * If the issue exists, we look for the part of its data that represents the status field. Once found, another YouTrack API call updates the status to the value specified in the **New Status** dropdown. * The updated issue data is returned from the `run()` function, and this is what the user sees as the output of the executed action. If we go to the workflow editor now and test the action, here's the kind of output we should see: In this case, we're simply returning the body of the response from the YouTrack API, but you could return an object with a different shape. That's entirely up to you. This wraps up the **Change issue status** action. Since it uses several dynamic properties and the YouTrack API isn't always succinct, the code for the action is fairly long. Here's the full listing of the resulting `change-issue-status.ts` file: ```ts theme={null} import { httpClient, HttpMethod } from '@openops/blocks-common'; import { createAction, Property } from '@openops/blocks-framework'; import { YouTrackAuth, youtrackAuth } from '../auth'; export const changeIssueStatus = createAction({ auth: youtrackAuth, isWriteAction: false, name: 'changeIssueStatus', displayName: 'Change issue status', description: 'Updates the status of a given issue', props: { project: Property.Dropdown({ displayName: 'Project', required: true, refreshers: ['auth'], options: async ({ auth }) => { if (!auth) { return { options: [], }; } const requestAuth = auth as YouTrackAuth; const projectsRequest = await httpClient.sendRequest({ method: HttpMethod.GET, url: `${requestAuth.apiUrl}/api/admin/projects?fields=id,name,shortName`, headers: { Authorization: `Bearer ${requestAuth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); return { options: projectsRequest.body.map((project: YouTrackProject) => { return { label: project.name, value: project, }; }), }; }, }), issueId: Property.Number({ displayName: 'Number from issue ID', description: 'If issue ID is PRJ-47, enter 47 in this field', required: true, }), newStatus: Property.Dropdown({ displayName: 'New Status', refreshers: ['project'], required: true, options: async ({ auth, project, }: { auth?: YouTrackAuth; project?: YouTrackProject; }) => { if (!auth || !project) { return { disabled: true, options: [], placeholder: 'Please authenticate and specify a project', }; } const projectCustomFieldsResponse = await httpClient.sendRequest({ method: HttpMethod.GET, url: `${auth.apiUrl}/api/admin/projects/${project.id}/customFields?fields=id,field(id,name,fieldType),bundle(id)`, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); const statusBundle = projectCustomFieldsResponse.body.find( (item: { bundle?: { $type?: string } }) => item.bundle?.$type === 'StateBundle', ); if (!statusBundle) { return { disabled: true, options: [], placeholder: "The selected project doesn't have a Status field.", }; } const statusBundleId = statusBundle.bundle.id; const statusValuesResponse = await httpClient.sendRequest({ method: HttpMethod.GET, url: `${auth.apiUrl}/api/admin/customFieldSettings/bundles/enum/${statusBundleId}/values?fields=id,name`, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); return { disabled: false, options: statusValuesResponse.body.map( (statusValue: { name: string; id: string }) => { return { label: statusValue.name, value: { newStatusValue: statusValue, bundle: statusBundle, }, }; }, ), }; }, }), }, async run(context) { const { project, issueId, newStatus } = context.propsValue; const { auth } = context; const issueExistsResponse = await httpClient.sendRequest({ method: HttpMethod.GET, url: `${auth.apiUrl}/api/issues/${project.shortName}-${issueId}?fields=id,summary,description,customFields(id,name,value(id,name))`, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, }); const issueDbId = issueExistsResponse.body?.id; if (!issueDbId) { throw new Error( 'The issue does not exist. Please fix inputs to specify an existing issue', ); } else { const issueCustomField = issueExistsResponse.body?.customFields?.find( (x: { id: string; $type: string }) => x.id === newStatus.bundle.id, ); const updateIssueStatusResponse = await httpClient.sendRequest({ method: HttpMethod.POST, url: `${auth.apiUrl}/api/issues/${issueDbId}?fields=id,numberInProject,project,summary,description,customFields(id,name,value(id,name))`, headers: { Authorization: `Bearer ${auth.apiKey}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: { customFields: [ { value: newStatus.newStatusValue, id: issueCustomField.id, $type: issueCustomField.$type, }, ], }, }); return updateIssueStatusResponse.body; } }, }); interface YouTrackProject { id: string; name: string; shortName: string; } ``` ## Summary This guide walked you through creating a fully functional third-party integration for OpenOps by building a JetBrains YouTrack block with two actions. Along the way, you learned techniques involved in developing OpenOps blocks, including: * Implementing custom authentication that requires specifying an API key and a base URL. To learn more about authentication types that OpenOps supports, see [Authentication](/contributing/authentication/). * Adding configuration properties to actions, including dynamic, interdependent properties. * Using values returned by properties in other properties, as well as in the action's execution logic. To dive deeper into the internals of OpenOps blocks, explore the [code of existing blocks](https://github.com/openops-cloud/openops/tree/main/packages/blocks) or review past pull requests that added new blocks, such as [Ternary](https://github.com/openops-cloud/openops/pull/326), [ServiceNow](https://github.com/openops-cloud/openops/pull/1078), and [nOps.io](https://github.com/openops-cloud/openops/pull/1403). # Creating a Minimal Block Source: https://docs.openops.com/contributing/creating-a-minimal-block How to quickly create a new minimal OpenOps block Let's see what it takes to create a new OpenOps block, add an action to it, and view it in the OpenOps UI. Before you begin, make sure you've [set up your development environment](/contributing/development-environment/). ## Scaffold a new block To get started, generate a new block by running the following command: ```bash theme={null} npm run cli blocks create ``` You will be asked four questions to define your new block: 1. `Block name`: enter `my-unique-block`: a name that uniquely identifies your block in the OpenOps repository. 2. `Package name`: optionally, enter a name for the npm package associated with your block. If left blank, the default name will be used: `@openops/block-`. 3. `Authentication type`: select `None` for now, as this minimal block will work with a publicly available API. Other options are `Secret (API key)`, `Custom (custom properties)`, and `OAuth2 (OAuth2 flow)`. 4. `Create opinionated folder structure with stubs for actions, tests, and common service layer`: select `Yes - Create full folder structure with stubs`. OpenOps will generate a full project template inside `packages/blocks//`. The scaffolded files are as follows: * Source and tests: * `src/index.ts`: the main entry point of your block, where you'll define its metadata (name, display name, description) and register actions. * `test/index.test.ts`: a starter Jest test file where you can add unit tests for your block. * Project metadata: * `package.json`: declares the block as an npm package. * `project.json`: configuration for the Nx build system that OpenOps uses. * `README.md`: a starter readme file describing what the block does and how to use it. * Tooling and quality: * `.eslintrc.json`: ESLint rules for enforcing code style and catching errors. * `jest.config.ts`: configuration for Jest, the test runner used by OpenOps. * TypeScript setup: * `tsconfig.json`: base TypeScript configuration for the block. * `tsconfig.lib.json`: TypeScript settings for the block's source code. * `tsconfig.spec.json`: TypeScript settings for the block's tests. * `tsconfig.base.json` (in the repo root): serves as a central list of all TypeScript settings, and the CLI updates it to include your new block. The `src/index.ts` file should contain the following code: ```ts theme={null} import { BlockAuth, createBlock } from '@openops/blocks-framework'; export const myUniqueBlock = createBlock({ displayName: 'My-unique-block', auth: BlockAuth.None(), minimumSupportedRelease: '0.20.0', logoUrl: 'https://static.openops.com/blocks/my-unique-block.png', authors: [], actions: [], triggers: [], }); ``` ## Create an action Now let's create the first action, which will make a simple GET request to [httpbin.org](https://httpbin.org/). ```bash theme={null} npm run cli actions create ``` You will be asked four questions to define your new action: 1. `Enter the block folder name`: enter the folder of the block you've just created: `my-unique-block`. 2. `Enter the action display name`: enter the name of the action that users see in the OpenOps UI. This is also used as the base for the name of the file for the action. For this exercise, enter `My first action`. 3. `Enter the action description`: this should be a brief but informative text in the UI, explaining the action's function and purpose. For this exercise, it's OK to enter `What this action does`. 4. `Does this action modify data or state (e.g., create, update, delete)?`: enter `n` for "No". If the action display name is `My first action`, the CLI will create a new file named `my-first-action.ts` in the `packages/blocks//src/lib/actions` directory. The file should look like this: ```typescript theme={null} import { createAction, Property } from '@openops/blocks-framework'; export const myFirstAction = createAction({ isWriteAction: false, name: 'myFirstAction', displayName: 'My first action', description: 'What this action does', props: {}, async run() { // Action logic here }, }); ``` Inside this file, paste the following code instead: ```typescript theme={null} import { createAction, Property } from '@openops/blocks-framework'; import { httpClient, HttpMethod } from '@openops/blocks-common'; export const myFirstAction = createAction({ isWriteAction: false, name: 'myFirstAction', displayName: 'My first action', description: 'What this action does', props: {}, async run(context) { const res = await httpClient.sendRequest({ method: HttpMethod.GET, url: 'https://httpbin.org/get', }); return res.body; }, }); ``` Here's what happens in the code above: * The `createAction` function takes an object with several properties, including the `name`, `displayName`, `description`, `props`, and `run` function of the action. * The `props` property is an object that defines the properties the action needs the user to configure. In this case, the action doesn't require any properties. * The `run()` function is called when the action is executed. It takes a single argument, `context`, which contains the values of the action's properties. In this case, the action doesn't have any properties, so the `context` parameter remains unused. * The `run()` function uses the `httpClient` helper provided by OpenOps to make a GET request to [httpbin.org](https://httpbin.org/). * The `run()` function returns the body of the response to the GET request, and this is what the action provides as its final output. ## Reference the action in the block definition To make the action discoverable by OpenOps, import it into the block definition file at `src/index.ts` and add it to the `actions` array in the definition: ```typescript theme={null} import { BlockAuth, createBlock } from '@openops/blocks-framework'; import { myFirstAction } from './lib/actions/my-first-action'; export const myUniqueBlock = createBlock({ displayName: 'My-unique-block', auth: BlockAuth.None(), minimumSupportedRelease: '0.20.0', logoUrl: 'https://static.openops.com/blocks/my-unique-block.png', authors: [], actions: [myFirstAction], triggers: [], }); ``` ## See your action in the OpenOps UI Once you reference an action from your block definition and the running `npm start` process rebuilds OpenOps, you should see your action in the OpenOps UI for the first time: Your action in OpenOps UI If you use the action, you can see that it doesn't contain configurable properties apart from the two switches that OpenOps makes available to all actions. This is expected, as you haven't defined any properties in your action: Action properties If you go to the **Test** tab and click **Test Step**, you can see that it successfully returns a response from an API call to [httpbin.org](https://httpbin.org/): Testing the action Congratulations! You've just created your first OpenOps block and action. The block doesn't do a lot, and if you're wondering how to develop a block that does something useful, such as implementing a working integration with a third-party API, check out the [Contributing an Integration](/contributing/contributing-an-integration/) guide. # Development Environment Source: https://docs.openops.com/contributing/development-environment Setting up the development environment for contributing to OpenOps Before you start contributing to OpenOps, you need to set up a development environment. While you can set up a local environment, using GitHub Codespaces is the easiest way to get started. ## Fork the OpenOps repository Follow these steps to fork the OpenOps repository: 1. Go to [https://github.com/openops-cloud/openops](https://github.com/openops-cloud/openops). 2. Click the **Fork** button in the top right corner. 3. On the fork configuration page, select the owner to fork under (either your personal account or one of your organizations), then click **Create Fork**. Your fork will be available at `https://github.com/your_github_account_or_organization/openops`. ## Set up Codespaces In your OpenOps fork, click **\<> Code**, open the **Codespaces** tab, and click **Create codespace on main**: Create a codespace GitHub will open a new browser tab with a codespace. Wait for it to finish setting up. Review the extensions that Codespaces recommends. Consider installing **Prettier – Code formatter** and **Jest Runner**. Codespaces will automatically run `npm start` in the terminal. In the **Ports** tool window, click **Open in browser** in the **App Frontend** row to open the OpenOps frontend in a new tab: Ports tool window When the OpenOps frontend opens, log in with the following credentials: * Username: `Dev@openops.com` * Password: `12345678` When developing on Codespaces, keep in mind the following: * GitHub limits Codespaces usage for free accounts when working on a personal fork. To access more Codespaces hours, consider forking to an organization. * After extended inactivity, Codespaces may lose connectivity between ports used by OpenOps components. To fix this, do one of the following: * Run `sh .devcontainer/codespaces.sh` in the terminal. * In the **Ports** tab, make the following ports public: `3000`, `3001`, `3005`, `4200`. # Overview Source: https://docs.openops.com/contributing/index How to contribute to OpenOps OpenOps is an [open-source project](https://github.com/openops-cloud/openops) that welcomes external contributions. Extending OpenOps is fairly straightforward, and this section explains what you need to know to get started. ## How to contribute The general process of contributing to OpenOps consists of: * Setting up your [development environment](/contributing/development-environment/). * Scaffolding a new block. The block serves as a container for [actions](/workflow-management/actions/) that users can add to their workflows as steps. * Implementing authentication for the block. Most non-core OpenOps blocks integrate with third-party services via their APIs, and most APIs require authentication. Implemented authentication allows users to set up [connections](/cloud-access/access-levels-permissions/) and access whatever API your block is built around. * Scaffolding one or more actions. * Implementing properties: the configuration settings available to users in the properties pane. Some actions don't have properties, but most do. * Implementing the logic of the actions: what exactly they execute once all properties are configured. * Testing the block. * [Submitting a pull request](https://github.com/openops-cloud/openops/blob/main/CONTRIBUTING.md) to the main OpenOps repository. When you submit a PR, include a link to a square logo of the service your block integrates with, ensuring that it's cleared for public use. Once the OpenOps team uploads the logo to the OpenOps static server, replace the original logo link in the PR with the OpenOps-hosted one. To learn how to quickly create a block that appears in the OpenOps UI and executes a minimal workload, see [Creating a Minimal Block](/contributing/creating-a-minimal-block/). To learn how to develop a more advanced block that provides full-fledged integration with a third-party service, see [Contributing an Integration](/contributing/contributing-an-integration/). ## Examples of contributions For reference, here are examples of past pull requests that contributed new blocks to OpenOps: * [Ternary integration](https://github.com/openops-cloud/openops/pull/326) * [Databricks integration](https://github.com/openops-cloud/openops/pull/434) * [ServiceNow integration](https://github.com/openops-cloud/openops/pull/1078) * [nOps.io integration](https://github.com/openops-cloud/openops/pull/1403) # Designing Workflows with FinOps Platforms Source: https://docs.openops.com/cookbook/designing-workflows-with-finops-platforms Common patterns for building OpenOps workflows around recommendations and anomalies from FinOps platforms FinOps platforms such as CloudHealth, Cloudability, Umbrella, or Ternary are good at finding cost optimization opportunities, but acting on them usually involves people: someone has to review a recommendation, approve a change, or decide to snooze it. OpenOps workflows take care of that part. Most workflows built on a FinOps platform block follow the same shape: 1. Fetch recommendations, anomalies, or plans from the platform on a schedule. 2. Iterate through them and determine who owns the affected resource. 3. Ask the owner for a decision in Slack or Microsoft Teams. 4. Act on the decision: remediate the resource, open a ticket, or snooze the item in the platform. 5. Record the outcome in an OpenOps table. Step 1 is covered by each platform's fetch action. This page describes the patterns behind steps 2 to 5. For a complete, step-by-step example, see the [CloudHealth integration guide](/integrations/cloudhealth), which builds two workflows around these patterns. While the guide covers one specific product, the same principles apply to every FinOps platform block, and each page in the Integrations section describes how that platform's actions fit these patterns. ## Owner mapping Recommendations often need to be routed to the people who own the affected resources. OpenOps workflows can map cloud resources to their owners using the tag values that the platform returns with each recommendation, and the preconfigured [*Tag-owner mapping* table](/reporting-analytics/tables#tag-owner-mapping). There are two ways to fill the table: * If the platform returns owner information, such as a team or an email address in a tag, a separate workflow can add owners or departments to the table automatically. * If it does not, populate the table manually once for each business unit, so that subsequent workflow runs know which team member should receive notifications or approval requests. For an example of implementing owner mapping as a separate workflow, see [Creating a workflow to fill the project-owner mapping table](/integrations/cloudhealth#creating-a-workflow-to-fill-the-project-owner-mapping-table) in the CloudHealth guide. ## Tracking recommendations in OpenOps tables Rather than acting on each recommendation once and then losing track of its status, your workflow can log recommendations to the preconfigured [*Opportunities* table](/reporting-analytics/tables#opportunities) for centralized tracking and status management. Each record can hold details such as estimated savings, resource IDs, recommendation types, and a current status: *Created*, *Under Review*, *Dismissed*, or *Snoozed*. Before notifying anyone, the workflow looks the recommendation up in the table and skips items that are already being handled. This approach prevents duplicate notifications, provides audit trails, and enables reporting on realized vs. unrealized savings across your organization. Learn how to implement opportunity tracking by following the [CloudHealth recommendation logging workflow](/integrations/cloudhealth#look-up-the-opportunity-in-the-openops-table). ## Requesting decisions in Slack or Microsoft Teams For recommendations that require human judgment, OpenOps can send interactive messages that allow resource owners to decide directly from Slack or Microsoft Teams. After using owner mapping to identify the right person, the workflow sends a message with buttons for the available responses using *Request Action* in the Slack or Microsoft Teams action block, and waits for a click. Typical responses and what the workflow does next: * **Approve**: remediate the resource using the actions available for the [cloud platforms OpenOps supports](/cloud-access/supported-cloud-providers), or ask the platform to execute the fix where it offers that. * **Open a ticket**: create a Jira issue or a ticket in another system with the recommendation details. * **Snooze**: delay the recommendation in the platform using its snooze or status action, and set the status to *Snoozed* in the *Opportunities* table. * **Dismiss**: mark the recommendation as rejected in the table, and in the platform if it supports that. For Slack, when buttons are not enough, for example when the owner has to pick a team from a long list, use *Send Message* with a Block Kit select element followed by *Wait For User Action*, as described in [Human-in-the-loop](/workflow-management/human-in-the-loop). The Microsoft Teams block offers *Request Action* with buttons only. See [Send a Slack notification with action buttons](/integrations/cloudhealth#send-a-slack-notification-with-action-buttons) in the CloudHealth guide for implementation details. # Iterating Over Multiple AWS Accounts Source: https://docs.openops.com/cookbook/iterate-over-multiple-aws-accounts How to configure a connection and build a workflow to work with multiple AWS accounts If you want to build a workflow that works across multiple AWS accounts instead of just one, this is possible, but there's a quirk. Some AWS-related actions have built-in support for multiple AWS accounts via a multi-select dropdown: In the *AWS* block, these actions are *Get Account IDs*, *EBS Get Volumes*, *EBS Get Snapshots*, *EC2 Get Instances*, *RDS Get Instances*, and *RDS Get Snapshots*. In addition, all actions in the *AWS Compute Optimizer* block support multiple accounts. All other actions in AWS-related blocks only support a single account. This means that if your workflow contains at least one action that only supports a single AWS account, you need to first **get a list of accounts**, then **introduce a loop step to iterate** over them. Additionally, you'll need a specifically configured AWS connection that enables access to multiple accounts. Here's how you could do this. ## 1. Create an AWS connection that enables access to multiple accounts If you don't yet have one, [set up an AWS connection that supports multiple accounts](/cloud-access/access-levels-permissions#connecting-to-multiple-aws-accounts) using assume roles. ## 2. Get the list of accounts In your workflow, add a **Get Account IDs** AWS action. Choose the connection that enables access to multiple accounts. Then, in the **Accounts** property, use the multi-select dropdown to select all accounts that you want to iterate over: A Get Account IDs action When you test this action, you'll see that it returns an array of objects where each object contains the account ID and the account name: ```json theme={null} [ { "accountId": "295912458647", "accountName": "MockAcc" }, { "accountId": "616998899502", "accountName": "main acc" } ] ``` ## 3. Iterate over accounts Add a **Loop on Items** step to your workflow. In the **Items** property, use the **Data Selector** view to select **Get Account IDs** — that is, the entire output of the previous step: A Loop on Items step ## 4. Add an AWS step inside the loop and make the account property dynamic Inside the loop, add an AWS action that you want to perform for each account. In the action's properties, select the connection that enables access to multiple accounts. To the right of the **Accounts** property label, click **Dynamic**. This will change the property from a dropdown to an input field. Inside the input field, use **Data Selector** to expand **Loop in Items**, then **item**, then click **Insert** alongside the **accountId** property: Proceed to setting other properties of the AWS action as needed. This technique of specifying a single account ID using the **Dynamic** switch works for all AWS actions inside the loop, whether they only support a single account or multiple accounts. Here's a [sample workflow](https://docs.openops.com/workflows/multiple-aws-accounts.json) that you can [import](/workflow-management/import-export/#importing-workflows) to your OpenOps instance. The workflow uses this approach and includes the **AWS CLI** action inside the loop. # Iterating Over Multiple Azure Subscriptions Source: https://docs.openops.com/cookbook/iterate-over-multiple-azure-subscriptions How to build a workflow that performs actions across multiple Microsoft Azure subscriptions You can build workflows that retrieve the list of available Azure subscriptions and iterate over them. Here's how to proceed. ## 1. Create an Azure connection that enables access to multiple subscriptions First, create an [Azure connection](/cloud-access/access-levels-permissions#azure-connections) if you don't already have one. Unlike AWS connections, OpenOps doesn't provide a built-in way to grant access to multiple Azure subscriptions from connection settings. Instead, you can use a single Azure **service principal** (application) to access multiple subscriptions by assigning it roles in each of them. To do this: 1. In your Azure Active Directory tenant, create an app registration and a corresponding service principal. 2. Generate a client secret for the service principal. Use the service principal's **Application (client) ID**, **Client secret**, and **Directory (tenant) ID** to create an OpenOps connection. 3. In the Azure Portal or CLI, assign the same service principal appropriate RBAC roles (for example, *Reader* or *Contributor*) in each subscription you want OpenOps to access. Once the service principal has access to multiple subscriptions, an OpenOps connection configured with its credentials can perform actions in any of those subscriptions. ## 2. Get the list of subscriptions In your workflow, add an **Azure CLI** action. In the action's properties, select the connection that enables access to multiple subscriptions. Select any subscription in the **Subscriptions** dropdown. In the **Command** field, enter the following: ```shell theme={null} az account list --output json ``` An Azure CLI action to get the list of subscriptions When you test this action, it returns an array of objects, where each object includes the subscription ID and related metadata: ```json theme={null} [ { "cloudName": "AzureCloud", "homeTenantId": "536df0a4-c5d9-4a38-adfa-3a81dcc81a33", "id": "85ec64cc-2107-4774-a848-87a92543bacd", "isDefault": true, "managedByTenants": [], "name": "Microsoft Azure Sponsorship", "state": "Enabled", "tenantId": "536df0a4-c5d9-4a38-adfa-3a81dcc81a33", "user": { "name": "2008127b-13d0-41e4-ad41-d8f2b2de6c92", "type": "servicePrincipal" } }, { "cloudName": "AzureCloud", "homeTenantId": "536df0a4-c5d9-4a38-adfa-3a81dcc81a33", "id": "2c4a9e11-7f21-4e5a-bdfb-83e4c3a951d0", "isDefault": false, "managedByTenants": [], "name": "Development Sandbox", "state": "Enabled", "tenantId": "536df0a4-c5d9-4a38-adfa-3a81dcc81a33", "user": { "name": "2008127b-13d0-41e4-ad41-d8f2b2de6c92", "type": "servicePrincipal" } } ] ``` ## 3. Iterate over subscriptions Add a **Loop on Items** step to your workflow. In the **Items** property, use the **Data Selector** view to select the entire output of the previous step: A Loop on Items step ## 4. Add an Azure step inside the loop and inject the subscription ID into the command Inside the loop, add an Azure action that you want to perform for each subscription — for example, another **Azure CLI** action. In the action's properties, select the connection that enables access to multiple subscriptions. Select any subscription in the **Subscriptions** dropdown. In the **Command** field, enter the command you want to run. For example, to list active VMs in each subscription, enter: ```shell theme={null} az vm list --subscription= --show-details --output json ``` Set the caret after the `--subscription=` flag. Use **Data Selector** to expand **Loop on Items**, then **item**, and click **Insert** next to the **id** property: The resulting command in the properties pane will look like this, dynamically inserting the current subscription ID into the command template: A command with a dynamic subscription ID Similarly, you can use **Data Selector** to inject the subscription ID into other Azure actions inside the loop. You can [download the workflow](https://docs.openops.com/workflows/multiple-azure-subscriptions.json) described above and [import it](/workflow-management/import-export/#importing-workflows) into your OpenOps instance. # Iterating Over Multiple Google Cloud Projects Source: https://docs.openops.com/cookbook/iterate-over-multiple-gcp-projects How to build a workflow that performs actions across multiple Google Cloud Platform projects You can build workflows that retrieve the list of your Google Cloud projects and iterate over them. Here's how to do it. ## 1. Create a Google Cloud connection that enables access to multiple projects First, create a [Google Cloud connection](/cloud-access/access-levels-permissions#google-cloud-connections) if you don't already have one. Unlike AWS connections, OpenOps doesn't provide a built-in way to enable access to multiple Google Cloud projects from connection settings. How you enable multi-project access depends on the type of connection you use. If your connection uses a **service account JSON key**: 1. Create a service account in one of your Google Cloud projects. 2. Create an OpenOps connection using that service account. 3. In each additional project that you want OpenOps to access, grant the same service account appropriate IAM roles (for example, *Viewer* or *Editor*) in that project's IAM settings. If your connection uses **local Google Cloud CLI credentials**, OpenOps will use the same identity as your local `gcloud` session (the user or service account you are logged in as). Multi-project access works automatically if that identity already has IAM roles in multiple projects. If not, grant the same user or service account the necessary roles in each target project's IAM settings. ## 2. Get the list of projects In your workflow, add a **Google Cloud CLI** action. In the action's properties, select the connection that enables access to multiple projects. Select any project in the **Default Project** dropdown. In the **Command** field, enter the following: ```shell theme={null} gcloud projects list --format=json ``` A Google Cloud CLI action to get the list of projects When you test this action, it returns an array of objects, each containing the project ID and other metadata: ```json theme={null} [ { "createTime": "2023-01-29T11:04:39.918Z", "lifecycleState": "ACTIVE", "name": "Unmeet", "projectId": "unmeet-476981", "projectNumber": "8310764926267" }, { "createTime": "2022-05-26T16:42:52.982Z", "lifecycleState": "ACTIVE", "name": "BigQuery", "projectId": "bigquery-451001", "projectNumber": "456972339442" } ] ``` ## 3. Iterate over projects Add a **Loop on Items** step to your workflow. In the **Items** property, use the **Data Selector** view to select the entire output of the previous step: A Loop on Items step ## 4. Add a Google Cloud step inside the loop and inject the project ID into the command Inside the loop, add a Google Cloud action that you want to perform for each project — for example, another **Google Cloud CLI** action. In the action's properties, select the connection that enables access to multiple projects. Select any project in the **Default Project** dropdown. In the **Command** field, enter the command you want to run. For example, to list active Compute Engine instances in each project, enter: ```shell theme={null} gcloud compute instances list --project= --format=json ``` Set the caret after the `--project=` flag. Use **Data Selector** to expand **Loop on Items**, then **item**, and click **Insert** next to the **projectId** property: The resulting command in the properties pane will look like this, dynamically injecting the current project ID into the command template: A command with a dynamic project ID In the same way, you can use **Data Selector** to inject the project ID into other Google Cloud actions inside the loop. You can [download the workflow](https://docs.openops.com/workflows/multiple-gcp-projects.json) described above and [import it](/workflow-management/import-export/#importing-workflows) into your OpenOps instance. # AWS EC2 Deployment Source: https://docs.openops.com/getting-started/deployment/aws-ec2 How to deploy OpenOps on an AWS EC2 instance This guide is for testing and evaluation purposes only and is not intended for production deployments. Please reach out to us at [support@openops.com](mailto:support@openops.com) if you'd like to learn how to set up OpenOps in a production environment. This guide explains how to install the OpenOps Docker Compose release on a newly created EC2 instance. It assumes you have appropriate permissions on an existing AWS account. ## Initial deployment ### Create a new EC2 instance 1. On the EC2 home page, click **Launch Instance**: 2. Choose a name for your instance and configure the following settings: * **Application and OS Images (Amazon Machine Image)** * Choose **Ubuntu** as the instance image, as it simplifies Docker installation. Ubuntu Server 24.04 LTS was the latest available version when this guide was written. * Keep **64-bit (x86)** as the instance architecture. * **Instance type**. The *t3.large* instance type provides decent performance. You can choose a different type according to your needs, but it's not recommended to select a size smaller than *t3.medium*. * **Key pair (login)**. Creating a new SSH key pair is recommended but not mandatory. * **Network settings**. Allow SSH traffic from your own IP address: Network settings * **Configure storage**. Choose **50GB** to ensure you have enough space for Docker images and databases. 3. In the **Summary** section on the right, click **Launch instance**: 4. Once the instance is launched, navigate to instance details by clicking the instance ID: Instance launched 5. Configure the network settings and open the necessary ports: 1. Open the **Security** tab, then click on the security group. Security tab 2. Click **Edit inbound rules**. 3. Add two new rules by clicking **Add rule** each time: 1. In the first rule, for **Type**, choose **HTTP**, and under **Source**, select **My IP**. 2. In the second rule, for **Type**, choose **SSH**. Click the text field next to **Source**, and search for `ec2-instance-connect`. Select the prefix list with the full name similar to `com.amazonaws.us-east-1.ec2-instance-connect`, depending on your region. This allows you to connect to the instance via AWS CloudShell. Prefix lists The resulting set of inbound rules should look like this: New inbound rules 4. Click **Save rules** to finish the configuration. ### Connect to the instance with CloudShell 1. Back in the instance details view of your EC2 instance, and click **Connect**. 2. In the **Connect** view, use default connection settings and click **Connect** again, then wait for CloudShell to initialize an in-browser session. Connect to instance ### Install OpenOps Run the following command in your terminal to install, update, configure and run OpenOps: ```shell theme={null} curl -fsS https://openops.sh/install | sh ``` Alternatively, you can follow the manual installation steps: 1. Install the `unzip` utility: ```shell theme={null} sudo apt install unzip ``` 2. Create a new directory and download the OpenOps release files: ```shell theme={null} mkdir -p openops && cd openops && \ wget https://github.com/openops-cloud/openops/releases/download/0.7.1/openops-dc-0.7.1.zip && \ unzip -o openops-dc-0.7.1.zip && cp -n .env.defaults .env ``` 3. Update the application URL to use the instance's external IP address: ```shell theme={null} EXTERNAL_IP=$(curl -4 -s ifconfig.co) sed -i "s|http://localhost|http://$EXTERNAL_IP|g" .env ``` 4. Open the `.env` file in the OpenOps installation folder. Change the values of the following variables that represent credentials. Do it now, as you won't be able to change these values after the initial deployment: * `OPS_OPENOPS_ADMIN_EMAIL`: the email of your OpenOps installation's root admin account. * `OPS_OPENOPS_ADMIN_PASSWORD`: the password of your OpenOps installation's root admin account. * `OPS_POSTGRES_USERNAME`: the username of the Postgres database that OpenOps uses. * `OPS_POSTGRES_PASSWORD`: the password of the Postgres database that OpenOps uses. * `OPS_ANALYTICS_ADMIN_PASSWORD`: the password of the [OpenOps Analytics](/reporting-analytics/data-visualization/) admin account (the username is hardcoded to `admin`). 5. Install Docker using Snap: ```shell theme={null} sudo snap install docker ``` 6. Pull the images and start the Docker containers: ```shell theme={null} sudo COMPOSE_PARALLEL_LIMIT=4 docker compose pull -q && sudo docker compose up -d ``` If you encounter a rate limit, rerun the pull command. Note that pulling images may take several minutes. If you did not update credentials in the `.env` file, the default username is `admin@openops.com` and the password is `please-change-this-password-1`. You can now access the OpenOps application by navigating to the public IP address of your (e.g., `http://20.20.20.20`). ## Network ports used by OpenOps By default, OpenOps does not require any inbound ports other than the application port `80`. The following ports are used by bundled services and, in most cases, should not be exposed: * `5432`: The PostgreSQL database used by OpenOps. Expose this port only if you need direct database access, such as for [connecting OpenOps to external analytics tools](/reporting-analytics/connecting-to-external-tools/). Restrict access to a VPN or a trusted IP range. * `6379`: OpenOps' internal Redis service. Expose this port only if required for debugging or monitoring purposes. Restrict access to a VPN or a trusted IP range. ## External databases To use external PostgreSQL or Redis databases, modify the relevant variables in the `.env` file. You can disable the corresponding containers by adding a profile in the `docker-compose.yml` file: ```yaml theme={null} services: postgres: profiles: ["db"] ``` If you remove or disable the `db` profile in `.env` or in Docker Compose, that container won't start. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Enabling TLS For production usage, it's recommended to enable TLS (HTTPS). In addition to the security aspect, this also ensures that [workflow templates](/workflow-management/workflow-templates/) load properly in all browsers. ### Automatically The easiest way to enable TLS is to use an OpenOps script that requests and sets up a TLS certificate from Let's Encrypt. Before running the script, make sure you have a domain name that points to your 's external IP address. If you're configuring DNS right before running the script, you may need to wait for the DNS change to propagate. 1. Run the following command in your terminal: ```shell theme={null} curl -fsS https://openops.sh/tls | sh ``` 2. When prompted, enter a domain name that points to the external IP address of your . 3. When prompted, enter an email address to receive certificate-related notifications from Let's Encrypt. The script will use the Certbot library to request a certificate for your domain from Let's Encrypt. It receives and saves the certificate, updates the OpenOps configuration file accordingly, and restarts OpenOps. By default, the certificate expires in 3 months. See [https://certbot.org/renewal-setup](https://certbot.org/renewal-setup) if you want to configure auto-renewal. ### Manually Alternatively, you can create a TLS certificate yourself. This lets you use DNS validation from Let's Encrypt (rather than the HTTP validation the automatic script performs) or request a certificate from a different provider. To set up TLS manually: 1. Obtain certificate and private key files from your certificate provider. 2. Upload the certificate files to your OpenOps installation under the `tls` directory: * `/tls/cert.pem` (certificate file) * `/tls/key.pem` (private key file) 3. Open the `.env` file in your OpenOps installation directory and update the following variables: * Set `OPS_NGINX_CONFIG_FILE` to `nginx.gateway.tls.conf` * Set `OPS_PUBLIC_URL` to the secure URL of your OpenOps installation (e.g. `https://openops.example.com`) After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Disabling host validation By default, OpenOps does not allow workflows to call internal network addresses such as `127.0.0.1` or `192.168.0.0`. This affects HTTP and SMTP actions, as well as webhook triggers. Host validation protects users from creating workflows that could accidentally or maliciously access internal services, scan networks, or escalate privileges. You may need to disable this check in certain circumstances, such as in non-production deployments or when workflows intentionally interact with internal-only infrastructure. To disable host validation, open the `.env` file in your installation folder and set the `OPS_ENABLE_HOST_VALIDATION` environment variable to `false`. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` Disabling this check removes an important safety guard and may allow workflows to access internal infrastructure. Use caution and avoid disabling it in production. ## Configuring allowed SMTP ports By default, OpenOps allows SMTP connections on ports 25, 465, 587, and 2525. Administrators can customize which SMTP ports are available by setting the `OPS_SMTP_ALLOWED_PORTS` environment variable in the `.env` file. To configure allowed SMTP ports, open the `.env` file in your installation folder and set the `OPS_SMTP_ALLOWED_PORTS` variable to a comma-separated list of port numbers: ```shell theme={null} OPS_SMTP_ALLOWED_PORTS=25,465,587,2525 ``` Port numbers must be valid TCP ports in the range 1-65535. At least one valid port must be configured. Invalid port numbers will be filtered out. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Updating OpenOps to a newer version See [Updating OpenOps](/getting-started/updating-openops). ## Support Feel free to join our [Slack community](https://slack.openops.com) if you have any questions or need help with your installation. # Azure VM Deployment Source: https://docs.openops.com/getting-started/deployment/azure-vm How to deploy OpenOps on Azure Virtual Machines This guide is for testing and evaluation purposes only and is not intended for production deployments. Please reach out to us at [support@openops.com](mailto:support@openops.com) if you'd like to learn how to set up OpenOps in a production environment. This guide explains how to install the OpenOps Docker Compose release on a newly created Azure VM. You’ll need relevant permissions to create a new VM, edit its networking settings, and set up required permissions for Cloud Shell. ## Initial deployment ### Create a new virtual machine 1. Navigate to [Create a virtual machine](https://portal.azure.com/#create/Microsoft.VirtualMachine-ARM) in Azure. 2. Name your machine and select the latest Ubuntu Server as the image. Choose a size with at least **2 CPUs and 8 GB of RAM**. Other settings can be left as default. Instance details 3. Click **Review + create** at the bottom, then **Create** to create the machine. You will be asked to download the private key. You may see a warning about leaving port 22 (SSH) open. For production use, it's recommended to open this port only to relevant IPs, depending on your network configuration. In this guide, we're using CloudShell to connect to the machine, so the port needs to remain open. 4. Once the VM deployment is complete, click **Go to resource**. 5. From the deployment overview, navigate to **Networking > Network settings**. 6. Under **Rules**, click **Create port rule**, then select **Inbound port rule**: Creating a port rule 7. In security rule settings: 1. Enter `80` in the **Destination port ranges** text field. 2. Using the **Source** dropdown, choose to open the port to everyone (default), to your personal IP address only, or to a preferred range. 3. Enter a name for the rule in the **Name** text field. 4. Click **Add** to create the rule. ### Connect to the virtual machine with Cloud Shell 1. From the VM deployment overview, open the **Overview** tab, then click **Connect** and select **Connect**: CloudShell overview 2. In the **Connect** view, expand **More ways to connect**. In the **SSH using Azure CLI** section, click **Connect via Azure CLI**: 3. In the **SSH using Azure CLI** overlay, click **Configure + check access**. Once the access check is complete, click **Connect**. 4. Choose **Bash** as the shell type. This will open Cloud Shell inside the Azure Portal. ### Install OpenOps Run the following command in your terminal to install, update, configure and run OpenOps: ```shell theme={null} curl -fsS https://openops.sh/install | sh ``` Alternatively, you can follow the manual installation steps: 1. Install the `unzip` utility: ```shell theme={null} sudo apt install unzip ``` 2. Create a new directory and download the OpenOps release files: ```shell theme={null} mkdir -p openops && cd openops && \ wget https://github.com/openops-cloud/openops/releases/download/0.7.1/openops-dc-0.7.1.zip && \ unzip -o openops-dc-0.7.1.zip && cp -n .env.defaults .env ``` 3. Update the application URL to use the instance's external IP address: ```shell theme={null} EXTERNAL_IP=$(curl -4 -s ifconfig.co) sed -i "s|http://localhost|http://$EXTERNAL_IP|g" .env ``` 4. Open the `.env` file in the OpenOps installation folder. Change the values of the following variables that represent credentials. Do it now, as you won't be able to change these values after the initial deployment: * `OPS_OPENOPS_ADMIN_EMAIL`: the email of your OpenOps installation's root admin account. * `OPS_OPENOPS_ADMIN_PASSWORD`: the password of your OpenOps installation's root admin account. * `OPS_POSTGRES_USERNAME`: the username of the Postgres database that OpenOps uses. * `OPS_POSTGRES_PASSWORD`: the password of the Postgres database that OpenOps uses. * `OPS_ANALYTICS_ADMIN_PASSWORD`: the password of the [OpenOps Analytics](/reporting-analytics/data-visualization/) admin account (the username is hardcoded to `admin`). 5. Install Docker using Snap: ```shell theme={null} sudo snap install docker ``` 6. Pull the images and start the Docker containers: ```shell theme={null} sudo COMPOSE_PARALLEL_LIMIT=4 docker compose pull -q && sudo docker compose up -d ``` If you encounter a rate limit, rerun the pull command. Note that pulling images may take several minutes. If you did not update credentials in the `.env` file, the default username is `admin@openops.com` and the password is `please-change-this-password-1`. You can now access the OpenOps application by navigating to the public IP address of your (e.g., `http://20.20.20.20`). ## Network ports used by OpenOps By default, OpenOps does not require any inbound ports other than the application port `80`. The following ports are used by bundled services and, in most cases, should not be exposed: * `5432`: The PostgreSQL database used by OpenOps. Expose this port only if you need direct database access, such as for [connecting OpenOps to external analytics tools](/reporting-analytics/connecting-to-external-tools/). Restrict access to a VPN or a trusted IP range. * `6379`: OpenOps' internal Redis service. Expose this port only if required for debugging or monitoring purposes. Restrict access to a VPN or a trusted IP range. ## Getting credentials for Azure connections See [this guide](https://docs.google.com/document/d/1WhwMk3he4d4vEv_7hIw7u_4ZIz_8ZewUS1yUKxpdYR0/edit?tab=t.0#heading=h.4lq77bkice4n). ## External databases To use external PostgreSQL or Redis databases, modify the relevant variables in the `.env` file. You can disable the corresponding containers by adding a profile in the `docker-compose.yml` file: ```yaml theme={null} services: postgres: profiles: ["db"] ``` If you remove or disable the `db` profile in `.env` or in Docker Compose, that container won't start. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Enabling TLS For production usage, it's recommended to enable TLS (HTTPS). In addition to the security aspect, this also ensures that [workflow templates](/workflow-management/workflow-templates/) load properly in all browsers. ### Automatically The easiest way to enable TLS is to use an OpenOps script that requests and sets up a TLS certificate from Let's Encrypt. Before running the script, make sure you have a domain name that points to your 's external IP address. If you're configuring DNS right before running the script, you may need to wait for the DNS change to propagate. 1. Run the following command in your terminal: ```shell theme={null} curl -fsS https://openops.sh/tls | sh ``` 2. When prompted, enter a domain name that points to the external IP address of your . 3. When prompted, enter an email address to receive certificate-related notifications from Let's Encrypt. The script will use the Certbot library to request a certificate for your domain from Let's Encrypt. It receives and saves the certificate, updates the OpenOps configuration file accordingly, and restarts OpenOps. By default, the certificate expires in 3 months. See [https://certbot.org/renewal-setup](https://certbot.org/renewal-setup) if you want to configure auto-renewal. ### Manually Alternatively, you can create a TLS certificate yourself. This lets you use DNS validation from Let's Encrypt (rather than the HTTP validation the automatic script performs) or request a certificate from a different provider. To set up TLS manually: 1. Obtain certificate and private key files from your certificate provider. 2. Upload the certificate files to your OpenOps installation under the `tls` directory: * `/tls/cert.pem` (certificate file) * `/tls/key.pem` (private key file) 3. Open the `.env` file in your OpenOps installation directory and update the following variables: * Set `OPS_NGINX_CONFIG_FILE` to `nginx.gateway.tls.conf` * Set `OPS_PUBLIC_URL` to the secure URL of your OpenOps installation (e.g. `https://openops.example.com`) After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Disabling host validation By default, OpenOps does not allow workflows to call internal network addresses such as `127.0.0.1` or `192.168.0.0`. This affects HTTP and SMTP actions, as well as webhook triggers. Host validation protects users from creating workflows that could accidentally or maliciously access internal services, scan networks, or escalate privileges. You may need to disable this check in certain circumstances, such as in non-production deployments or when workflows intentionally interact with internal-only infrastructure. To disable host validation, open the `.env` file in your installation folder and set the `OPS_ENABLE_HOST_VALIDATION` environment variable to `false`. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` Disabling this check removes an important safety guard and may allow workflows to access internal infrastructure. Use caution and avoid disabling it in production. ## Configuring allowed SMTP ports By default, OpenOps allows SMTP connections on ports 25, 465, 587, and 2525. Administrators can customize which SMTP ports are available by setting the `OPS_SMTP_ALLOWED_PORTS` environment variable in the `.env` file. To configure allowed SMTP ports, open the `.env` file in your installation folder and set the `OPS_SMTP_ALLOWED_PORTS` variable to a comma-separated list of port numbers: ```shell theme={null} OPS_SMTP_ALLOWED_PORTS=25,465,587,2525 ``` Port numbers must be valid TCP ports in the range 1-65535. At least one valid port must be configured. Invalid port numbers will be filtered out. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Updating OpenOps to a newer version See [Updating OpenOps](/getting-started/updating-openops). ## Support Feel free to join our [Slack community](https://slack.openops.com) if you have any questions or need help with your installation. # GCP Compute Engine Deployment Source: https://docs.openops.com/getting-started/deployment/gcp-vm How to deploy OpenOps on a GCP Compute Engine instance This guide is for testing and evaluation purposes only and is not intended for production deployments. Please reach out to us at [support@openops.com](mailto:support@openops.com) if you'd like to learn how to set up OpenOps in a production environment. This guide explains how to install the OpenOps Docker Compose release on a newly created GCP Compute Engine VM instance. It assumes you have appropriate permissions on an existing Google Cloud Platform (GCP) project. ## Initial deployment ### Create a new VM instance 1. In the Google Cloud Console, navigate to **Compute Engine** → **VM instances**. 2. Click **Create Instance**. 3. Under **Machine configuration**, configure the following: * **Name**: Enter a name for your virtual machine. * **Region**: Choose a region close to your users (e.g., `us-east1`). * **Zone**: Choose a zone close to your users (e.g., `us-east1-b`), or leave the default to let Google choose one for you. * **Series**: Choose any recommended series (e.g., **E2**) or another family you prefer. * **Machine type**: Choose a machine size similar to **e2-standard-2** or larger. Avoid very small machines, as OpenOps may need additional CPU/RAM for running Docker containers smoothly. Create new instance 4. Under **OS and storage**: 1. Click **Change**. 2. Select **Ubuntu** as the operating system (Ubuntu 24.04 LTS if available, or a close alternative). 3. Increase **Size** to at least 50GB to accommodate Docker images and databases. Change boot disk 4. Click **Select**. 5. Under **Networking**, select **Allow HTTP traffic**. This will automatically create a firewall rule to open port 80. Allow HTTP traffic 6. Keep defaults for other settings (or adjust according to your preferences), then click **Create** to launch the VM. ### Configure firewall for SSH and HTTP Depending on your project settings, a default firewall rule might already allow SSH access. By checking **Allow HTTP traffic** while creating the instance, HTTP (port 80) is also open. If you need to adjust or review these rules: 1. In the **VPC network** menu, go to **Firewall**. 2. Locate or create firewall rules for: * **SSH** (TCP/22) from your IP or a limited source range. * **HTTP** (TCP/80) for public access or your desired source range. ### Connect to the instance 1. Once your VM is running, go to the **VM instances** list. 2. Click **SSH** next to your instance, then click **Open in browser window** to launch an in-browser terminal. Connect to instance ### Install OpenOps Run the following command in your terminal to install, update, configure and run OpenOps: ```shell theme={null} curl -fsS https://openops.sh/install | sh ``` Alternatively, you can follow the manual installation steps: 1. Install the `unzip` utility: ```shell theme={null} sudo apt install unzip ``` 2. Create a new directory and download the OpenOps release files: ```shell theme={null} mkdir -p openops && cd openops && \ wget https://github.com/openops-cloud/openops/releases/download/0.7.1/openops-dc-0.7.1.zip && \ unzip -o openops-dc-0.7.1.zip && cp -n .env.defaults .env ``` 3. Update the application URL to use the instance's external IP address: ```shell theme={null} EXTERNAL_IP=$(curl -4 -s ifconfig.co) sed -i "s|http://localhost|http://$EXTERNAL_IP|g" .env ``` 4. Open the `.env` file in the OpenOps installation folder. Change the values of the following variables that represent credentials. Do it now, as you won't be able to change these values after the initial deployment: * `OPS_OPENOPS_ADMIN_EMAIL`: the email of your OpenOps installation's root admin account. * `OPS_OPENOPS_ADMIN_PASSWORD`: the password of your OpenOps installation's root admin account. * `OPS_POSTGRES_USERNAME`: the username of the Postgres database that OpenOps uses. * `OPS_POSTGRES_PASSWORD`: the password of the Postgres database that OpenOps uses. * `OPS_ANALYTICS_ADMIN_PASSWORD`: the password of the [OpenOps Analytics](/reporting-analytics/data-visualization/) admin account (the username is hardcoded to `admin`). 5. Install Docker using Snap: ```shell theme={null} sudo snap install docker ``` 6. Pull the images and start the Docker containers: ```shell theme={null} sudo COMPOSE_PARALLEL_LIMIT=4 docker compose pull -q && sudo docker compose up -d ``` If you encounter a rate limit, rerun the pull command. Note that pulling images may take several minutes. If you did not update credentials in the `.env` file, the default username is `admin@openops.com` and the password is `please-change-this-password-1`. You can now access the OpenOps application by navigating to the public IP address of your (e.g., `http://20.20.20.20`). ## Network ports used by OpenOps By default, OpenOps does not require any inbound ports other than the application port `80`. The following ports are used by bundled services and, in most cases, should not be exposed: * `5432`: The PostgreSQL database used by OpenOps. Expose this port only if you need direct database access, such as for [connecting OpenOps to external analytics tools](/reporting-analytics/connecting-to-external-tools/). Restrict access to a VPN or a trusted IP range. * `6379`: OpenOps' internal Redis service. Expose this port only if required for debugging or monitoring purposes. Restrict access to a VPN or a trusted IP range. ## External databases To use external PostgreSQL or Redis databases, modify the relevant variables in the `.env` file. You can disable the corresponding containers by adding a profile in the `docker-compose.yml` file: ```yaml theme={null} services: postgres: profiles: ["db"] ``` If you remove or disable the `db` profile in `.env` or in Docker Compose, that container won't start. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Enabling TLS For production usage, it's recommended to enable TLS (HTTPS). In addition to the security aspect, this also ensures that [workflow templates](/workflow-management/workflow-templates/) load properly in all browsers. ### Automatically The easiest way to enable TLS is to use an OpenOps script that requests and sets up a TLS certificate from Let's Encrypt. Before running the script, make sure you have a domain name that points to your 's external IP address. If you're configuring DNS right before running the script, you may need to wait for the DNS change to propagate. 1. Run the following command in your terminal: ```shell theme={null} curl -fsS https://openops.sh/tls | sh ``` 2. When prompted, enter a domain name that points to the external IP address of your . 3. When prompted, enter an email address to receive certificate-related notifications from Let's Encrypt. The script will use the Certbot library to request a certificate for your domain from Let's Encrypt. It receives and saves the certificate, updates the OpenOps configuration file accordingly, and restarts OpenOps. By default, the certificate expires in 3 months. See [https://certbot.org/renewal-setup](https://certbot.org/renewal-setup) if you want to configure auto-renewal. ### Manually Alternatively, you can create a TLS certificate yourself. This lets you use DNS validation from Let's Encrypt (rather than the HTTP validation the automatic script performs) or request a certificate from a different provider. To set up TLS manually: 1. Obtain certificate and private key files from your certificate provider. 2. Upload the certificate files to your OpenOps installation under the `tls` directory: * `/tls/cert.pem` (certificate file) * `/tls/key.pem` (private key file) 3. Open the `.env` file in your OpenOps installation directory and update the following variables: * Set `OPS_NGINX_CONFIG_FILE` to `nginx.gateway.tls.conf` * Set `OPS_PUBLIC_URL` to the secure URL of your OpenOps installation (e.g. `https://openops.example.com`) After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Disabling host validation By default, OpenOps does not allow workflows to call internal network addresses such as `127.0.0.1` or `192.168.0.0`. This affects HTTP and SMTP actions, as well as webhook triggers. Host validation protects users from creating workflows that could accidentally or maliciously access internal services, scan networks, or escalate privileges. You may need to disable this check in certain circumstances, such as in non-production deployments or when workflows intentionally interact with internal-only infrastructure. To disable host validation, open the `.env` file in your installation folder and set the `OPS_ENABLE_HOST_VALIDATION` environment variable to `false`. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` Disabling this check removes an important safety guard and may allow workflows to access internal infrastructure. Use caution and avoid disabling it in production. ## Configuring allowed SMTP ports By default, OpenOps allows SMTP connections on ports 25, 465, 587, and 2525. Administrators can customize which SMTP ports are available by setting the `OPS_SMTP_ALLOWED_PORTS` environment variable in the `.env` file. To configure allowed SMTP ports, open the `.env` file in your installation folder and set the `OPS_SMTP_ALLOWED_PORTS` variable to a comma-separated list of port numbers: ```shell theme={null} OPS_SMTP_ALLOWED_PORTS=25,465,587,2525 ``` Port numbers must be valid TCP ports in the range 1-65535. At least one valid port must be configured. Invalid port numbers will be filtered out. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Updating OpenOps to a newer version See [Updating OpenOps](/getting-started/updating-openops). ## Support Feel free to join our [Slack community](https://slack.openops.com) if you have any questions or need help with your installation. # Local Deployment Source: https://docs.openops.com/getting-started/deployment/local Deploy OpenOps on your local machine This guide explains how to install the OpenOps docker-compose release on a local machine. Note that these settings are for testing purposes only and not for a production environment. Before following the instructions, make sure that your machine meets the [system requirements](/getting-started/system-requirements) for OpenOps. ## Installing OpenOps Run the following command in your terminal to install, update, configure and run OpenOps: ```shell theme={null} curl -fsS https://openops.sh/install | sh ``` This script supports macOS, Ubuntu and Windows (via WSL2 Ubuntu). If you can't use the autoinstall script, follow the manual installation steps for your operating system below. ### On macOS 1. Install Docker Desktop by following [these instructions](https://docs.docker.com/desktop/setup/install/mac-install/). 2. Open a new terminal window and run the following command to create a folder and download the OpenOps release files: ```shell theme={null} mkdir -p openops && cd openops && \ curl -OL https://github.com/openops-cloud/openops/releases/download/0.7.1/openops-dc-0.7.1.zip && \ unzip openops-dc-0.7.1.zip && cp -n .env.defaults .env ``` 3. Open the `.env` file in the OpenOps installation folder. Change the values of the following variables that represent credentials. Do it now, as you won't be able to change these values after the initial deployment: * `OPS_OPENOPS_ADMIN_EMAIL`: the email of your OpenOps installation's root admin account. * `OPS_OPENOPS_ADMIN_PASSWORD`: the password of your OpenOps installation's root admin account. * `OPS_POSTGRES_USERNAME`: the username of the Postgres database that OpenOps uses. * `OPS_POSTGRES_PASSWORD`: the password of the Postgres database that OpenOps uses. * `OPS_ANALYTICS_ADMIN_PASSWORD`: the password of the [OpenOps Analytics](/reporting-analytics/data-visualization/) admin account (the username is hardcoded to `admin`). 4. Pull the images and run `docker compose`: ```shell theme={null} COMPOSE_PARALLEL_LIMIT=4 docker compose pull docker compose up -d ``` If you face a rate limit while downloading, run the command again. You can now access the application by navigating to [http://localhost](http://localhost). ### On Ubuntu Server This procedure has been tested on Ubuntu Server 24.04. 1. During the Ubuntu Server installation, select Docker to be added to the installation. If you need to install Docker later, follow the instructions [here](https://docs.docker.com/engine/install/ubuntu/). 2. Log in to your server and run the following commands to create a folder and download the OpenOps release files: ```shell theme={null} # create and change directory mkdir -p openops && cd openops # download the release file curl -OL https://github.com/openops-cloud/openops/releases/download/0.7.1/openops-dc-0.7.1.zip # refresh package lists sudo apt update # install unzip sudo apt install unzip # decompress release file unzip openops-dc-0.7.1.zip # copy the defaults to env without overwriting existing files cp --update=none .env.defaults .env ``` 3. Identify your own IP address: ```shell theme={null} # find IP address ip -o -4 addr show | awk '{print $2, $4}' ``` The output should look something like this: ```shell theme={null} lo 127.0.0.1/8 # loopback network interface - not here enp1s0 192.168.1.50/24 # this looks more like it. We want this inet IP address without the subnet mask: 192.168.1.50 docker0 172.17.0.1/16 # docker network interface - not here ``` In this case, the IP address is `192.168.1.50`. 4. Open the `.env` file in the OpenOps installation folder. Change the values of the following variables that represent credentials. Do it now, as you won't be able to change these values after the initial deployment: * `OPS_OPENOPS_ADMIN_EMAIL`: the email of your OpenOps installation's root admin account. * `OPS_OPENOPS_ADMIN_PASSWORD`: the password of your OpenOps installation's root admin account. * `OPS_POSTGRES_USERNAME`: the username of the Postgres database that OpenOps uses. * `OPS_POSTGRES_PASSWORD`: the password of the Postgres database that OpenOps uses. * `OPS_ANALYTICS_ADMIN_PASSWORD`: the password of the [OpenOps Analytics](/reporting-analytics/data-visualization/) admin account (the username is hardcoded to `admin`). 5. In the `.env` file, find the `OPS_PUBLIC_URL` variable and replace its value, `http://localhost`, with the IP address that you've previously identified. In our example, the IP address would be `http://192.168.1.50`. 6. Pull the images and run `docker compose`: ```shell theme={null} # download the docker volumes and images COMPOSE_PARALLEL_LIMIT=4 sudo docker compose pull # launch the application sudo docker compose up -d ``` If you face a rate limit while downloading, run the command again. ### On Windows (with PowerShell) 1. Install Docker Desktop by following [these instructions](https://docs.docker.com/desktop/setup/install/windows-install/). 2. Add a new folder for OpenOps in your PowerShell console: ```powershell theme={null} New-Item -ItemType Directory -Force -Path openops Set-Location openops ``` 3. Download the OpenOps release files: ```powershell theme={null} Invoke-WebRequest -Uri "https://github.com/openops-cloud/openops/releases/download/0.7.1/openops-dc-0.7.1.zip" Expand-Archive -Path "openops-dc-0.7.1.zip" -DestinationPath . if (-Not (Test-Path ".env")) { Copy-Item ".env.defaults" ".env" } ``` 4. Open the `.env` file in the OpenOps installation folder. Change the values of the following variables that represent credentials. Do it now, as you won't be able to change these values after the initial deployment: * `OPS_OPENOPS_ADMIN_EMAIL`: the email of your OpenOps installation's root admin account. * `OPS_OPENOPS_ADMIN_PASSWORD`: the password of your OpenOps installation's root admin account. * `OPS_POSTGRES_USERNAME`: the username of the Postgres database that OpenOps uses. * `OPS_POSTGRES_PASSWORD`: the password of the Postgres database that OpenOps uses. * `OPS_ANALYTICS_ADMIN_PASSWORD`: the password of the [OpenOps Analytics](/reporting-analytics/data-visualization/) admin account (the username is hardcoded to `admin`). 5. Run `docker compose`: ```powershell theme={null} $env:COMPOSE_PARALLEL_LIMIT = "4" docker compose pull docker compose up -d ``` If you face a rate limit while downloading, run the command again. ## Updating OpenOps to a newer version See [Updating OpenOps](/getting-started/updating-openops). ## Cloud templates On localhost, cloud templates may not be able to load when using the Safari browser. ## Configuring Slack approvals If you would like to run a workflow that uses Slack approvals in a local installation, you should set the following variable in your `.env` file: ```shell theme={null} OPS_SLACK_ENABLE_INTERACTIONS=false ``` This will open a new tab in your default browser when you approve or reject an action. You can safely close the tab after the action is completed. After updating your `.env` file, restart the containers: ```shell theme={null} sudo docker compose down && docker compose up -d ``` ## Disabling host validation By default, OpenOps does not allow workflows to call internal network addresses such as `127.0.0.1` or `192.168.0.0`. This affects HTTP and SMTP actions, as well as webhook triggers. Host validation protects users from creating workflows that could accidentally or maliciously access internal services, scan networks, or escalate privileges. You may need to disable this check in certain circumstances, such as in non-production deployments or when workflows intentionally interact with internal-only infrastructure. To disable host validation, open the `.env` file in your installation folder and set the `OPS_ENABLE_HOST_VALIDATION` environment variable to `false`. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` Disabling this check removes an important safety guard and may allow workflows to access internal infrastructure. Use caution and avoid disabling it in production. ## Configuring allowed SMTP ports By default, OpenOps allows SMTP connections on ports 25, 465, 587, and 2525. Administrators can customize which SMTP ports are available by setting the `OPS_SMTP_ALLOWED_PORTS` environment variable in the `.env` file. To configure allowed SMTP ports, open the `.env` file in your installation folder and set the `OPS_SMTP_ALLOWED_PORTS` variable to a comma-separated list of port numbers: ```shell theme={null} OPS_SMTP_ALLOWED_PORTS=25,465,587,2525 ``` Port numbers must be valid TCP ports in the range 1-65535. At least one valid port must be configured. Invalid port numbers will be filtered out. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` ## Using Azure CLI in workflows: running with local credentials It is possible to share your local session with the platform for local applications. To do this, you need to set two environment variables in the `.env` file under the installation folder: * `OPS_ENABLE_HOST_SESSION=true`: enables sharing of the host session with the platform container. * `HOST_AZURE_CONFIG_DIR="~/.azure"`: defines the path to the host machine's Azure configuration folder that will be shared with the platform container. ## Using Google Cloud CLI in workflows: running with local credentials It is possible to share your local Google Cloud CLI session with the platform for local applications. To do this, you need to set two environment variables in the `.env` file under the installation folder: * `OPS_ENABLE_HOST_SESSION=true`: enables sharing of the host session with the platform container. * `HOST_CLOUDSDK_CONFIG="~/.config/gcloud"`: defines the path to the host machine's Google Cloud configuration folder that will be shared with the platform container. ## Support Feel free to join our [Slack community](https://slack.openops.com) if you have any questions or need help with your installation. # Quick Start Guide Source: https://docs.openops.com/getting-started/quick-start-guide Get started with OpenOps in minutes Here's how you can go from downloading the open source distribution of OpenOps to starting getting value out of your OpenOps deployment. ## Deploy OpenOps on your local machine You don't need a beefy machine for a test deployment. A modern OS like Windows 11, macOS Big Sur or later, or Ubuntu 20.04+ will do (see [more on supported operating systems](/getting-started/system-requirements#operating-systems)). You'll also need Docker, so see [Docker requirements](/getting-started/system-requirements#docker) to make sure you have a compatible version of a Docker client. Run the following command in your terminal to install, update, configure and run OpenOps: ```shell theme={null} curl -fsS https://openops.sh/install | sh ``` Wait for the installation script to complete. When it finishes, it will display the URL of your OpenOps instance (typically `http://localhost/`), along with the admin username and an autogenerated password. ## Open OpenOps in your browser Go ahead and open OpenOps in your browser: To log in, use the admin credentials that the installation script has displayed. ## Look around After logging in, the first thing you'll see is the OpenOps **Overview** view: Initial screen In the top-left corner, click the **Open sidebar** icon to expand the main OpenOps navigation menu. In a fresh installation, the following views contain little content, but knowing they exist can be helpful: * **Workflows** will let you keep track of the workflows that you create. * **Runs** will keep a history of executing your workflows, indicating start time and status. * **Connections** will list all permissions you provide to OpenOps for various cloud providers and services, as well as let you create new ones. * **Tables** will store data collected by workflows, as well as any information you enter or import to use in your workflows. * **Analytics** will let you visualize data from OpenOps tables and external data sources, such as CSV files or Google Sheets. ## Run a sample workflow Back in **Overview**, OpenOps suggests three sample beginner-level workflows to help you get a feel of the product. Let's use one of them to collect all available AWS Compute Optimizer recommendations for a variety of AWS resource types, and save the recommendations to an [OpenOps table](/reporting-analytics/tables/). Click **AWS sample workflow**: AWS sample workflow When the workflow preview pop-up displays, click **Use template** in the top right corner: AWS sample workflow - use template You will then see a workflow summary popup that tells you that the workflow requires a connection to AWS: AWS sample workflow summary ### Configure an AWS connection You could add the connection later, but let's do it now. Click **+ Add** alongside the required connection. Create AWS connection In the AWS connection form, you need to enter three required parameters: **Access Key ID**, **Secret Access Key** and **Default Region**. To get an access key ID and a secret access key, [create an IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in the AWS Management Console or use one of your existing IAM users. Make sure that your IAM user has the following permissions to run this workflow: ```text theme={null} ec2:Describe* sts:GetCallerIdentity organizations:Describe* organizations:List* compute-optimizer:Get* compute-optimizer:Describe* lambda:List* autoscaling:Describe* ``` If your AWS account doesn't already have a default region, you can [set it in the AWS Management Console](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/change-default-region.html), and then enter it in the connection form. Once you're done, click **Save**. ### Look around the workflow editor When the workflow summary popup displays again, this time with a connection defined, click **Create workflow**. The new workflow now displays in the workflow editor: Workflow editor The steps of the workflow are visualized as a block diagram. The first step is a trigger: a schedule or event that initiates the workflow execution. In this sample workflow, the trigger schedules running the workflow every working day at 7AM UTC. All other steps are actions, and each action represents some kind of automation that the workflow performs. Feel free to click **Tree view** and **Notes** in the top menu bar to display a compact view of the workflow and a detailed description of what it does: Tree view and notes Explore the workflow by clicking on blocks that represent its steps. This will display properties of each step in the right pane of the workflow editor: Step properties in the workflow editor ### Test the workflow Before your workflow goes live, you need to test it. Testing the workflow runs it in full, so you can treat it as an on-demand run in addition to its scheduled runs. At the top of the workflow editor, above the trigger, there's a **Test workflow** button. However, right now it's grayed out, and if you hover over it, OpenOps will ask you to test your trigger first: To test the trigger, click on its block in the workflow graph. In the trigger's properties pane, click the **Test** tab, then click **Load Data** in the **Step output** section. As soon as you do, OpenOps will display test results. It looks like it's all good so far: Now, if you look back at the **Test workflow** button at the top of the workflow editor, you can see that it's now active, so go ahead and click it! OpenOps will take a few seconds to run the workflow, and when it finishes, you'll see the **Run Details** pane on the left of the workflow editor: This pane displays the status of each workflow step. If you click a step, you can see its inputs and outputs as JSON in the bottom part of the pane. As long as the status of each step is green, your workflow is ready to go, and you can publish it. ### Publish the workflow To start running the workflow on schedule, you need to publish it. When testing, the workflow editor switches to read-only mode. To get back to editing mode, click **Edit** on the top right. Once back in the editing mode, one of the top-right buttons is now called **Publish**. Click it, and as soon as you do, your workflow is live! It will now run periodically on the schedule defined by its trigger. ### See the results of your test run When you tested the workflow, it was a full on-demand run. Some of the workflow steps fetched AWS Compute Optimizer recommendations for various AWS resource types, and other steps recorded these recommendations to an OpenOps table. Let's see what's been recorded to the table. Click the book icon on the top left to show the sidebar. In the sidebar, click **Tables**: You'll see a list of all predefined tables under the heading **OpenOps dataset**. Click the **Opportunities** table. You're going to see a table that lists the saving opportunities that the workflow run revealed, including USD estimates: Opportunities ## Get templates for your future workflows The sample AWS workflow that you've just tested and published provides just a quick glance of what OpenOps can do. In real FinOps scenarios, you would want your workflows to do more: for example, find owners of unused resources, request their decision on whether to delete or keep resources, and if they decide to delete, then execute IaC automations and create GitHub pull requests. Fortunately, OpenOps provides dozens of real-world FinOps templates that you can base your workflows on. To get hold of them, in the sidebar, click **Overview**. Then click **Explore templates** in the top-right menu bar to see the **template catalog**: Template catalog By default, the catalog contains six templates. To view more, click **Explore more** and sign up for a free OpenOps Cloud account. You may not be able to connect to OpenOps Cloud and see additional templates if: * Your browser is configured to block third-party cookies. Allow third-party cookies ([Chrome](https://support.google.com/chrome/answer/95647), [Safari](https://help.apple.com/safari/mac/8.0/en.lproj/sfri11471.html), [Firefox](http://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection)) for your OpenOps installation’s URL. * You're using an OpenOps installation served over HTTP in Safari. Consider enabling HTTPS for your installation by following the instructions for [AWS](/getting-started/deployment/aws-ec2#enabling-tls), [Azure](/getting-started/deployment/azure-vm#enabling-tls), or [GCP](/getting-started/deployment/gcp-vm#enabling-tls) deployments. As a result, the **template catalog** in your OpenOps installation will be extended to show all available templates: OpenOps template catalog after signing up with OpenOps Cloud You can click any template in the catalog to see its full description, a preview diagram visualizing the workflow steps defined in the template, and the integrations that the template uses: CloudWatch log retention enforcement template If you find a template useful, you can click **Use template** and create a workflow based on the template, just like you did earlier with the sample AWS workflow. ## Connect OpenOps to your AI provider Building steps in OpenOps workflows is usually intuitive. Still, when you need to enter a cloud-specific command, write an SQL query, or add a custom script, it can be helpful to get assistance. OpenOps lets you connect your preferred LLM provider, such as OpenAI or Anthropic, so you can generate queries, scripts, and CLI commands directly within the workflow editor. At the bottom of the sidebar, click **Settings**, then **OpenOps AI**. Choose your LLM provider, select a model, enter your API key, and click **Save**. Once connected, any time you edit a step that involves a command, query, or custom code, you can click **Generate with AI** to prompt your LLM and generate it for you: ## Join the OpenOps community We hope that you've appreciated what OpenOps can do for you to help automate your FinOps practices. As you continue to build new workflows, consider joining the [OpenOps community Slack](https://slack.openops.com/). By doing so, you'll get direct support from the OpenOps team, collaborate with other FinOps professionals, and receive help in building your workflows. You're also welcome to share your feedback to help shape the future of OpenOps. # System Requirements Source: https://docs.openops.com/getting-started/system-requirements Hardware and software requirements for deploying OpenOps on-premises The open source version of OpenOps is meant to be deployed on-premises and is distributed as a Docker Compose specification. ## Hardware Hardware requirements vary depending on your use case. There are two primary groups of use cases: * **Exploring OpenOps and building automations**. For these purposes, 2 CPU cores, 8GB RAM, and 50GB storage should be sufficient. * **Production use and running your automations**. For this scenario, aim at 4 CPU cores, 16GB RAM, and 100GB storage. ## Operating systems OpenOps can be deployed on the following operating systems: * **Linux**: Ubuntu 20.04 LTS or later, Debian 11 (Bullseye) or later, Fedora 35 or later. * **macOS**: macOS Big Sur (11.x) or later. * **Windows**: Windows 10 version 2004 (build 19041) or later, or Windows 11. ## Docker OpenOps is distributed as a Docker Compose file. Here are Docker version requirements by operating system: * On Linux: **Docker Engine v20.10+ and Docker Compose v2.x**. * On macOS: **Docker Desktop 4.11 or later**. If you're running macOS on an Apple Silicon processor (M1 or M2), open Docker Desktop settings, and in the *General* tab, scroll down to the *Virtual Machine Options* section. Once there, make sure that: 1. *Apple virtualization framework* is selected for *Virtual Machine Manager*. 2. The *Use Rosetta for x86/amd64 emulation on Apple Silicon* option is enabled. * On Windows: **Docker Desktop 4.11 or later**. In your Docker Desktop settings, in the *General* tab, enable the *Use the WSL 2 based engine* option. If you're using an alternative Docker client such as OrbStack or Colima, make sure that the version of your Docker client includes Docker Engine v20.10+ and Docker Compose v2.x. ## Browser You can access OpenOps using any modern browser. However, viewing the full set of workflow templates in the OpenOps [template catalog](/workflow-management/workflow-templates/) requires signing in to OpenOps Cloud, which comes with additional requirements. You may not be able to connect to OpenOps Cloud and see additional templates if: * Your browser is configured to block third-party cookies. Allow third-party cookies ([Chrome](https://support.google.com/chrome/answer/95647), [Safari](https://help.apple.com/safari/mac/8.0/en.lproj/sfri11471.html), [Firefox](http://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection)) for your OpenOps installation’s URL. * You're using an OpenOps installation served over HTTP in Safari. Consider enabling HTTPS for your installation by following the instructions for [AWS](/getting-started/deployment/aws-ec2#enabling-tls), [Azure](/getting-started/deployment/azure-vm#enabling-tls), or [GCP](/getting-started/deployment/gcp-vm#enabling-tls) deployments. # Updating OpenOps Source: https://docs.openops.com/getting-started/updating-openops How to update OpenOps to a newer release To update OpenOps to a newer version, you can either use an automatic update script, or perform a manual update. ## Automatic update 1. In the terminal, navigate to your OpenOps installation directory. 2. Run the following command to install the latest available version of OpenOps in the same directory: ```shell theme={null} curl -fsS https://openops.sh/install | OPENOPS_INSTALLATION_PATH="$PWD" ${SHELL:-/bin/sh} ``` The script will stop all running containers, pull the latest images, and restart OpenOps. ## Manual update 1. Install the `unzip` utility (if not already installed): ```shell theme={null} sudo apt install unzip ``` 2. Navigate to your OpenOps installation directory. 3. Stop all running containers: ```shell theme={null} sudo docker compose down ``` 4. Download and extract the new version: ```shell theme={null} curl -OL https://github.com/openops-cloud/openops/releases/download/0.7.1/openops-dc-0.7.1.zip && \ unzip -o openops-dc-0.7.1.zip ``` (This code sample refers to a specific version. Don't forget to update it to the version you're installing.) 5. Fetch the new images and restart the application: ```shell theme={null} sudo COMPOSE_PARALLEL_LIMIT=4 docker compose pull -q && sudo docker compose up -d ``` 6. (Optional) After confirming that the updated version is running correctly, you can safely clean up older Docker images, including OpenOps images: ```shell theme={null} docker image prune -af ``` # User Management Source: https://docs.openops.com/getting-started/user-management About user accounts in OpenOps When you deploy OpenOps for the first time, it creates an admin user account. The email and password for the account are defined in two variables in your `.env` file: * `OPS_OPENOPS_ADMIN_EMAIL` * `OPS_OPENOPS_ADMIN_PASSWORD` The admin user account created this way has exactly one distinction: it can be used to create other user accounts. ## Creating new user accounts OpenOps doesn't currently provide a UI for creating user accounts; instead, you can do it with two API calls. The first API call is to sign in the admin user: ``` POST http://your-openops-installation/api/v1/authentication/sign-in Content-Type: application/json { "email": "your-admin-email", "password": "your-admin-password" } ``` This call will return a JSON object that contains a property called `token`. Copy the value of this property and use it in the authorization header in the next call. This next call actually creates a new user account. Before making the call, in the body, don't forget to specify actual values for the four properties that are left empty in the sample below: ``` POST http://your-openops-installation/api/v1/authentication/sign-up Authorization: Bearer your-admin-token Content-Type: application/json { "password": "", "email": "", "firstName": "", "lastName": "", "trackEvents": false, "newsLetter": false } ``` The user account that you create this way will be able to perform all operations in OpenOps except for creating new user accounts. Every time you do that, you'll still need an admin token. # Archera Source: https://docs.openops.com/integrations/archera An overview of how Archera can be integrated with OpenOps OpenOps integrates with [Archera](https://archera.ai/) to automate the review and purchase of cloud commitment plans and the tracking of existing commitments. ## Actions OpenOps provides seven [actions](/workflow-management/actions) for interacting with Archera: All Archera actions are based on the [Archera API](https://docs.archera.ai/api-reference/public-api/public-api-reference) and require configuring an Archera [connection](/cloud-access/access-levels-permissions) with your API token and organization ID. Both are available in the API section of your Archera user settings. The following sections describe the seven actions available in the Archera block. ### Get Recommended Plan Retrieves the commitment plan that Archera currently recommends for a cloud provider: * **Provider**: AWS or Azure ### Get Default Commitment Plans Retrieves the default commitment plans that Archera generates for a cloud provider: * **Provider**: AWS or Azure ### Get Commitment Plan Retrieves a specific commitment plan: * **Plan ID**: The UUID of the commitment plan to retrieve ### Apply Commitment Plan Applies a commitment plan in Archera: * **Plan ID**: The UUID of the commitment plan to apply ### Get Commitments Inventory Retrieves the inventory of existing commitments for a cloud provider within a date range: * **Provider**: AWS, Azure, GCP, Kubernetes, or Unknown * **Start Date**: Start of the date range in `yyyy-MM-dd` format * **End Date**: End of the date range in `yyyy-MM-dd` format * **Search**: Optional search term to filter commitments * **Order By**: Optional field to order results by: End Date, Duration (seconds), Start Date, Upfront Cost, Amortized Cost, Recurring Cost, Created At, Updated At, Is Leased, Account ID, Type, Status, Scope, Reservation End, Utilization, or Monthly Savings * **Descending Order**: Sort in descending order (enabled by default) * **Page**: Page number for pagination (defaults to 1) * **Page Size**: Number of items per page, from 1 to 10000 (defaults to 10) ### Get Metrics Retrieves savings and utilization metrics for a cloud provider: * **Provider**: AWS or Azure ### Custom API Call Allows making arbitrary calls to any [Archera API](https://docs.archera.ai/api-reference/public-api/public-api-reference) endpoint: * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical Archera workflow runs on a schedule, retrieves the commitment plans that Archera proposes using the *Get Default Commitment Plans* or *Get Recommended Plan* action, and asks a person in Slack or Microsoft Teams which plan to purchase before applying it with the *Apply Commitment Plan* action. The message can include savings figures from the plans themselves or from the *Get Metrics* action, along with a link back to Archera. If nobody responds before the request times out, the workflow can apply the recommended plan automatically. A second common workflow retrieves existing commitments with the *Get Commitments Inventory* action and notifies owners about commitments that are about to expire, with a link to renew them in Archera. For the patterns behind approval requests and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # Cloudability Source: https://docs.openops.com/integrations/cloudability An overview of how Cloudability can be integrated with OpenOps OpenOps integrates with [Cloudability](https://www.apptio.com/products/cloudability/) to automate the retrieval and management of cloud resource usage recommendations. ## Actions OpenOps provides four [actions](/workflow-management/actions) for interacting with Cloudability: All Cloudability actions are based on the [Cloudability API](https://www.ibm.com/docs/en/cloudability-commercial/cloudability-standard/saas?topic=api-getting-started-cloudability-v3) and require configuring a Cloudability [connection](/cloud-access/access-levels-permissions) with your API key and API URL. The following sections describe the four actions available in the Cloudability block. ### Get Recommendations Retrieves cost optimization recommendations from Cloudability with extensive filtering options: * **Vendor Type**: AWS, Azure, GCP, or Containers * **Recommendation Type**: Dynamic dropdown based on the selected vendor * **Look-Back Period**: Last 10 or 30 days * **Cost Basis**: On-Demand or Effective pricing * **Recommendations Status**: Show only active, show all (including snoozed), or show only snoozed * **Limit**: Optional maximum number of recommendations to return * **Additional Filters**: Custom filters per [Cloudability's rightsizing API documentation](https://www.ibm.com/docs/en/cloudability-commercial/cloudability-standard/saas?topic=api-rightsizing-end-points) Below is a sample output returned by this step when it is configured to request active AWS EC2 recommendations with a 10-day look-back period: ```json theme={null} { "meta": { "info": [], "aggregates": [ { "cost": 6.1, "basis": "On-Demand", "idleSavings": 0, "optimizedSavings": 4.97, "rightsizeSavings": 1.13 } ], "totalCount": 1 }, "result": [ { "os": "Linux", "idle": 23, "name": "LDN-APP03", "cpuMax": 22, "gpuMax": "N/A", "region": "eu-west-2", "service": "ec2-recs", "snoozed": false, "tenancy": "default", "lastSeen": "2025-07-20T23:00:00Z", "nodeType": "t2.small", "provider": "NATIVE", "memoryMax": "N/A", "unitPrice": 0.03, "totalSpend": 6.1, "accountName": "Training Account - AL", "cpuCapacity": 0.2, "gpuCapacity": 0, "localDrives": -1, "tagMappings": [ { "tag": "tag2", "tagName": "Department", "vendorTagValue": "shared services" }, { "tag": "tag3", "tagName": "Business Unit", "vendorTagValue": "shared services" }, { "tag": "tag5", "tagName": "Resource Name", "vendorTagValue": "ldn-app03" }, { "tag": "tag12", "tagName": "Department Mispelling", "vendorTagValue": "shared services" }, { "tag": "tag21", "tagName": "Scaleup", "vendorTagValue": "shared services" } ], "commentCount": 4, "currencyCode": "USD", "daysInactive": 0, "gpuMemoryMax": "N/A", "hoursRunning": 234.51, "localCapacity": -1, "instanceFamily": "t2", "memoryCapacity": 2, "networkCapacity": 100, "recommendations": [ { "risk": 0, "action": "Rightsize", "cpuRisk": 0, "savings": 1.13, "cpuRatio": 2, "diskRisk": 0, "gpuRatio": 0, "nodeType": "t3a.small", "memoryFit": true, "unitPrice": 0.02, "currentGen": true, "inDefaults": true, "memoryRisk": 0, "sameFamily": false, "sameMemory": true, "savingsPct": 18, "cpuCapacity": 0.4, "gpuCapacity": 0, "localDrives": -1, "memoryRatio": 1, "networkRisk": 0, "maxInstances": 1, "minInstances": 1, "networkRatio": 50, "defaultsOrder": 1, "localCapacity": -1, "gpuMemoryRatio": 0, "instanceFamily": "t3a", "memoryCapacity": 2, "networkCapacity": 5000, "preferenceOrder": 1, "diskXPutCapacity": 160, "gpuMemoryCapacity": 0, "previousGenTarget": false, "persistentStorageAdded": false }, { "risk": 0, "action": "Rightsize", "cpuRisk": 0, "savings": 0.56, "cpuRatio": 2, "diskRisk": 0, "gpuRatio": 0, "nodeType": "t3.small", "memoryFit": true, "unitPrice": 0.02, "currentGen": true, "inDefaults": true, "memoryRisk": 0, "sameFamily": false, "sameMemory": true, "savingsPct": 9, "cpuCapacity": 0.4, "gpuCapacity": 0, "localDrives": -1, "memoryRatio": 1, "networkRisk": 0, "maxInstances": 1, "minInstances": 1, "networkRatio": 50, "defaultsOrder": 2, "localCapacity": -1, "gpuMemoryRatio": 0, "instanceFamily": "t3", "memoryCapacity": 2, "networkCapacity": 5000, "preferenceOrder": 2, "diskXPutCapacity": 160, "gpuMemoryCapacity": 0, "previousGenTarget": false, "persistentStorageAdded": false } ], "snoozeExpiresOn": "", "vendorAccountId": "366445176032", "availabilityZone": "eu-west-2c", "defaultMemoryFit": true, "maxInstanceCount": 1, "minInstanceCount": 1, "defaultCurrentGen": true, "defaultSameFamily": false, "gpuMemoryCapacity": 0, "resourceIdentifier": "i-0d380eee1c3bc4fed", "defaultCrossArchitecture": false } ] } ``` ### Snooze Recommendations Temporarily dismisses specific recommendations: * **Vendor Type**: AWS, Azure, GCP, or Containers * **Recommendation Type**: Dynamic dropdown based on the selected vendor * **Account ID**: The cloud account ID * **Resource IDs**: Array of resource IDs to snooze * **Snooze Until**: Date in `yyyy-MM-dd` format, or "never" for indefinite snoozing ### Unsnooze Recommendations Reactivates previously snoozed recommendations: * **Vendor Type**: AWS, Azure, GCP, or Containers * **Recommendation Type**: Dynamic dropdown based on the selected vendor * **Account ID**: The cloud account ID * **Resource IDs**: Array of resource IDs to unsnooze ### Custom API Call Allows making arbitrary calls to any [Cloudability API](https://www.ibm.com/docs/en/cloudability-commercial/cloudability-standard/saas?topic=api-getting-started-cloudability-v3) endpoint: * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical Cloudability workflow starts by collecting active recommendations using the *Get Recommendations* action and iterating through them. For each recommendation, the workflow determines the owner of the affected resource from the `tagMappings` array returned with it, and asks the owner for a decision in Slack. If the owner approves, the workflow remediates the resource using the actions available for the [cloud platforms OpenOps supports](/cloud-access/supported-cloud-providers). If the owner snoozes it, the workflow delays the recommendation with *Snooze Recommendations* and can reactivate it later with *Unsnooze Recommendations*. For the patterns behind owner mapping, approval requests, and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # CloudFix Source: https://docs.openops.com/integrations/cloudfix An overview of how CloudFix can be integrated with OpenOps OpenOps integrates with [CloudFix](https://cloudfix.com/) to automate the retrieval and management of AWS cost optimization recommendations and the execution of their fixes. ## Actions OpenOps provides six [actions](/workflow-management/actions) for interacting with CloudFix: All CloudFix actions are based on the [CloudFix API](https://cloudfix.kayako.com/article/129569-cloudfix-api-customer-guide) and require configuring a CloudFix [connection](/cloud-access/access-levels-permissions) with the CloudFix API URL and an API token. API tokens are created in CloudFix under **Settings** > **API Tokens** with a Reader, Resource Manager, or Runbook Manager role. The following sections describe the six actions available in the CloudFix block. ### Get Report Retrieves the detailed report for a specific recommendation: * **Recommendation ID**: The ID of the recommendation to get a report for ### Get Recommendations Retrieves recommendations from CloudFix with filtering options: * **Status filter**: Optional list of statuses: Suggested, Scheduled, Failed, Completed, Rejected, In Progress, Ready, No Longer Applicable, Resource Deleted, Resource Fixed, or Manually Fixed * **Sort by**: Scheduled At (default), Updated At, Annual Savings, or Annual Cost * **Sort order**: Descending (default) or Ascending * **Include parameters**: Whether to include recommendation parameters in the response * **Finder fixer ID**: Optional ID of a finder fixer to filter by * **Page number**: Page number for pagination, starting from 1 (defaults to 1) * **Page limit**: Maximum number of recommendations per page (defaults to 200) ### Get Recommendations Summary Retrieves a summary of recommendations. This action has no parameters. ### Postpone Recommendations Postpones recommendations until a specified date: * **Recommendation IDs**: Array of recommendation IDs to postpone * **Postpone until**: Date and time until which to postpone the recommendations, in ISO format * **Reason**: Optional reason for postponing ### Create Change Requests Creates change requests from recommendations so that CloudFix can execute the fixes: * **Recommendation IDs**: Array of recommendation IDs to create change requests for * **Execute on schedule**: Whether to execute the change requests on schedule ### Custom API Call Allows making arbitrary calls to any [CloudFix API](https://cloudfix.kayako.com/article/129569-cloudfix-api-customer-guide) endpoint: * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical CloudFix workflow starts by collecting recommendations using the *Get Recommendations* action, then routes each one with a *Condition* step, for example by finder fixer ID: recommendations that need manual work become Jira issues that include the detailed report from the *Get Report* action, while the rest go to the resource owner for approval in Slack. Once approved, the *Create Change Requests* action hands the recommendation to CloudFix as a change request, and *Postpone Recommendations* delays the ones the owner snoozes. For the patterns behind owner mapping, approval requests, and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # CloudHealth Source: https://docs.openops.com/integrations/cloudhealth A tutorial on integrating CloudHealth with OpenOps to resolve rightsizing recommendations [CloudHealth](https://www.vmware.com/products/app-platform/tanzu-cloudhealth) is a cloud cost management and optimization platform that helps companies manage their multi-cloud environments, including AWS, Azure, Google Cloud, private, and hybrid cloud setups. CloudHealth provides cost visibility, allocation, and optimization, suggesting actions such as rightsizing, reserved instance purchases, and idle resource cleanup. While CloudHealth is great for analysis and reporting, it's not really built to orchestrate automation across teams. That's what OpenOps does best, and integrating the two is a great way to get the best of both worlds. Let CloudHealth find issues, and let OpenOps act on them, triggering workflows, automations, and notifications. ## What this tutorial will cover This tutorial guides you step by step to create two workflows in OpenOps: 1. The first workflow, *Fill the Project-Owner mapping table*, fetches all project names from AWS instance metadata stored in CloudHealth and writes them to an OpenOps table. This assumes that, in your organization, cloud resource ownership is allocated on a per-project basis. The finished workflow is [available here](https://docs.openops.com/workflows/fill-project-owner-mapping-table.json). 2. The second workflow, *CloudHealth Rightsizing Recommendations*, fetches AWS EC2 rightsizing recommendations from CloudHealth, looks up owners of the projects they fall into, notifies owners via Slack, and implements resolutions from owners by creating Jira tickets, snoozing, or dismissing recommendations. The finished workflow is [available here](https://docs.openops.com/workflows/cloudhealth-rightsizing-recommendations.json). ## Prerequisites To follow this tutorial, you will need: 1. A CloudHealth account configured to provide recommendations for AWS EC2 instances. 2. A Slack workspace to send notifications to. 3. A Jira Cloud instance to file issues. ## Setting up connections to services At several steps in this tutorial, OpenOps will need to interact with CloudHealth, Slack, and Jira. To enable this interaction, you need to configure what OpenOps calls "connections" to these services. While you could do this as you go, it's easier to set up connections in advance and use them throughout the tutorial. In the left pane of your OpenOps instance, click **Connections**. ### Set up a CloudHealth connection Click **New Connection** in the top right, then select **CloudHealth** from the list of services. This will open a new dialog that looks like this: Creating a CloudHealth connection In the **API Key** field, enter your CloudHealth API key. If you don't have it at hand, follow the instructions in the dialog to generate an API key. Once you have the key, paste it into the **API Key** field and click **Save**. ### Set up a Slack connection Click **New Connection** in the top right, then select **Slack** from the list of services. This will open the **Create Slack Connection** dialog that looks like this: Creating a Slack connection Click **Connect**. This will open a pop-up window asking you to authorize OpenOps to connect to your Slack workspace: Review the permissions that OpenOps is requesting, then click **Allow**. Back in the **Create Slack Connection** dialog, click **Save**. ### Set up a Jira connection Click **New Connection** in the top right, then select **Jira Cloud** from the list of services. This will open the **Create Jira Connection** dialog that looks like this: Creating a Jira connection In **Instance URL**, enter the URL of your Jira Cloud instance, such as `https://your-company.atlassian.net`. In **Email**, enter your Jira Cloud account email. In **API Token**, enter a Jira Cloud API token with permissions to create issues. If you don't have a token at hand, follow the instructions in the dialog to generate one. Click **Save**. After you've set up all the connections, you should see them listed in the **Connections** view in OpenOps: A list of connections in OpenOps You can now proceed to creating the actual workflows. ## Creating a workflow to fill the project-owner mapping table The first workflow you're going to build will help track resource ownership by project. For this workflow to operate, it needs an OpenOps table to store project information. Let's create the table first. If you don't want to follow this section step by step, you can [download the finished workflow](https://docs.openops.com/workflows/fill-project-owner-mapping-table.json) and [import](/workflow-management/import-export/#importing-workflows) it. ### Create a project-owner mapping table To create the table that will store project names and their owners, follow these steps: 1. In the left-side OpenOps menu bar, click **Tables**. 2. Under the **Tables** heading, click **OpenOps Dataset** to expand the list of tables. 3. At the bottom of the list, click **New table**. 4. In the **Name** text field, enter *CloudHealth project-owner mapping*. 5. Click **Add table**. 6. When the new table is created, it has a few default fields (a *field* in OpenOps tables is what we typically call a column). You won't need them. Instead, create two new fields. Start with a field for the project name: 1. Click **+** in the table header to create a new field. 2. In the list of field data types, click **Single line text**. 3. Replace the default field name with *CloudHealth project*. 4. Click **Create**. 7. Create a second field for the owner email: 1. Click **+** in the table header to create a new field. 2. In the list of field data types, click **Email**. 3. Replace the default field name with *Owner email*. 8. Now, make *CloudHealth project* the primary field: 1. Click the down arrow in the header of the **Name** field created by default. 2. Click **Change primary field**. 3. In the **Primary field** dropdown, select *CloudHealth project*. 4. Click **Change**. 9. Delete the three default fields: **Name**, **Notes**, and **Active**. For each of these fields, click the down arrow in the header, then click **Delete field**. The resulting project-owner mapping table should look like this: A ready-to-use project-owner mapping table ### Create a new workflow Now that you've prepared a project-owner mapping table, you can start creating a workflow that takes advantage of it. In the left-side OpenOps menu bar, click **Workflows**. When the list of workflows opens, click the **+ New Workflow** button in the top right. OpenOps will open its workflow editor with a new untitled workflow that initially contains only an empty trigger step: A new workflow in OpenOps In the top left, click the down arrow next to the workflow name, then click **Rename** and rename the workflow *Fill the Project-Owner mapping table*. ### Configure the trigger to run every week The first thing that needs to be done is to configure your workflow to run on a schedule. In the workflow editor, click the trigger step. When a dropdown with types of triggers opens, select **Schedule**, then **Every Week**. After selecting the trigger type and frequency, you'll see the trigger step's properties pane on the right, with the **Configure** tab open. Under **Day of the week**, select **Monday**. Under **Hour of the day**, select **Noon**. Keep the default time zone (UTC), or set it to the time zone you're in. Now, open the **Test** tab in the properties pane. Under **Step output**, click **Load Data**. This tests your step. Going forward, you'll need to test all steps before you can test the entire workflow. While in the case of a trigger this is more of a formality, in many cases testing individual steps will help you spot and fix configuration errors quickly. Here's what your workflow should look like at this point: A configured and tested trigger ### Get all AWS instances from CloudHealth The goal of this workflow is to get all project names from AWS instance metadata stored in CloudHealth and write them to an OpenOps table. This way, the EC2 rightsizing workflow you'll create next can look up project owners based on project names. Therefore, the first action of this workflow is to fetch information about all AWS instances from CloudHealth. In the workflow graph, under the trigger, click **+** to add a new step. In the pop-up menu, scroll down and click **CloudHealth**. In the list of CloudHealth-related actions, select **Search Assets**: This adds a new step to the workflow graph and displays the action's properties pane on the right. You'll now need to configure the action. First, at the very top of the properties pane, click **Edit Step Name** next to the default name and rename the step *Get all AWS instances*. For **API Key**, select your existing CloudHealth connection that you set up earlier. Set **Asset Type** to **AWSInstance**. Click the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. This will test the action and display its output. Your workflow should now look like this: A configured CloudHealth action ### Extract distinct project names Now that you have a list of all AWS instances, you need to know which projects they belong to. For this, let's create a JavaScript code block that goes through the metadata of all instances, extracts project names, and returns a list of distinct project names. In the workflow graph, click **+** to add a new step. In the pop-up menu, select **Code** in the left pane, then click **Custom TypeScript Code** in the right pane. This adds a new step to the workflow graph and displays the code block's properties pane on the right. At the top of the properties pane, click **Edit Step Name** and rename the step *Extract distinct project names*. Next, you need to let the custom code action know exactly what data it should process. Under **Inputs** in the properties pane, click **Add Item**, which will display two new fields. Enter `instances` in the left field. When you click in the right field, the **Data Selector** view opens. Inside that view, click **Insert** alongside the **Get all AWS instances** entry: Selecting an input for a code action This ensures that the code action gets the list of instances as an input. Next, inside the **Code** editor field, replace the placeholder with the following JavaScript code snippet: ```javascript theme={null} export const code = async (inputs) => { const projectsOnly = inputs.instances.map(item => { const match = item.groups.match(/Project:\s*([^,]+)/); const project = match ? match[1].trim() : null; return project; }) return [...new Set(projectsOnly)]; }; ``` This is what the **Configure** tab in the properties pane should now look like: A configured custom code step Click the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. After testing, you should see an array containing all project names in the **Output** area: ### Iterate over project names Now that you have a list of all project names, create a loop to go through each of them and decide what to do with them. First, click **+** in the workflow editor to add a new step. In the pop-up menu, select **Loop on Items** in the left pane, then click **Loop on Items** in the right pane. At the top of the properties pane, click **Edit Step Name** and rename the step *For each project name*. Click in the **Items** field. In the **Data Selector** view that opens, click **Insert** alongside the **3. Extract distinct project names** entry. This passes the list of project names obtained in the previous step as the input for the loop to iterate over. This is what the **Configure** tab in the properties pane should now look like: A configured loop step Click the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. The test output should be an object representing the first item in the list of project names: ```json theme={null} { "item": "Other", "index": 1 } ``` ### Check if the project name is already in the table If a project is already listed in the table and a project owner email is already defined for it, you don't need to update the existing record. This avoids overwriting project emails that were added earlier. First, let's see if the project name is already in the table. In the workflow editor, click the **+** button *inside* the loop: In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Get Records** in the right pane. At the top of the properties pane, click **Edit Step Name** and rename the step *Get project record*. For the **Table** field, select **CloudHealth project-owner mapping** — that's the table you created manually earlier. Under **Fields to filter by**, click **Add Item**. This will open a new area to define a search filter. Inside the area: * In the **Field name** dropdown, select **CloudHealth project**. * In the **Filter type** dropdown, select **Is equal**. * In the **CloudHealth project** field, use **Data Selector** to expand the **4. For each project name** entry from the previous step, then click **Insert** alongside the **item** entry: Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to search the table for a project name Click the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. After testing, the output is a JSON object representing the search results in the OpenOps table. Since the table is empty so far, the output looks like this: ```json theme={null} { "count": 0, "items": [] } ``` This is a problem because the configuration of the next step assumes that a record has been found. In cases like this, OpenOps allows you to override the actual testing output. To do this, click **Sample output** in the **Test** tab. In the **Output** area, paste the following JSON, then click **Apply**: ```json theme={null} { "count": 1, "items": [ { "id": 9, "order": "4.00000000000000000000", "CloudHealth project": "Other", "Owner email": "your@email.here" } ] } ``` ### Check if a project owner email is already defined Now, if the project name is already in the table, you need to check whether a project owner email is defined for it. If it is, you don't need to update the existing record. In the workflow editor, click **+** to add a new step. In the pop-up menu, select **Condition** in the left pane, then click **Condition** in the right pane. At the top of the properties pane, click **Edit Step Name** and rename the step *Is email already defined?*. Under **Continue If**, click the left field with the placeholder text *First value*. In **Data Selector**, expand **5. Get project record**, then **items**, then **items\[1]**. Click **Insert** alongside the **Owner email** entry: In the dropdown between the two fields, select **Exists**. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to determine if an email is already defined Click the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. After testing, the output is a JSON object representing the condition evaluation: ```json theme={null} { "condition": true } ``` ### Add project name to the OpenOps table Now you need to add a record with the project name to the OpenOps table, unless it's already there *and* the owner email is defined. To do this, click **+** in the workflow editor under the **False** branch of the **Is email already defined?** condition. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Add or Update Record** in the right pane. In the properties pane of the new step, rename the step *Add project to mapping table*. For the **Table** field, select **CloudHealth project-owner mapping**. Click the **Primary Key Value** field to open the **Data Selector** view. In this view, expand the **4. For each project name** entry, then click **Insert** alongside the **item** entry. Under **Fields to update**, click **Add Item**. This opens a new area where you specify what to add in the **Owner email** field of your OpenOps table. Inside this area: * In the **Field name** dropdown, select **Owner email**. * In the **Owner email** field, enter your own email address. You'll use this to test the EC2 rightsizing workflow described next. Your account in your organization's Slack workspace should be registered to this email. Once both workflows described in this tutorial are complete, replace your email with the actual project owners' emails. Here's what the **Configure** tab in the properties pane should now look like: A configured table step Click the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. After testing, the output is a JSON object representing the new row added to the table: ```json theme={null} { "id": 1, "order": "1.00000000000000000000", "CloudHealth project": "Other", "Owner email": "your@email.here" } ``` ### Test and publish the workflow You now have all the steps needed to populate the project-owner mapping table. The final task is to test and publish the workflow. To test the workflow, scroll to the top of the workflow graph and click the **Test Workflow** button above the trigger: Although this is called "testing", OpenOps will actually run the entire workflow, performing all actions as if it were running on its defined schedule. Once the run completes, you should see green checkmarks next to each step in the **Run Details** pane on the right, along with a **Run Succeeded** status message at the bottom: Workflow tested successfully Click **Edit** in the top right to return to the workflow editor. Then click **Publish** in the same corner to make the workflow live. After publishing, the workflow will run on the schedule you defined, which is every Monday at noon UTC. If you click **Workflows** in the left-side menu, you'll see the workflow you just published. Its runs will appear in the view that opens when you click **Runs** in the same menu. ### Review the project-owner mapping table Click **Tables** in the left-side menu. Under **OpenOps Dataset**, click **CloudHealth project-owner mapping**. After running the workflow, the table should look something like this: Project-owner mapping table At this point, you have everything you need to begin building the second workflow. ## Creating a workflow to process CloudHealth rightsizing recommendations Now let's create another workflow — this one will process CloudHealth EC2 rightsizing recommendations. If you don't want to follow this section step by step, you can [download the finished workflow](https://docs.openops.com/workflows/cloudhealth-rightsizing-recommendations.json) and [import](/workflow-management/import-export/#importing-workflows) it. ### Create a new workflow In the **Overview** or **Workflows** view in OpenOps, click the **+ New Workflow** button in the top right. When the OpenOps workflow editor opens with a blank workflow, click the down arrow next to the workflow name in the top left, then click **Rename**, and change the name to *CloudHealth Rightsizing Recommendations*. ### Configure the trigger to run every working day Click the trigger step in the workflow editor. In the trigger type dropdown, select **Schedule**, then choose **Every Day**. In the trigger step's properties pane on the right, under the **Configure** tab, keep the default settings. With these defaults, the workflow will run every day (excluding weekends) at midnight UTC: A configured and tested trigger Next, open the **Test** tab in the properties pane, and under **Step output**, click **Load Data**. Remember: testing every step is important. Testing earlier steps enables you to test later ones — and eventually the full workflow. ### Fetch rightsizing recommendations from CloudHealth Now it's time to add the first action step. Since this workflow is built around processing CloudHealth recommendations, let's start there. In the workflow graph, under the trigger, click the **+** button to add a new step. In the pop-up menu, scroll down and click **CloudHealth**. From the list of available CloudHealth actions, select **Get Recommendations**: At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Get EC2 rightsizing recommendations*. Under **API Key**, select the CloudHealth connection you created earlier. Then, configure the remaining action properties like this: * Under **Recommendation Type**, select **EC2 Rightsizing**. * Under **Evaluation Duration**, select **Last 7 Days**. * Under **Limit**, set the value to `3` to retrieve the top 3 recommendations. This should be enough for testing purposes. Later on, when you've completed this tutorial, feel free to increase this value or set this field empty to fetch all available recommendations. Your workflow should now look like this: A configured CloudHealth action Click the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. This will test the action and display its output in the bottom-right pane. Because the action returns a list of recommendations, expect JSON output similar to this: ```json theme={null} { "rightsizingRecommendations": { "edges": [ { "node": { "targetAsset": { ... }, "currentMetrics": [ ... ], "currentUtilizationStatus": "UNDER_TARGET", "options": [ ... ], "currentMonthlyPrice": 112.96, "projectedMonthlyPrice": 66.48167, "projectedMonthlySavings": 46.478333, "currentCost": 67.77599, "projectedCost": 66.48167, "projectedSavingsByCost": 1.2943289, "terminateRecommendation": false, "__typename": "RightsizingRecommendation" }, "__typename": "RightsizingRecommendationEdge" }, ... more nodes ], "utilizationStatusSummary": { ... }, "pageInfo": { ... }, "totalCount": 18, "__typename": "RightsizingRecommendationConnection" } } ``` ### Loop over recommendations CloudHealth returns a list of recommendations, but you'll want to process them one at a time. To do this, let's use a **Loop on Items** action. In the workflow graph, click the **+** button to add a new step. In the pop-up menu, select **Loop on Items** in the left pane, then click **Loop on Items** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *For each recommendation*. In the properties pane, click the **Items** field. In the **Data Selector** view that opens, expand **2. Get EC2 rightsizing recommendations**, then expand **rightsizingRecommendations**, and click **Insert** alongside the **edges** entry: Selecting items to loop over Your new step in the workflow graph and the **Configure** tab in its properties pane should now look like this: A configured Loop on Items block Open the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. The output should be a JSON object representing the first rightsizing recommendation: ```json theme={null} { "item": { "node": { "targetAsset": { ... }, "currentMetrics": [ ... ], "currentUtilizationStatus": "UNDER_TARGET", "options": [ ... ], "currentMonthlyPrice": 112.96, "projectedMonthlyPrice": 66.48167, "projectedMonthlySavings": 46.478333, "currentCost": 67.77599, "projectedCost": 66.48167, "projectedSavingsByCost": 1.2943289, "terminateRecommendation": false, "__typename": "RightsizingRecommendation" }, "__typename": "RightsizingRecommendationEdge" }, "index": 1 } ``` All further steps in this workflow will be added inside this loop. ### Generate opportunity ID The first step inside the loop will generate an ID for the current recommendation. Since CloudHealth does not provide this ID, you'll need to create one yourself. The ID will be used to save the recommendation in the preconfigured *Opportunities* table in OpenOps, track its status, and, most importantly, determine whether to send a Slack notification to the project owner. While you could simplify the workflow greatly without tracking recommendations in an OpenOps table, you then wouldn't be able to select which notifications to send and which to ignore. As a result, project owners would potentially receive multiple notifications for the same recommendation, which would get frustrating very soon. Inside the loop in the workflow graph, click **+** to add a new step. In the pop-up menu, select **Text Operations** in the left pane, then click **Concatenate** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Opportunity ID*. In the properties pane, under **Texts**, click **Add Item**. Click the new field to open the **Data Selector** view. From there, expand **3. For each recommendation**, then **item**, then **node**, then **targetAsset**, and click **Insert** alongside the **id** entry: Selecting a targetAsset ID Next, under **Texts**, click **Add Item** again to add another field. Open the **Data Selector** view once more, expand **3. For each recommendation**, then **item**, then **node**, then **targetAsset**, and click **Insert** alongside the **awsInstanceId** entry: Your new step in the workflow graph and the **Configure** tab in its properties pane should now look like this: A configured text concatenation block Open the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. The output should be a string that concatenates the two IDs you just configured: ```text theme={null} 6322302345294i-0fbc4dbf9ca0b46c0 ``` ### Look up the opportunity in the OpenOps table Now that you have an opportunity ID, the next step is to check whether a recommendation with this ID already exists in the *Opportunities* table in OpenOps. Inside the loop in the workflow graph, click **+** to add a new step. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Get Records** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Find table entry for opportunity*. In the **Configure** tab in the properties pane, under **Table**, select **Opportunities**. Under **Fields to filter by**, click **Add Item**. In the new filter section: * Under **Field name**, select **External Opportunity Id**. * Under **Filter type**, select **Is equal**. * In the **External Opportunity Id** field, open the **Data Selector** view and click **Insert** alongside the **4. Opportunity ID** entry. The new step in the workflow graph and the **Configure** tab in its properties pane should now look like this: A configured table lookup step Next, open the **Test** tab in the properties pane. Under **Step output**, click **Test Step**. The output will be an object showing the number of matching table entries and their contents. Since this is a new recommendation, there should be no existing entries. The expected output looks like this: ```json theme={null} { "count": 0, "items": [] } ``` However, if the recommendation already exists in the table, the output will have a different structure. Because the next step of the workflow relies on part of that output, you'll need to provide a sample output for testing. To do this, click **Sample output** in the **Test** tab. In the **Output** area, paste the following JSON, then click **Apply**: ```json theme={null} { "count": 1, "items": [ { "id": 48, "order": "1.00000000000000000000", "ID": "6cc0f15a-f3eb-4d77-b6b3-2f51eebbe8cf", "Status": { "id": 5, "value": "Created", "color": "grey" }, "Opportunity Type": null, "Estimated savings USD per month": null, "Resource Id": null, "Workflow": null, "Service": null, "Region": null, "Account": null, "Owner": null, "Follow-up task": null, "Opportunity generator": null, "External Opportunity Id": "6322302345294i-0fbc4dbf9ca0b46c0", "Complexity": null, "Risk": null, "Opportunity details": null, "Snoozed until": null, "Resolution notes": null, "Creation time": "2025-09-22T13:44:52.980710Z", "Last modified time": "2025-09-22T13:44:52.980710Z" } ] } ``` ### Save table entry ID to OpenOps storage You now need to map the ID of the current recommendation to the ID of its entry in the *Opportunities* table, and save this mapping to OpenOps' built-in key-value storage. This will be required later in the workflow when deciding whether to send a notification to the project owner. Inside the loop in the workflow graph, click **+** to add a new step. In the pop-up menu, select **Storage** in the left pane, then click **Put** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Save table record ID to storage*. In the **Key** field, use **Data Selector** to select **4. Opportunity ID**. In the **Value** field, open **Data Selector**, expand **5. Find table entry for opportunity**, then **items**, then **items\[1]**. Click **Insert** alongside the uppercase **ID** entry: Selecting a table entry ID The new step in the workflow graph and the **Configure** tab in its properties pane should now look like this: A configured storage step Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output will be the value of the ID field in the *Opportunities* table entry representing the current recommendation: ```text theme={null} 6cc0f15a-f3eb-4d77-b6b3-2f51eebbe8cf ``` ### Check if a table entry exists When you run a published workflow, an entry for a CloudHealth recommendation may or may not already exist in the *Opportunities* table. What happens next in the workflow depends on whether the entry exists. To check this, you'll add a condition step. Inside the loop in the workflow graph, click **+** to add a new step. In the pop-up menu, select **Condition** in the left pane, then click **Condition** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *If no table entry for opportunity*. Under **Continue If**, click the left field with the placeholder *First value*. In the **Data Selector** view, expand **5. Find table entry for opportunity** and click **Insert** alongside the **count** entry. In the dropdown between the two fields, select **(Number) Is less than**. In the right field, enter `1`. The new step in the workflow graph and the **Configure** tab in its properties pane should now look like this: A configured condition This condition evaluates to `true` if there's no table entry for the current recommendation, and `false` if one exists. Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. Since you added sample output data for step five that contains a table entry, the test output will be `false`: ```json theme={null} { "condition": false } ``` ### If no table entry, create one If the condition above evaluates to `true`, it means the *Opportunities* table doesn't have a record for the recommendation. In this case, you'll create a new table entry and save its ID to storage for later use. #### Create a new table entry Inside the **True** branch of the condition, click **+** to add a new step. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Add or Update Record** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Add table entry for opportunity*. For the **Table** field, select **Opportunities**. Leave the **Primary Key Value** field empty so that OpenOps generates a unique ID for the new record. Under **Fields to update**, click **Add Item**. In the new area: * In the **Field name** dropdown, select **External Opportunity Id**. * In the **External Opportunity Id** field, open the **Data Selector** view and click **Insert** alongside the **4. Opportunity ID** entry. Click **Add Item** again to add another field. In the new area: * In the **Field name** dropdown, select **Status**. * In the **Status** dropdown, select **Created**. Here's what the **Configure** tab in the properties pane should now look like: A configured step to add a table entry Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output will represent a new entry in the *Opportunities* table: ```json theme={null} { "id": 49, "order": "2.00000000000000000000", "ID": "43bd78d2-18d9-4908-b035-c854364a19bd", "Status": { "id": 5, "value": "Created", "color": "grey" }, "Opportunity Type": null, "Estimated savings USD per month": null, "Resource Id": null, "Workflow": null, "Service": null, "Region": null, "Account": null, "Owner": null, "Follow-up task": null, "Opportunity generator": null, "External Opportunity Id": "6322302345294i-0fbc4dbf9ca0b46c0", "Complexity": null, "Risk": null, "Opportunity details": null, "Snoozed until": null, "Resolution notes": null, "Creation time": "2025-09-22T15:05:23.232427Z", "Last modified time": "2025-09-22T15:05:23.232427Z" } ``` #### Save table entry ID to storage Now that you have a new table entry, save its ID to OpenOps' built-in key-value storage. Inside the **True** branch of the condition, click **+** to add a new step. In the pop-up menu, select **Storage** in the left pane, then click **Put** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Update table record ID in storage*. You use the word "update" here because a key-value pair was already created in a prior step, but since no table record existed, its value was empty. In the **Key** field, use **Data Selector** to select **4. Opportunity ID**. In the **Value** field, open **Data Selector**, expand **8. Add table entry for opportunity**, then click **Insert** alongside the uppercase **ID** entry: Here's what the **Configure** tab in the properties pane should now look like: A configured step to update storage with table entry ID Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output will be the value of the ID field in the *Opportunities* table entry that represents the current recommendation: ```text theme={null} 43bd78d2-18d9-4908-b035-c854364a19bd ``` ### If a table entry exists, check the status You've just handled a case where a new table entry needs to be created, adding steps to the **True** branch of the condition step that we called *If no table entry for opportunity*. If a table entry already exists, there's also something that needs to be done. Let's now add actions to the **False** branch of the condition. #### Check if an existing table entry is in the "Created" state Inside the **False** branch of the condition, click **+** to add a new step. In the pop-up menu, select **Condition** in the left pane, then click **Condition** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Table entry exists but opportunity is marked as new*. Under **Continue If**, click the left field. In the **Data Selector** view, expand **5. Find table entry for opportunity**, then **items**, then **items\[1]**, then **Status**. Click **Insert** alongside the **value** entry: In the dropdown between the two fields, select **(Text) Is**. In the right field, enter `Created`. The new step in the workflow graph and the **Configure** tab in its properties pane should now look like this: A configured condition Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. #### If the current status is "Created", update it If a table entry for a recommendation already exists, but it's in the "Created" state, this means a project owner has been notified about this recommendation the last time the workflow was run but has not taken any action yet. In this case, you should change the status to avoid notifying the project owner again. In the **True** branch of the *Table entry exists but opportunity is marked as new* condition, click **+** to add a new step. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Add or Update Record** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Change status of existing opportunity*. For the **Table** field, select **Opportunities**. In the **Primary Key Value** field, use **Data Selector** to expand **5. Find table entry for opportunity**, then **items**, then **items\[1]**. Click **Insert** alongside the uppercase **ID** entry. Under **Fields to update**, click **Add Item**. In the new area: * In the **Field name** dropdown, select **Status**. * In the **Status** dropdown, select **Under review**. Here's what the **Configure** tab in the properties pane should now look like, along with the workflow graph: A configured step to update record status Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output should represent the updated status of the existing table entry: ```json theme={null} { "id": 48, "order": "1.00000000000000000000", "ID": "6cc0f15a-f3eb-4d77-b6b3-2f51eebbe8cf", "Status": { "id": 9, "value": "Under review", "color": "pink" }, ... } ``` ### Get the current date You've now written all steps inside the outer **If no table entry for opportunity** condition. To create the next step, click **+** in the location on the workflow graph right after both branches of the condition merge: Creating a step after a completed condition In the pop-up menu, select **Date Operations** in the left pane, then click **Get Current Date** in the right pane. Keep the default settings in the **Configure** tab of the properties pane. Switch to the **Test** tab, then under **Step output**, click **Test Step**. The output should be the current date: ```text theme={null} 2025-09-24 ``` You will use this date in a later step when you decide whether to send a Slack notification for a previously snoozed recommendation. ### Get table ID for recommendation Soon you'll need to decide if the project owner should be notified about the current CloudHealth recommendation. To prepare for this, you first need to fetch the ID of the table record for this recommendation. Click **+** to add a new step. In the pop-up menu, select **Storage** in the left pane, then click **Get** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Get table ID for opportunity*. In the **Key** field, use **Data Selector** to select **4. Opportunity ID**. Keep **Default Value** blank and **Store Scope** at the default value. The new step in the workflow graph and the **Configure** tab in its properties pane should now look like this: A configured step to get a table ID Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The expected output is the ID of the current CloudHealth recommendation in the *Opportunities* table: ```text theme={null} 43bd78d2-18d9-4908-b035-c854364a19bd ``` ### Get table entry for recommendation With the ID of the current CloudHealth recommendation in the *Opportunities* table, you can now read its full entry from the table. Click **+** to add a new step. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Get Records** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Get table entry for opportunity*. In the **Table** field, select **Opportunities**. Under **Fields to filter by**, click **Add Item**. In the new area: * For **Field name**, select **ID**. * For **Filter type**, select **Is equal**. * In the **ID** field, use **Data Selector** to select **13. Get table ID for opportunity**. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to read a table record Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output should represent the current recommendation's table entry: ```json theme={null} { "count": 1, "items": [ { "id": 49, "order": "2.00000000000000000000", "ID": "43bd78d2-18d9-4908-b035-c854364a19bd", "Status": { "id": 5, "value": "Created", "color": "grey" }, ... } ] } ``` ### Decide to skip or notify the project owner You now have all the information you need to decide whether to notify the project owner about the current recommendation over Slack. To make this decision, you'll need to introduce a condition step. In the workflow graph, click **+** to add a new step. In the pop-up menu, select **Condition** in the left pane, then click **Condition** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Skip or notify?*. You want to notify the project owner in two cases: * If this is a new recommendation, as evidenced by the "Created" state. * If the project owner has been notified of the current recommendation in the past, chose to snooze it, and the snooze date has passed. Let's define these two cases. Under **Continue If**, click the left field. In **Data Selector**, expand **14. Get table entry for opportunity**, then **items**, then **items\[1]**, then **Status**. Click **Insert** alongside the **value** entry: Selecting a status value In the dropdown between the two fields, select **(Text) Is**. In the right field, enter `Created`. Click **+ Or**. In the new area, click the left field. In **Data Selector**, expand **14. Get table entry for opportunity**, then **items**, then **items\[1]**. Scroll down and click **Insert** alongside the **Snoozed until** entry. In the dropdown between the two fields, select **(Date) Is before**. In the right field, use **Data Selector** to insert **12. Get Current Date**. The new step in the workflow graph and the **Configure** tab in its properties pane should now look like this: A configured condition step Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. All further steps in this workflow will be added inside the **True** branch of this condition. ### Get asset perspectives from CloudHealth In case the project owner should be notified, you need to add several preparatory steps in the **True** branch of the condition, followed by steps to send a Slack notification and handle the project owner's response. Let's start with making a call to the CloudHealth API to determine which project the AWS instance related to the current recommendation belongs to. In the **True** branch of the *Skip or notify?* condition, click **+** to add a new step. In the pop-up menu, select **CloudHealth** in the left pane, then click **Get Asset Perspectives** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Get project and more perspectives*. Under **API Key** in the properties pane, select your existing CloudHealth connection. Under **Asset Type**, select **AwsInstance**. Under **Fields to filter by**, click **Add Item**. In the new area: * Under **Field name**, select **instance\_id**. * In the **Value to search for** field, use **Data Selector** to expand **3. For each recommendation**, then **item**, then **node**, then **targetAsset**. Click **Insert** alongside the **awsInstanceId** entry: Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to get asset perspectives from CloudHealth Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output is a list of asset perspectives for the given AWS instance ID, including the project it belongs to: ```json theme={null} [ { "asset": { "instance_id": "i-0fbc4dbf9ca0b46c0", "name": "jeff-test-2-ng-2-Node", "state": "running", ... }, "perspectives": { "Project": "Opencart", ... } } ] ``` ### Get owner by project Now that you know which project the recommendation belongs to, you can find out who owns the project. Click **+** to add a new step. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Get Records** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Get owner by project*. In the **Table** field, select **CloudHealth project-owner mapping**. Under **Fields to filter by**, click **Add Item**. In the new area: * For **Field name**, select **CloudHealth project**. * For **Filter type**, select **Is equal**. * In the **CloudHealth project** field, use **Data Selector** to expand **16. Get project and more perspectives**, then **16. Get project and more perspectives\[1]**, then **perspectives**. Click **Insert** alongside the **Project** entry: Selecting a project Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to get owner by project Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output is a project-owner mapping table entry for the given project: ```json theme={null} { "count": 1, "items": [ { "id": 7, "order": "2.00000000000000000000", "CloudHealth project": "Opencart", "Owner email": "your@email.here" } ] } ``` ### Format monthly savings You now know who to notify about the recommendation. What to include in the notification, though? This step and the next one will construct the notification message. First, let's take the monthly savings that CloudHealth predicts and format the number in a human-readable way. Click **+** to add a new step. In the pop-up menu, select **Math Operations** in the left pane, then click **Truncate** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Format monthly savings*. In the **Number to truncate** field, use **Data Selector** to expand **3. For each recommendation**, then **item**, then **node**. Scroll down and click **Insert** alongside the **projectedMonthlySavings** entry. In **Number of decimal places**, enter `2`. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to format monthly savings Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output is the projected monthly savings value with two decimal places: ```json theme={null} 46.48 ``` ### Describe the recommendation Let's now use formatted monthly savings and other recommendation details to construct a message that will be sent to the project owner. Later, if the project owner decides to create a Jira issue, this description will also be included in the issue. Click **+** to add a new step. In the pop-up menu, select **Storage** in the left pane, then click **Put** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Opportunity description*. In the **Key** field, use **Data Selector** to expand **3. For each recommendation**, then **item**, then **node**, then **targetAsset**. Click **Insert** alongside the **id** entry. The **Value** field represents the opportunity description, and it needs to be multi-line: 1. In the first line, type in "Account: ", then use **Data Selector** to expand **3. For each recommendation**, then **item**, then **node**, then **targetAsset**, then **account**. Click **Insert** alongside the **name** entry. 2. In the second line, type in "Instance ID: ", then use **Data Selector** to expand **3. For each recommendation**, then **item**, then **node**, then **targetAsset**. Click **Insert** alongside the **awsInstanceId** entry. 3. In the third line, type in "Instance name: ", then use **Data Selector** to expand **3. For each recommendation**, then **item**, then **node**, then **targetAsset**. Click **Insert** alongside the **name** entry. 4. In the fourth line, type in "Projected monthly savings: \$", then in the **Data Selector**, insert **18. Format monthly savings**. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured opportunity description step Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output is a part of the message that the project owner will receive: ```text theme={null} Account: CloudHealth Redshirt Instance ID: i-0fbc4dbf9ca0b46c0 Instance name: jeff-test-2-ng-2-Node Projected monthly savings: $46.48 ``` ### Get table record ID from storage You'll soon implement sending a Slack notification and handling the project owner's response. For this, you'll need the ID of the record in the *Opportunities* table that represents the current recommendation. Let's fetch this ID from storage. Click **+** to add a new step. In the pop-up menu, select **Storage** in the left pane, then click **Get** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Get table record ID from storage*. In the **Key** field, use **Data Selector** to insert **4. Opportunity ID**. Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. ### Send a Slack notification with action buttons You now have everything you need to notify the project owner about the current recommendation and suggest actions. Click **+** to add a new step. In the pop-up menu, select **Slack** in the left pane, then click **Request Action** in the right pane. In the **Connection** dropdown, select the Slack connection you created earlier. Alongside the **Recipient Channel or User** field, click **Dynamic** to enable specifying the output of a previous step instead of selecting from a dropdown. Then, in **Recipient Channel or User**, use **Data Selector** to expand **17. Get owner by project**, then **items**, then **items\[1]**. Click **Insert** alongside the **Owner email** entry. In the **Header** field, enter "New CloudHealth savings opportunity". The value in the **Message** field is going to be multi-line: 1. In the first line, paste the following text: ```text theme={null} :moneybag: *CloudHealth has identified an opportunity to rightsize an EC2 instance* ``` 2. In the second line, use **Data Selector** to insert **19. Opportunity description**. 3. In the third line, paste the following text: ```text theme={null} Would you like to open a Jira ticket to investigate it? ``` Here's what the **Configure** tab in this step's properties pane should look like so far: Slack step configuration - part 1 The properties pane, however, contains more settings to configure. In the **Action Buttons** section, under **#1**: 1. In the **Button text** field, paste the following: ```text theme={null} :ticket: Open a Jira ticket ``` 2. For **Button color**, keep **Green** selected. 3. Enable **Add confirmation popup**. 4. In **Confirmation popup text**, paste the following instead of the placeholder: ```text theme={null} Are you sure you want to create a new Jira ticket? ``` In the **Action Buttons** section, under **#2**: 1. In the **Button text** field, paste the following: ```text theme={null} :zzz: Snooze for 7 days ``` 2. For **Button color**, select **Transparent**. In the **Action Buttons** section, under **#3**: 1. In the **Button text** field, paste the following: ```text theme={null} :no_entry_sign: Dismiss ``` 2. For **Button color**, select **Red**. 3. Enable **Add confirmation popup**. 4. In **Confirmation popup text**, paste the following instead of the placeholder: ```text theme={null} Are you sure you want to dismiss this opportunity? ``` Finally, set **Wait Timeout in Days** to `1`. Here's what the rest of the **Configure** tab in this step's properties pane should now look like: Slack step configuration - part 2 Slack step configuration - part 3 Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output will be a lengthy JSON representing a Slack request. More importantly, since all entries in the project-owner mapping table currently contain your email address, you should now receive a Slack notification as a direct message in your Slack workspace: According to the configuration that you've just set up, the notification contains three action buttons. If you click any of them now, nothing will happen. To change this, you'll need a step that handles the project owner's response. ### Handle project owner's response with a split Click **+** to add a new step. In the pop-up menu, select **Split** in the left pane, then click **Split** in the right pane. Rename the default branch (**Branch 1**) to **Jira**. Rename the second branch (**Branch 2**) to **Snooze**. In the **Where** section of this branch: 1. In the left field, use **Data Selector** to expand **21. Request Action**, then click **Insert** alongside the **action** entry. 2. In the dropdown, select **(Text) Contains**. 3. In the right field, enter `Snooze`. Rename the third branch (**Branch 3**) to **Dismiss**. In the **Where** section of this branch: 1. In the left field, use **Data Selector** to expand **21. Request Action**, then click **Insert** alongside the **action** entry. 2. In the dropdown, select **(Text) Contains**. 3. In the right field, enter `Dismiss`. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured split step to handle the project owner's action Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. ### Create a Jira issue Let's now add the steps that the workflow should take if the project owner clicks the **Open a Jira ticket** button. There will be three of them: 1. Actually creating a Jira issue. 2. Updating the recommendation in the *Opportunities* table by setting it to *Approved* status. 3. Sending a confirmation on Slack. #### Create a new issue in Jira Cloud In the **Jira** branch, click **+** to add a new step. In the pop-up menu, select **Jira Cloud** in the left pane, then click **Create Issue** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Create Jira issue to investigate opportunity*. In the **Connection** dropdown, select the Jira connection you created earlier. In the **Project** dropdown, select a project in your Jira Cloud instance that you want to create issues in. In the **Issue Type** dropdown, select **Task**. In the **Summary** field, type in "\[Investigate EC2 Rightsizing Opportunity]". Add a space, and use **Data Selector** to expand **3. For each recommendation**, then **item**, then **node**, then **targetAsset**. Click **Insert** alongside the **awsInstanceId** entry: In the **Description** field, use **Data Selector** to insert **19. Opportunity description**. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to create a Jira issue Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output will contain the ID, key, and URLs of the newly created Jira issue: ```json theme={null} { "id": "13706", "key": "EO-95", "self": "https://openops.atlassian.net/rest/api/3/issue/13706", "htmlUrl": "https://openops.atlassian.net//browse/EO-95" } ``` Navigate to the `htmlUrl` to see the issue in your Jira Cloud instance: Jira issue in Jira Cloud #### Update recommendation status Since the project owner has selected to raise a Jira issue for the CloudHealth recommendation, it means further work on addressing the recommendation will be performed in Jira, and there's no need for your workflow to notify the project owner about it in subsequent runs. To make this happen, you'll need to update the status of the current recommendation in the *Opportunities* table. In the **Jira** branch, click **+** to add a new step. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Add or Update Record** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Set to Approved*. In the **Table** field, select **Opportunities**. In the **Primary Key Value** field, use **Data Selector** to select **20. Get table record ID from storage**. In the **Fields to update** section, click **Add Item**. In the new area: * For **Field name**, select **Status**. * For **Status**, select **Approved**. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to set the recommendation status to Approved Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output is a JSON object with details of the updated record in the *Opportunities* table: ```json theme={null} { "id": 49, "order": "2.00000000000000000000", "ID": "43bd78d2-18d9-4908-b035-c854364a19bd", "Status": { "id": 8, "value": "Approved", "color": "dark-green" }, ... } ``` #### Send a Slack confirmation Lastly, after creating a Jira issue, it makes sense to notify the project owner about it and provide a link to the issue. In the **Jira** branch, click **+** to add a new step. In the pop-up menu, select **Slack** in the left pane, then click **Send Message** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Send confirmation on Slack*. In the **Connection** dropdown, select the Slack connection that you created earlier. Alongside the **Recipient Channel or User** field, click **Dynamic**. Then use **Data Selector** to expand **17. Get owner by project**, then **items**, then **items\[1]**. Click **Insert** alongside the **Owner email** entry. Scroll down to the **Message** field. There, type in "✅ Issue created successfully: ", then use **Data Selector** to expand **23. Create Jira issue to investigate opportunity**, and click **Insert** alongside the **htmlUrl** entry. Here's what the **Configure** tab in this step's properties pane should look like so far: Slack notification step Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output will be a lengthy JSON representing a Slack request. More importantly, you should receive a Slack notification with a link to the new Jira issue: A Slack notification with a link to the Jira issue ### Snooze the recommendation Let's now handle the project owner's choice to snooze the recommendation for 7 days. To do this, you need two steps: 1. One that determines the date until which the recommendation should be snoozed. 2. One that updates the status of the recommendation in the *Opportunities* table. #### Determine the snooze date In the **Snooze** branch, click **+** to add a new step. In the pop-up menu, select **Date Operations** in the left pane, then click **Add/Subtract Time** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Date a week from now*. In the **Input Date** field, use **Data Selector** to select **12. Get Current Date**. In the **Expression** field, type in `+ 7 day`. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to determine the snooze date Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output is the date until which the recommendation should be snoozed. #### Update recommendation status In the **Snooze** branch, click **+** to add a new step. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Add or Update Record** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Snooze for a week*. In the **Table** field, select **Opportunities**. In the **Primary Key Value** field, use **Data Selector** to select **20. Get table record ID from storage**. In the **Fields to update** section, click **Add Item**. In the new area: * For **Field name**, select **Status**. * For **Status**, select **Snoozed**. Click **Add Item** once more. In the new area: * For **Field name**, select **Snooze until**. * For **Snooze Until**, use **Data Selector** to select **26. Date a week from now**. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to set the recommendation status to Snoozed Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output is a JSON object with details of the updated record in the *Opportunities* table, including the snooze date: ```json theme={null} { "id": 49, "order": "2.00000000000000000000", "ID": "43bd78d2-18d9-4908-b035-c854364a19bd", "Status": { "id": 7, "value": "Snoozed", "color": "yellow" }, ... "Snoozed until": "2025-10-01T00:00:00Z", ... } ``` The project owner will not be notified about this CloudHealth recommendation until the snooze date passes. ### Dismiss the recommendation Finally, if the project owner chooses to dismiss the CloudHealth recommendation, you need to update the status of the current recommendation in the *Opportunities* table to make sure that OpenOps does not send any further notifications about it. In the **Dismiss** branch, click **+** to add a new step. In the pop-up menu, select **OpenOps Tables** in the left pane, then click **Add or Update Record** in the right pane. At the top of the new step's properties pane, click **Edit Step Name** and rename the step *Set to Dismissed*. In the **Table** field, select **Opportunities**. In the **Primary Key Value** field, use **Data Selector** to select **20. Get table record ID from storage**. In the **Fields to update** section, click **Add Item**. In the new area: * For **Field name**, select **Status**. * For **Status**, select **Dismissed**. Here's what the new step in the workflow graph and the **Configure** tab in its properties pane should now look like: A configured step to set the recommendation status to Dismissed Click the **Test** tab in the properties pane, then under **Step output**, click **Test Step**. The output is a JSON object with details of the updated record in the *Opportunities* table: ```json theme={null} { "id": 49, "order": "2.00000000000000000000", "ID": "43bd78d2-18d9-4908-b035-c854364a19bd", "Status": { "id": 6, "value": "Dismissed", "color": "darker-red" }, ... } ``` ## Finishing touches The rightsizing workflow now contains all the steps that you need for OpenOps to get current CloudHealth recommendations, determine if each of them needs to be addressed, and notify the relevant project owners about them. ### Increase the limit on recommendations Remember that when configuring the step to fetch CloudHealth recommendations, you set the limit to 3? This was just fine for testing purposes, but now that you're ready to start running the workflow in real-world conditions, you may want to increase the limit. To do this, scroll the workflow graph up to step **2. Get EC2 rightsizing recommendations**, and in the **Configure** tab, either set the **Limit** field to a higher value, such as `10`, or remove the value altogether to fetch all available recommendations. ### Publish the workflow To get the workflow live, click **Publish** in the top-right corner of the workflow editor. Now, if you click **Workflows** in the left pane, you should see the workflow you just created, along with the project-owner mapping workflow, both in the *On* status: Your workflows in the Workflows list Whenever the two workflows execute, the runs will be logged in the **Runs** view that you can access from the left pane. ### Update the project-owner mapping table with real owner emails Click **Tables** in the left-side menu. In the list of tables under **OpenOps Dataset**, click **CloudHealth project-owner mapping**. Since both the project-owner mapping and rightsizing workflows are now ready, you can now update the table with real project owner emails. Make sure to enter the emails that the project owners use in your Slack installation. # CloudZero Source: https://docs.openops.com/integrations/cloudzero An overview of how CloudZero can be integrated with OpenOps OpenOps integrates with [CloudZero](https://www.cloudzero.com/) to automate the exchange of cost data and insights between CloudZero and your workflows. ## Actions OpenOps provides one [action](/workflow-management/actions) for interacting with CloudZero: The CloudZero action is based on the [CloudZero API](https://docs.cloudzero.com/reference/introduction) and requires configuring a CloudZero [connection](/cloud-access/access-levels-permissions) with an API key. API keys are created in CloudZero under **Settings** > **API Keys**, and each key is only displayed once after creation. The following section describes the action available in the CloudZero block. ### Custom API Call Allows making arbitrary calls to any [CloudZero API](https://docs.cloudzero.com/reference/introduction) endpoint: * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical CloudZero workflow detects an optimization opportunity using OpenOps actions for the [cloud platforms OpenOps supports](/cloud-access/supported-cloud-providers), and then records the finding in CloudZero so that it appears alongside the rest of your cost data. For example, a scheduled workflow can read the list of development accounts from an OpenOps table, look for resources that match a rule specific to your organization, call the [Create Insight](https://docs.cloudzero.com/reference/createinsight) endpoint through *Custom API Call* for each finding, and notify the relevant team in Slack with a link to the new insight. Because the block exposes the API through *Custom API Call*, any endpoint in the [CloudZero API reference](https://docs.cloudzero.com/reference/introduction) can be used in the same way, including reading cost data to decide which team to notify. For an example of driving a workflow from an OpenOps table, see [Creating a workflow to fill the project-owner mapping table](/integrations/cloudhealth#creating-a-workflow-to-fill-the-project-owner-mapping-table) in the CloudHealth guide. For the patterns behind owner mapping and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # Finout Source: https://docs.openops.com/integrations/finout An overview of how Finout can be integrated with OpenOps OpenOps integrates with [Finout](https://www.finout.io/) to automate cost allocation with virtual tags and the retrieval of cost data and CostGuard recommendations. ## Actions OpenOps provides five [actions](/workflow-management/actions) for interacting with Finout: All Finout actions are based on the [Finout API](https://docs.finout.io/configuration/finout-api) and require configuring a Finout [connection](/cloud-access/access-levels-permissions) with your Finout client ID and secret key. See [Generate an API token](https://docs.finout.io/configuration/finout-api/generate-an-api-token) in the Finout documentation for how to obtain them. The following sections describe the five actions available in the Finout block. ### Get View Data Retrieves the cost data of a saved Finout view: * **View**: Dynamic dropdown of the views available in your Finout account Below is an example of the output returned by this step for a view grouped by a single dimension, based on the example response in the [Finout API reference](https://docs.finout.io/api/finout-api/finout-api-v1/cost-api-v1). The step returns the view ID and one entry per group, without the *Total* entry: ```json theme={null} { "id": "b17c9716-31dc-4520-adf8-6d9cd7c00776", "data": [ { "name": "pci-log-aggregator-service", "dateRange": { "from": 1719792000000, "to": 1719878400000 }, "data": [ { "time": 1719792000000, "cost": 0 }, { "time": 1719878400000, "cost": 5.058602781953021e-06 } ] }, { "name": "N/A", "dateRange": { "from": 1719792000000, "to": 1719878400000 }, "data": [ { "time": 1719792000000, "cost": 31755.53133870504 }, { "time": 1719878400000, "cost": 31044.301095328592 } ] } ] } ``` ### Get Virtual Tag Values Retrieves virtual tags together with their possible values: * **Virtual Tags**: Dynamic multi-select of virtual tags to retrieve. Leave empty to retrieve all virtual tags ### Add Value to Virtual Tag Filter Adds a value to the filter of an existing virtual tag rule, for example to map a cloud account to a team: * **Virtual Tag**: Dynamic dropdown of the virtual tags in your Finout account * **Tag Filter**: Dynamic dropdown of the values defined for the selected virtual tag * **Value to Add**: The value to add to the selected filter ### Get CostGuard Recommendations Retrieves the recommendations produced by a CostGuard scan: * **Scan**: Dynamic dropdown of the CostGuard scans configured in your Finout account ### Custom API Call Allows making arbitrary calls to any [Finout API](https://docs.finout.io/configuration/finout-api) endpoint: * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical Finout workflow focuses on cost allocation. Create a view in Finout that lists the accounts or resources without a team tag, retrieve it on a schedule with *Get View Data*, and retrieve the current virtual tags with *Get Virtual Tag Values* so that the list of teams stays in sync with Finout. For each untagged item, ask the FinOps owner in Slack which team it belongs to, with one button per team in *Request Action* or a Block Kit select element for a long list of teams. Once a team is chosen, *Add Value to Virtual Tag Filter* maps the item to that team, so that it is no longer returned as untagged on the next run, provided the view filters on that virtual tag. Recommendations retrieved with *Get CostGuard Recommendations* can be routed to resource owners and remediated in the same way as recommendations from other platforms. For the patterns behind approval requests and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # Flexera Source: https://docs.openops.com/integrations/flexera An overview of how Flexera One can be integrated with OpenOps OpenOps integrates with [Flexera One](https://www.flexera.com/products/flexera-one) to automate the retrieval and management of cloud resource usage recommendations. ## Actions OpenOps provides three [actions](/workflow-management/actions) for interacting with Flexera One: All Flexera actions are based on the [Flexera One API](https://developer.flexera.com/) and require configuring a Flexera One [connection](/cloud-access/access-levels-permissions), where you need to specify your app region, refresh token, organization ID, and project ID. The following sections describe the three actions available in the Flexera block. ### Get Active Recommendations Retrieves active cost optimization recommendations from Flexera: * **Policy Set**: Dynamic dropdown of available policy sets from your Flexera account * **Filter by Provider**: Optional filter by cloud provider (AWS, Azure, Google, or Alibaba) Below is a sample output returned by this step when it is configured to request active Azure recommendations for the "Unused Volumes" policy set: ```json theme={null} [ { "id": "65ef1f6a2f831bae8d05dfcd-0", "kind": "optima#recommendation", "tags": [ "environment=dev", "app=inventoryManagement" ], "type": "Usage Reduction", "region": "westus2", "status": "active", "vendor": "Azure", "details": { "ID": "/subscriptions/f048a88c-9bc9-43cf-a30d-f48c94708866/resourceGroups/wideblueberry/providers/Microsoft.Compute/disks/zealouskiwi", "Tags": "environment=dev, app=inventoryManagement", "State": "Unattached", "Region": "westus2", "Service": "Microsoft.Compute", "Age (Days)": 323, "Created At": "2025-10-10T09:05:17+00:00", "Resource ID": "/subscriptions/f048a88c-9bc9-43cf-a30d-f48c94708866/resourceGroups/wideblueberry/providers/Microsoft.Compute/disks/zealouskiwi", "Resource Name": "zealouskiwi", "Resource Type": "Microsoft.Compute/disks", "Attached VM ID": "/subscriptions/f048a88c-9bc9-43cf-a30d-f48c94708866/resourceGroups/wideblueberry/providers/Microsoft.Compute/virtualMachines/flatpenguin", "Disk Size (GB)": 169, "Recommendation": "Delete unused volume zealouskiwi in Azure Subscription transparentjaguar (f048a88c-9bc9-43cf-a30d-f48c94708866)", "Resource Group": "wideblueberry", "Lookback Period": 30, "Subscription ID": "f048a88c-9bc9-43cf-a30d-f48c94708866", "Savings Currency": "US$", "Subscription Name": "transparentjaguar", "Estimated Monthly Savings": 296.48 }, "savings": 296.48, "service": "Microsoft.Compute", "accountID": "f048a88c-9bc9-43cf-a30d-f48c94708866", "createdAt": "2025-07-14T15:39:03Z", "policySet": "Unused Volumes", "updatedAt": "2025-07-17T14:47:19.633Z", "incidentID": "65ef1f6a2f831bae8d05dfcd", "resourceID": "/subscriptions/f048a88c-9bc9-43cf-a30d-f48c94708866/resourceGroups/wideblueberry/providers/Microsoft.Compute/disks/zealouskiwi", "accountName": "transparentjaguar", "resourceType": "Microsoft.Compute/disks", "statusReason": "", "resourceGroup": "wideblueberry", "databaseEngine": "", "recommendation": "Azure Unused Volumes [Demo]", "billingCenterID": "unallocated", "billingCenterName": "Unallocated", "quantityToPurchase": 0, "customTagDimensions": { "tag_name": "", "tag_hashtag": "", "tag_k8s_app": "", "tag_project": "", "tag_purpose": "", "tag_cost_centers": "", "tag_product_line": "", "tag_business_unit": "", "tag_oracle_environment": "", "tag_itam_corporate_unit": "", "tag_kubernetes_container": "", "tag_kubernetes_controller": "", "tag_kubernetes_cluster_name": "", "tag_kubernetes_resource_name": "", "tag_kubernetes_resource_type": "", "tag_kubernetes_resource_namespace": "" }, "ruleBasedDimensions": { "rbd_tagmaps": "None", "rbd_tshirts": "None", "rbd_ai_tools": "None", "rbd_bill_split": "None", "rbd_cost_owner": "None", "rbd_department": "None", "rbd_production": "None", "rbd_application": "None", "rbd_cost_center": "None", "rbd_environment": "None", "rbd_s3usagetypes": "None", "rbd_business_unit": "None", "rbd_product_owner": "None", "rbd_s3_usage_type": "None", "rbd_chargebackcode": "None", "rbd_it_dept_markup": "None", "rbd_environmenttest": "None", "rbd_sample_rbd_list": "None", "rbd_tagged_untagged": "None", "rbd_hardware_dept_markup": "None", "rbd_commitment_source_eco": "Non-Eco", "rbd_cost_center_normalized": "None", "rbd_committment_allocations": "None" } }, { "id": "65ef1f6a2f831bae8d05dfcd-1", "kind": "optima#recommendation", "tags": [ "environment=prod", "app=userManagement" ], "type": "Usage Reduction", "region": "australiaeast", "status": "active", "vendor": "Azure", "details": { "ID": "/subscriptions/1aec08f2-c15d-4c32-919c-4bab940f69f3/resourceGroups/glossytitan/providers/Microsoft.Compute/disks/opaquepluto", "Tags": "environment=prod, app=userManagement", "State": "Unattached", "Region": "australiaeast", "Service": "Microsoft.Compute", "Age (Days)": 226, "Created At": "2025-06-05T06:54:21+00:00", "Resource ID": "/subscriptions/1aec08f2-c15d-4c32-919c-4bab940f69f3/resourceGroups/glossytitan/providers/Microsoft.Compute/disks/opaquepluto", "Resource Name": "opaquepluto", "Resource Type": "Microsoft.Compute/disks", "Attached VM ID": "/subscriptions/1aec08f2-c15d-4c32-919c-4bab940f69f3/resourceGroups/glossytitan/providers/Microsoft.Compute/virtualMachines/quickeunomia", "Disk Size (GB)": 486, "Recommendation": "Delete unused volume opaquepluto in Azure Subscription circulareris (1aec08f2-c15d-4c32-919c-4bab940f69f3)", "Resource Group": "glossytitan", "Lookback Period": 30, "Subscription ID": "1aec08f2-c15d-4c32-919c-4bab940f69f3", "Savings Currency": "US$", "Subscription Name": "circulareris", "Estimated Monthly Savings": 141.74 }, "savings": 141.74, "service": "Microsoft.Compute", "accountID": "1aec08f2-c15d-4c32-919c-4bab940f69f3", "createdAt": "2025-07-14T15:39:03Z", "policySet": "Unused Volumes", "updatedAt": "2025-07-17T14:47:19.633Z", "incidentID": "65ef1f6a2f831bae8d05dfcd", "resourceID": "/subscriptions/1aec08f2-c15d-4c32-919c-4bab940f69f3/resourceGroups/glossytitan/providers/Microsoft.Compute/disks/opaquepluto", "accountName": "circulareris", "resourceType": "Microsoft.Compute/disks", "statusReason": "", "resourceGroup": "glossytitan", "databaseEngine": "", "recommendation": "Azure Unused Volumes [Demo]", "billingCenterID": "unallocated", "billingCenterName": "Unallocated", "quantityToPurchase": 0, "customTagDimensions": { "tag_name": "", "tag_hashtag": "", "tag_k8s_app": "", "tag_project": "", "tag_purpose": "", "tag_cost_centers": "", "tag_product_line": "", "tag_business_unit": "", "tag_oracle_environment": "", "tag_itam_corporate_unit": "", "tag_kubernetes_container": "", "tag_kubernetes_controller": "", "tag_kubernetes_cluster_name": "", "tag_kubernetes_resource_name": "", "tag_kubernetes_resource_type": "", "tag_kubernetes_resource_namespace": "" }, "ruleBasedDimensions": { "rbd_tagmaps": "None", "rbd_tshirts": "None", "rbd_ai_tools": "None", "rbd_bill_split": "None", "rbd_cost_owner": "None", "rbd_department": "None", "rbd_production": "None", "rbd_application": "None", "rbd_cost_center": "None", "rbd_environment": "None", "rbd_s3usagetypes": "None", "rbd_business_unit": "None", "rbd_product_owner": "None", "rbd_s3_usage_type": "None", "rbd_chargebackcode": "None", "rbd_it_dept_markup": "None", "rbd_environmenttest": "None", "rbd_sample_rbd_list": "None", "rbd_tagged_untagged": "None", "rbd_hardware_dept_markup": "None", "rbd_commitment_source_eco": "Non-Eco", "rbd_cost_center_normalized": "None", "rbd_committment_allocations": "None" } }, { "id": "65ef1f6a2f831bae8d05dfcd-2", "kind": "optima#recommendation", "tags": [ "environment=dev", "app=customerSupport", "tier=application" ], "type": "Usage Reduction", "region": "uksouth", "status": "active", "vendor": "Azure", "details": { "ID": "/subscriptions/8752afcb-f9b4-453b-b34c-cb9f3a9a0247/resourceGroups/tinycarrot/providers/Microsoft.Compute/disks/whiteoctopus", "Tags": "environment=dev, app=customerSupport, tier=application", "State": "Unattached", "Region": "uksouth", "Service": "Microsoft.Compute", "Age (Days)": 38, "Created At": "2025-02-28T11:17:17+00:00", "Resource ID": "/subscriptions/8752afcb-f9b4-453b-b34c-cb9f3a9a0247/resourceGroups/tinycarrot/providers/Microsoft.Compute/disks/whiteoctopus", "Resource Name": "whiteoctopus", "Resource Type": "Microsoft.Compute/disks", "Attached VM ID": "/subscriptions/8752afcb-f9b4-453b-b34c-cb9f3a9a0247/resourceGroups/tinycarrot/providers/Microsoft.Compute/virtualMachines/quirkyquaoar", "Disk Size (GB)": 423, "Recommendation": "Delete unused volume whiteoctopus in Azure Subscription wittysedna (8752afcb-f9b4-453b-b34c-cb9f3a9a0247)", "Resource Group": "tinycarrot", "Lookback Period": 30, "Subscription ID": "8752afcb-f9b4-453b-b34c-cb9f3a9a0247", "Savings Currency": "US$", "Subscription Name": "wittysedna", "Estimated Monthly Savings": 168.82 }, "savings": 168.82, "service": "Microsoft.Compute", "accountID": "8752afcb-f9b4-453b-b34c-cb9f3a9a0247", "createdAt": "2025-07-14T15:39:03Z", "policySet": "Unused Volumes", "updatedAt": "2025-07-17T14:47:19.633Z", "incidentID": "65ef1f6a2f831bae8d05dfcd", "resourceID": "/subscriptions/8752afcb-f9b4-453b-b34c-cb9f3a9a0247/resourceGroups/tinycarrot/providers/Microsoft.Compute/disks/whiteoctopus", "accountName": "wittysedna", "resourceType": "Microsoft.Compute/disks", "statusReason": "", "resourceGroup": "tinycarrot", "databaseEngine": "", "recommendation": "Azure Unused Volumes [Demo]", "billingCenterID": "unallocated", "billingCenterName": "Unallocated", "quantityToPurchase": 0, "customTagDimensions": { "tag_name": "", "tag_hashtag": "", "tag_k8s_app": "", "tag_project": "", "tag_purpose": "", "tag_cost_centers": "", "tag_product_line": "", "tag_business_unit": "", "tag_oracle_environment": "", "tag_itam_corporate_unit": "", "tag_kubernetes_container": "", "tag_kubernetes_controller": "", "tag_kubernetes_cluster_name": "", "tag_kubernetes_resource_name": "", "tag_kubernetes_resource_type": "", "tag_kubernetes_resource_namespace": "" }, "ruleBasedDimensions": { "rbd_tagmaps": "None", "rbd_tshirts": "None", "rbd_ai_tools": "None", "rbd_bill_split": "None", "rbd_cost_owner": "None", "rbd_department": "None", "rbd_production": "None", "rbd_application": "None", "rbd_cost_center": "None", "rbd_environment": "None", "rbd_s3usagetypes": "None", "rbd_business_unit": "None", "rbd_product_owner": "None", "rbd_s3_usage_type": "None", "rbd_chargebackcode": "None", "rbd_it_dept_markup": "None", "rbd_environmenttest": "None", "rbd_sample_rbd_list": "None", "rbd_tagged_untagged": "None", "rbd_hardware_dept_markup": "None", "rbd_commitment_source_eco": "Non-Eco", "rbd_cost_center_normalized": "None", "rbd_committment_allocations": "None" } } ] ``` ### Get Incident Retrieves details of a specific incident from Flexera: * **Incident ID**: The unique identifier of the incident to retrieve ### Custom API Call Allows making arbitrary calls to any [Flexera One API](https://developer.flexera.com/) endpoint: * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical Flexera workflow starts by collecting active recommendations using the *Get Active Recommendations* action and iterating through them. For each recommendation, the workflow determines the owner of the affected resource from the `tags` array returned with it, and asks the owner for a decision in Slack or Microsoft Teams. If the owner approves, the workflow remediates the resource using the actions available for the [cloud platforms OpenOps supports](/cloud-access/supported-cloud-providers). Decisions can be written back to Flexera with the *Custom API Call* action. For the patterns behind owner mapping, approval requests, and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # Ternary Source: https://docs.openops.com/integrations/ternary An overview of how Ternary can be integrated with OpenOps OpenOps integrates with [Ternary](https://ternary.app/) to automate the handling of cost anomalies and usage recommendations, including the creation of cases for the people who need to investigate them. ## Actions OpenOps provides eight [actions](/workflow-management/actions) for interacting with Ternary: All Ternary actions are based on the [Ternary API](https://docs.ternary.app/reference/using-the-api) and require configuring a Ternary [connection](/cloud-access/access-levels-permissions) with your API key, tenant ID, and the base URL of your Ternary instance, for example `https://core-api.eu.ternary.app`. The following sections describe the eight actions available in the Ternary block. ### Get Budgets Retrieves the budgets defined in your Ternary tenant. This action has no parameters. ### Get Anomalies Retrieves cost alerts (anomalies) from Ternary, together with the case linked to each alert, if any: * **Status**: One or more of Active (default), Investigating, Resolved, or Unresolved * **Case status**: Show all alerts (default), show only alerts without cases, or show only alerts with cases Below is an example of the output returned by this step with the default filters, based on the example response in the [Ternary API reference](https://docs.ternary.app/reference/getcostalerts). The step returns a list of anomalies; an anomaly that has a case also includes it in a `case` field: ```json theme={null} [ { "id": "LCbmauabGXZY1kYCnLvC", "tenantDocID": "nmhTDDchEhwJLe5YKbXn", "alertRuleID": "kDSLzitN7kwGSHAk8SLG", "createdAt": "2024-02-29T06:12:33.098Z", "currencyCode": "USD", "dimensions": [ { "key": "projectId", "value": "demo-prod" } ], "eventTime": "2023-06-24T00:00:00.000Z", "eventType": "ANOMALY_DETECTED", "eventValue": 400, "expectedValue": { "lowerBound": 100, "upperBound": 200 }, "customMeasureConfiguration": { "formula": "${FOCUS_SPEC_FIELD/EffectiveCost} / ${FOCUS_SPEC_FIELD/ConsumedQuantity}", "variableFilters": { "binding1": [ { "schema_field_name": "FOCUS_SPEC_FIELD/ServiceName", "operator": "equals", "values": [ "Compute" ] } ] } }, "measure": "TERNARY_CUSTOM_MEASURE/00000000-0000-0000-0000-000000000000", "status": "ACTIVE" } ] ``` ### Get Usage Recommendations Retrieves usage recommendations from Ternary. This action has no parameters. ### Get Data Integrations Retrieves the data integrations configured in your Ternary tenant. This action has no parameters. ### Get Cases Retrieves the cases in your Ternary tenant. This action has no parameters. ### Create a Case Creates a case in Ternary, for example to assign an anomaly to someone for investigation: * **Resource ID**: The ID of the Ternary resource the case is about, such as an anomaly * **Name**: Case name * **Description**: Case description * **Type**: `INVESTIGATION`, `OPTIMIZATION`, or `TASK` * **Resource type**: `BUDGET`, `COST_ALERT`, `DASHBOARD`, `RAMP_PLAN`, `RECOMMENDATION`, or `REPORT` * **Assignee IDs**: Optional dynamic multi-select of Ternary users to assign the case to * **Follower IDs**: Optional dynamic multi-select of Ternary users to add as followers * **Link case to Jira**: Whether a Jira ticket should be created for this case ### Get Users Retrieves the users of your Ternary tenant: * **Include settings**: Whether to include the tenant settings in the response ### Custom API Call Allows making arbitrary calls to any [Ternary API](https://docs.ternary.app/reference/api) endpoint: * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical Ternary workflow starts by collecting new anomalies using the *Get Anomalies* action, filtered to active alerts that do not have a case yet, then asks a person in Slack whether each anomaly should be dismissed, snoozed, or investigated. The message can include the anomaly's cost, service, and account, as well as a link to investigate it in Ternary. If the user chooses to investigate, the workflow retrieves the list of possible assignees with the *Get Users* action, asks who should own the investigation, and creates and assigns a case with the *Create a Case* action. The next run skips the anomaly because it now has a case. Recommendations retrieved with the *Get Usage Recommendations* action can be handled in the same way. For the patterns behind approval requests and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # Umbrella Source: https://docs.openops.com/integrations/umbrella An overview of how Umbrella (formerly Anodot) can be integrated with OpenOps OpenOps integrates with [Umbrella](https://umbrellacost.com/) (formerly Anodot) to automate the retrieval and management of cloud resource usage recommendations. ## Actions OpenOps provides eight [actions](/workflow-management/actions) for interacting with Umbrella: All Umbrella actions are based on the [Umbrella API](https://docs.umbrellacost.io/reference/umbrella-cost-api-overview) and require configuring an Umbrella [connection](/cloud-access/access-levels-permissions) with your Umbrella username and password. The authentication URL and API URL are prefilled with the default Umbrella endpoints and only need to be changed if your Umbrella instance uses different ones. The following sections describe the eight actions available in the Umbrella block. ### Get Recommendations Retrieves open recommendations with potential savings for the selected accounts and recommendation types: * **Accounts**: Dynamic multi-select of the Umbrella accounts available to your user * **Recommendation**: Multi-select of 85 predefined recommendation types across AWS, Azure, and GCP, such as AWS EC2 Rightsizing, AWS EBS Unattached, Azure Virtual Machine Idle, or GCP Disk Unattached * **Date filters for open recommendations**: Required creation date range (From and To) for open recommendations, in `yyyy-MM-dd` format Below is a sample output returned by this step, with account and resource identifiers replaced by placeholders. The step groups recommendations by account, so the top-level key is the name of the selected Umbrella account. The sample shows one of the recommendations returned for an account with no recommendation type filter: ```json theme={null} { "Production": [ { "recId": 48810034, "createdAt": "2026-01-12", "createdAtDateTime": "2026-01-12T00:00:00Z", "calculatedAtDateTime": "2026-10-19T07:25:53Z", "lastProcessingDate": "2026-10-18", "annualSavings": { "unblended": 4.8, "amortized": 0, "netUnblended": 0, "netAmortized": 4.8 }, "monthlySavings": { "unblended": 0.4, "amortized": 0, "netUnblended": 0, "netAmortized": 0.4 }, "annualCurrentCost": { "unblended": 4.8, "amortized": null, "netUnblended": null, "netAmortized": 4.8 }, "monthlyCurrentCost": { "unblended": 0.4, "amortized": null, "netUnblended": null, "netAmortized": 0.4 }, "age": 280, "cloudProvider": "AWS", "accountId": "123456789012", "typeId": "ebs-unattached", "typeName": "EBS Unattached", "linkedAccountId": "123456789012", "linkedAccountName": "Production", "resourceId": "vol-0123456789abcdef0", "region": "us-east-1", "service": "EBS", "category": "Unattached", "recommendedAction": "terminate", "customTags": { "createdBy": "" }, "enrichmentTags": { "division": "Technology", "company": "Company A", "region": "US", "department": "R&D" }, "businessMappingTags": { "Departments": "R&D", "Teams": "Team2", "Projects": "Project2", "Environment": "Split", "Application": "Application A" }, "starred": false, "open": true, "viewed": false, "recData": { "ebs_iops": 3000, "ebs_name": null, "environment": null, "zone_tag": "us-east-1", "ebs_type": "gp3", "detached_ebs_id": "vol-0123456789abcdef0", "resource_arn": "arn:aws:ec2:us-east-1:123456789012:volume/vol-0123456789abcdef0", "project": null, "ebs_size": 5 } } ] } ``` ### Get Recommendations (custom settings) Retrieves recommendations with the full set of filters supported by the Umbrella API: * **Accounts**: Dynamic multi-select of the Umbrella accounts available to your user * **Status**: `potential_savings`, `actual_savings`, `potential_and_actual_savings`, `excluded`, `user_actions`, or `custom` * **Custom status properties**: Shown only when Status is `custom`: Is Open, Done, and Excluded conditions, combined with a logical AND * **Date filters for open recommendations**: Required creation date range (From and To) for open recommendations, in `yyyy-MM-dd` format * **Date filters for closed and done recommendations**: Shown for every status except `potential_savings`: last update and creation date ranges with an AND or OR operator * **Filter by custom tags**, **Filter by virtual tags**, and **Filter by enrichment tags**: Optional tag filters with equal and like conditions * **Filter by type id**, **Filter by service**, **Filter by region**, **Filter by linked account id**, **Filter by instance type**, and **Filter by resource id**: Optional list filters with an exclusion condition * **Filter by annual savings**: Optional minimum annual savings * **Category id**: Optional one or more categories: Right Sizing, Commitments, Terminate, Unattached, Generation Upgrade, or Other ### Update User Status Sets the user status of a recommendation: * **Account ID**: The Umbrella account the recommendation belongs to * **Recommendation ID**: The ID of the recommendation * **Status**: Done, Undone, Include, Exclude, Star, Unstar, or Label * **Action Parameters**: Additional parameters depending on the status. For Exclude: a required **Comment** and an optional **Until Date**. For Label: **Add Labels** and **Delete Labels** as comma-separated lists ### Add Comment Adds a comment to a recommendation: * **Account ID**: The Umbrella account the recommendation belongs to * **Recommendation ID**: The ID of the recommendation * **Comment text**: The comment to add ### Update Comment Updates an existing comment of a recommendation: * **Account ID**: The Umbrella account the recommendation belongs to * **Recommendation ID**: The ID of the recommendation * **Comment ID**: The ID of the comment to update * **Comment text**: The new comment text ### Delete Comment Deletes a comment from a recommendation: * **Account ID**: The Umbrella account the recommendation belongs to * **Recommendation ID**: The ID of the recommendation * **Comment ID**: The ID of the comment to delete ### Get User Accounts Retrieves the Umbrella accounts associated with the authenticated user. This action has no parameters. ### Custom Umbrella API Action Allows making arbitrary calls to any [Umbrella API](https://docs.umbrellacost.io/reference/umbrella-cost-api-overview) endpoint: * **Account**: Dynamic dropdown of the Umbrella account to run the call against * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical Umbrella workflow starts by collecting active recommendations using the *Get Recommendations* action and iterating through them. For each recommendation, the workflow determines the owner of the affected resource from the `customTags` and `enrichmentTags` objects returned with it, and asks the owner for a decision in Slack. If the owner approves, the workflow remediates the resource using the actions available for the [cloud platforms OpenOps supports](/cloud-access/supported-cloud-providers) and marks the recommendation as done with *Update User Status*. If the owner snoozes it, the workflow excludes the recommendation until a given date using *Update User Status* with the Exclude status, and can record the reason with *Add Comment*. For the patterns behind owner mapping, approval requests, and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # Vantage Source: https://docs.openops.com/integrations/vantage An overview of how Vantage can be integrated with OpenOps OpenOps integrates with [Vantage](https://www.vantage.sh/) to automate workflows based on the cost data, recommendations, and alerts available through the Vantage API. ## Actions OpenOps provides one [action](/workflow-management/actions) for interacting with Vantage: The Vantage action is based on the [Vantage API](https://docs.vantage.sh/api) and requires configuring a Vantage [connection](/cloud-access/access-levels-permissions) with a Vantage API key. The following section describes the action available in the Vantage block. ### Custom API Call Allows making arbitrary calls to any [Vantage API](https://docs.vantage.sh/api) endpoint: * **URL**: Dynamic endpoint selection * **Method**: `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, or `HEAD` * **Headers**: Optional (authorization auto-injected) * **Query Parameters**: Optional * **Body**: Optional JSON payload ## Designing a workflow A typical Vantage workflow starts by retrieving recommendations or cost alerts from the Vantage API using the *Custom API Call* action, then asks the owner of the affected resource for a decision in Slack or Microsoft Teams: approve, snooze, archive, or open a ticket. Based on the decision, the workflow remediates the resource using the actions available for the [cloud platforms OpenOps supports](/cloud-access/supported-cloud-providers), creates a ticket, or calls another endpoint from the [Vantage API reference](https://docs.vantage.sh/api) to record the decision. For environments such as development accounts, the approval step can be skipped so that remediation runs automatically. For the patterns behind owner mapping, approval requests, and decision tracking, see [Designing Workflows with FinOps Platforms](/cookbook/designing-workflows-with-finops-platforms). # Features and Benefits Source: https://docs.openops.com/introduction/features-and-benefits Key features and benefits of OpenOps OpenOps is built for FinOps practitioners: engineers, architects, analysts and managers. It's a No-Code tool and is therefore approachable for practitioners without an extensive technical background. However, it still allows you to "drop into" code whenever you need to. Here's a rundown of the major features and benefits that OpenOps provides: * A pre-made [library of FinOps best-practice workflows](/workflow-management/workflow-templates) based on research and input from hundreds of FinOps leaders. The workflows cover various FinOps processes like cost optimization, tagging, budgeting, allocation, and reporting. * [Building workflows](/workflow-management/building-workflows) from scratch or customization of the pre-made workflows to fit your organization's needs using a No-Code workflow editor. * Out-of-the-box **integrations** with major cloud providers, FinOps platforms, task and project managers, and other relevant tools. These include: * **Managed databases**: Amazon RDS, Azure SQL, Google Cloud SQL, Cloud Firestore. * **Buckets and storage**: Amazon S3, Azure Blob Storage, Google Cloud Storage. * **Data warehouses and analytics platforms**: Snowflake, Databricks, BigQuery. * **Cloud cost and optimization tools**: Archera, AWS Compute Optimizer, Azure Advisor, CloudFix, CloudHealth, Cloudability, CloudZero, Finout, Flexera, Flexera Spot, Hyperglance, Kion, nOps, Pelanor, Ternary, Umbrella, Vantage, Vega Cloud. * **Communications**: Slack, Microsoft Teams, Microsoft Outlook, SMTP. * **Task and project management tools**: Jira Cloud, Monday.com, Linear, ServiceNow, Zendesk. * **Version control and IaC**: GitHub, Terraform, AWS CloudFormation, Azure Resource Manager. * [AI assistance](/ai-assistance/overview/) to send prompts as workflow steps, and help generate CLI commands, SQL queries, and custom code. You can use an LLM provider of your choice: OpenAI, Anthropic, Perplexity, and many others are supported. * Test runs on every step of workflow editing, [workflow version control](/workflow-management/workflow-version-history-lifecycle), and detailed [traceability](/workflow-management/investigate-workflow-run) of every workflow run to make sure that your workflow definitions and runs are reliable. * [Human-in-the-Loop](/workflow-management/human-in-the-loop) mechanisms to enforce control over critical optimizations. Before running deletions or scale-downs, you can make sure to get oversight and approval from stakeholders using notifications with quick action buttons. * [Tables](/reporting-analytics) to log opportunities and anomalies in a central location, with options to approve, dismiss, mark as false positive, or snooze. You can also use tables to process billing data, map resources to owners, or generate spend reports. * [Analytics](/reporting-analytics/data-visualization) to build charts and dashboards based on data in OpenOps tables or your existing data sources, such as CSV files, Google Sheets, Postgres databases, and more. # OpenOps Overview Source: https://docs.openops.com/introduction/overview What is OpenOps, exactly? OpenOps Platform OpenOps is a No-Code FinOps automation platform. It provides customizable **workflows to automate various FinOps processes**, such as cost optimization, budgeting, forecasting, allocation, and tagging. At the same time, OpenOps **enables collaboration** of FinOps teams with stakeholders like engineers, DevOps, finance and leadership. It is designed to reduce operational overhead while adapting to complex organizational tooling, business processes, and policies. OpenOps **integrates** with public cloud providers, third-party FinOps visibility tools, and a wide range of other tools such as collaboration and ticketing services, telemetry systems, and databases. It also offers **AI assistance** powered by the LLMs you trust to help you build workflows and automate tasks. OpenOps is available both as a paid managed service and as a free distribution that you can [deploy on premises](/getting-started/system-requirements). ## Why OpenOps? OpenOps addresses typical **challenges for FinOps practitioners**: 1. Visibility in cloud environments isn't enough. Automation is necessary to ensure end-to-end action and adherence to organizational policies. 2. Automating with internal tools is often inefficient and unsustainable. 3. Automating with off-the-shelf tools lacks flexibility. While traditional FinOps **visibility tools** are great at surfacing optimization opportunities, they: * Don't facilitate collaboration between stakeholders in the engineering organization. * Don't help decide if a flagged resource is actually wasteful or is in fact mission-critical. * Don't allow implementing opportunities with confidence. As a result, visibility tools tend to generate false positives and introduce noise. FinOps practitioners find themselves struggling to engage engineers, often facing organizational resistance. Existing off-the-shelf **automation tools** are way more sustainable and scalable than custom-built automations, but they often lack flexibility when it comes to tailoring automations to the needs of a specific organization. **OpenOps aims to hit the sweet spot** by being an integrated tool that: * Consolidates optimization opportunities from native and third-party FinOps visibility tools. * Knows and suggests ways to apply optimizations. * Enables easily customizing pre-made optimizations and authoring your own. * Keeps humans in the loop when deciding which optimizations should be applied. [Learn more about features and benefits of OpenOps](/introduction/features-and-benefits). # Customer Workspaces Source: https://docs.openops.com/paid/customer-workspaces Organize and manage work in separate, isolated environments **Customer workspaces** is an Enterprise edition feature. See [pricing](https://www.openops.com/pricing/) for details. Customer workspaces allow you to organize work in separate, isolated environments. Each workspace contains its own workflows, connections, and tables. This enables organizations to separate different projects, clients, or departments while maintaining clear boundaries between them. Workspace Management Page In larger organizations, workspaces help teams organize their work by business unit, environment (dev/staging/production), or client. Central teams can create workspaces for different departments, each with its own workflows and data. For managed service providers (MSPs), customer workspaces are essential for maintaining strict separation between client data and workflows, ensuring each client's work remains isolated and secure. ## Accessing Workspaces Every user automatically gets a default workspace. You can access workspaces through the **workspace switcher** in the top navigation bar. Workspace Switcher You can also navigate to the **Workspaces Management** page to view all workspaces in a table, create new ones, and manage existing workspaces. ## Creating a New Workspace To create a new workspace: 1. Navigate to the **Workspaces Management** page 2. Click the **"Add new"** button 3. Enter a unique workspace name (at least 1 character) 4. Click **"Confirm"** Workspace Switcher You will automatically become the owner and be switched to the new workspace. The system creates a dedicated database and authentication tokens for the workspace. ## Switching Between Workspaces You can switch workspaces by: * Clicking the workspace name in the top navigation bar and selecting a workspace from the dropdown * Clicking the **"Switch"** button next to a workspace in the Workspaces Management page The current workspace is marked with a checkmark (✓). The application reloads when switching workspaces to ensure all data and resources are properly loaded for the selected workspace. ## Managing Workspaces ### Workspace Information The Workspaces Management page displays for each workspace: * Workspace name * Number of active workflows * Ownership status (only owners see the action menu) ### Renaming a Workspace Only workspace owners can rename workspaces: 1. In the Workspaces Management page, click the three-dot menu (⋯) on the workspace row 2. Select **"Rename"** 3. Enter a new unique name 4. Click **"Update"** Renaming workspace ### Default Workspace Every user has a default workspace (initially named "\[Your Name]'s Workspace") that is automatically created. Default workspaces appear first in lists and are marked with a users icon in the workspace switcher. ## Workspace Ownership and Members ### Ownership The user who creates a workspace becomes its owner. Owners can rename the workspace and manage members. ### Member Management Workspace members can switch to and work within any workspace they have access to. You can manage members and switch workspaces programmatically using the REST API. ### Roles Workspaces support the following roles: **ADMIN**, **EDITOR**, **OPERATOR**, and **VIEWER**. Role-based permission enforcement is currently being implemented; the primary authorization check is ownership-based. ### Master Project Workspace Each organization has one designated **Master Project** workspace that provides access to special organization-wide features. You must switch to the master project workspace to access these features. New users are not assigned to the master project by default. They must be granted access and switch to it manually. #### Analytics Access **OpenOps Analytics** is only accessible when switched to the master project workspace. All users who have access to the master project can view analytics, regardless of their role. #### Organization Template Catalog Management Only organization **admins** in the master project workspace can create, edit, delete, and publish private templates to the organization catalog (requires private template editor feature to be enabled). ## Searching Workspaces Use the search bar in the workspace switcher or the Workspaces Management page to filter workspaces by name. Search is case-insensitive and matches partial names. Searching in Workspace Switcher # Organization Template Catalog Source: https://docs.openops.com/paid/organization-template-catalog How to create your company's own workflow templates **Organization template catalog** is an Enterprise edition feature. See [pricing](https://www.openops.com/pricing/) for details. Community and Professional editions include a [template catalog](/workflow-management/workflow-templates/) curated by the OpenOps team. The Enterprise edition lets you publish your own templates in a private section of the template catalog called **My Organization Templates**. My Organization Templates In larger organizations, this enables central FinOps teams to create templates that reflect corporate FinOps best practices and are aligned with organizational standards and policies. The central teams can publish them in the organization catalog, allowing business units to easily create workflows based on them. For managed service providers (MSPs), the organization template catalog helps define a standard set of templates that can be used to create workflows for customers. The Enterprise edition also includes a dedicated **Templates** view in the OpenOps main menu: Templates view in Enterprise edition ## Creating a template There are two ways to create a template: * By clicking **New template** in the top right of the **Templates** view. This opens the template editor, allowing you to create a template from scratch. * **From an existing workflow**. Click the arrow next to the workflow name in the workflow editor to open a menu that contains a **Create template** command: Clicking **Create template** duplicates the workflow as a template and opens it in the template editor. ## Editing a template The template editor mostly behaves the same way as the [workflow editor](/workflow-management/building-workflows/): you can add and remove steps, edit step properties, and test individual steps or the entire template. Editing a template There are only a few differences from the workflow editor: * At the top, there's a **Template editing** header that helps visually distinguish the template editor from the workflow editor. * The header contains a **View in Catalog** action that opens the template entry as published in the organization template catalog. * Text entered in the **Notes** pane of the template editor is used as the template summary and is displayed in the organization template catalog. * You can't move templates between folders — unlike workflows, templates always reside in the root folder. * You can't import or export templates. ## Listing a template in the organization catalog While you're editing a template, its current draft appears in the **Templates** view. When you click **Publish** in the template editor, the template becomes available in the organization template catalog. ## Delisting a template from the organization catalog If you need to delist a template from the organization catalog while keeping it in the **Templates** view, do one of the following: 1. In the template's entry in the **Templates** view, toggle the switch in the **Visible in catalog** column. 2. In the template editor, toggle the switch next to the **Publish** button. # Role-Based Access Control Source: https://docs.openops.com/paid/role-based-access-control Manage user permissions with workspace and organization roles **Role-Based Access Control (RBAC)** is an Enterprise edition feature. See [pricing](https://www.openops.com/pricing/) for details. OpenOps Enterprise edition includes role-based access control to manage what users can do within workspaces and across the organization. Permissions are assigned through roles at two levels: **workspace roles** and **organization roles**. ## Workspace Roles Workspace owners or admins can assign a specific role to a user in a particular workspace. * **Viewer** — Can view workflows, runs, connections, and templates within the workspace. * **Contributor** — Everything a Viewer can do, plus create, edit, delete, and test workflows, manage connections, and manage folders and templates. * **Workspace Owner** — Everything a Contributor can do, plus manage workspace members and workspace settings, and publish or delete templates. * **Admin** — Organization admins who join a workspace receive the same permissions as Workspace Owners. ## Organization Roles Organization roles control permissions that apply across the entire organization, outside of any specific workspace. * **Member** — Can manage integrations and view templates. * **Admin** — Everything a Member can do, plus manage users, create workspaces, and assign members to workspaces. Custom roles are available on request. Contact your OpenOps account manager to discuss your requirements. # OpenOps Slack App Source: https://docs.openops.com/paid/slack-app Use the OpenOps AI Agent from Slack **OpenOps Slack App** is an Enterprise edition feature. See [pricing](https://www.openops.com/pricing/) for details. The OpenOps Slack App lets you interact with OpenOps AI from Slack. Ask about workflows, runs, connections, and FinOps in natural language without leaving your team's workspace. The app can help you with: * **Workflows**: Check what workflows are running, understand how they're built, see what [actions](/workflow-management/actions/) they use, and get help creating or modifying workflows. * **Workflow runs**: Investigate run status, view history, troubleshoot failures, and understand execution details. * **FinOps insights**: Ask questions about cloud costs, optimization opportunities, and FinOps best practices. To talk to the app from your Slack, you only need to do two things: **connect Slack to OpenOps** from the OpenOps integration page, then **chat with the app**. ## Prerequisites * An active OpenOps account with access to at least one [environment](/getting-started/quick-start-guide/). * A Slack workspace where the OpenOps app is available. * Your Slack account linked to OpenOps (see below). ## Connecting Slack to OpenOps Before you can use the app in Slack, link your Slack account to OpenOps: Connect Slack from OpenOps 1. Log in to your OpenOps dashboard. 2. Go to **Settings → Integrations**. 3. Click **Connect to Slack**. 4. Complete the authorization in the Slack popup. **First-time workspace installation:** If this is the first time the OpenOps app is being installed to your Slack workspace, Slack may require approval from your workspace administrator. If you see a message requesting admin approval, you can close the popup. Once your administrator approves the installation, return to OpenOps and click **Connect to Slack** again using the same steps above. Once connected, you can use the app from Slack. ## Using the app in Slack Using the OpenOps app in Slack You can interact with the OpenOps app in two primary ways, plus several other methods for different scenarios. ### 1. Chat in split view To work in Slack and interact with the app simultaneously, start a chat that opens on the right-hand side of Slack on desktop or in a browser. 1. From your desktop, click the OpenOps agent or assistant icon in the top right-hand corner of Slack. If there are multiple agents or assistants available, click the **down arrow** to choose the OpenOps app. 2. Send a message to get started. 3. To view your message history, click the **clock icon**. **Your first conversation:** First conversation in split view The first time you start a chat in split view: 1. **Environment** – If you have access to more than one environment, the app asks you to choose one. With a single environment, this step is skipped. 2. **Project** – Next, you choose a project. Again, this is skipped if you only have one. 3. **Response** – The app confirms and then streams its response in real time. ### 2. Chat from the app's Home tab You can also start a conversation with the app from the OpenOps app's Home tab. 1. From your desktop, click **Tools** in the sidebar. If you don't see this option, click **More** to find it. 2. Click **Apps**, then search for and select the OpenOps App. 3. A side pane opens with the app's information. Click **Open app**. 4. Click **New chat** in the top right-hand corner, or click the **Chat tab** to resume a conversation. 5. To view your chat history, click on the **History tab**. ### Other ways to interact #### @Mention in channels Mention the app in any channel where it's installed to start a conversation that everyone in the channel can see. Useful when several people need the same information. Example: ``` @OpenOps App What workflows are currently running? ``` **Thread ownership:** Once you start a conversation by @mentioning the app, the thread is bound to your account. Other users cannot reply in that thread—they'll need to start their own thread with a new @mention to interact with the app. You can continue the conversation by replying in the same thread, and the app will maintain context throughout. #### "Ask OpenOps Agent" shortcut Ask OpenOps Agent shortcut You can send an existing thread to the OpenOps agent for analysis: 1. Right-click (or click the three dots **...**) on a message in the thread. 2. Choose **Shortcuts** → **Ask OpenOps Agent**. 3. In the modal, enter your question about the conversation. 4. Click **Ask**. ## Slash commands Slash command example The app supports slash commands for environment and channel defaults. Responses are **ephemeral** (only you see them). | Command | Purpose | | - | - | | `/openops-list-environments` | List OpenOps environments linked to your Slack account. | | `/openops-set-default` | Set the default environment and project for the current channel. | | `/openops-show-default` | Show the channel's default environment and project. | | `/openops-clear-default` | Clear the channel default. | Type the command in the message box in a channel where the app is installed. ## Channel defaults Channel defaults set a shared environment and project for a channel so the app doesn't ask every time. **Why use them** * Fewer steps: no environment/project selection for each new conversation. * Everyone in the channel uses the same environment. * Reduces mistakes from picking the wrong environment. **How to set them** 1. Open the channel. 2. Run `/openops-set-default`. 3. Pick the environment and default project. New conversations in that channel will use these defaults. Existing threads keep the environment and project they started with. ## Stopping app streaming While the app is streaming a reply, a **Stop** button is shown. Click it to stop the response. # SSO Authentication Source: https://docs.openops.com/paid/sso-authentication How to enable SSO Authentication in your environment **Single Sign-On (SSO)** is an Enterprise edition feature. See [pricing](https://www.openops.com/pricing/) for details. Community and Professional editions include a basic authentication system. The Enterprise edition lets you integrate OpenOps platform with your identity provider using SAML or OIDC. SSO Sign-in page In larger organizations, this enables centralized identity and access management, allowing IT and security teams to enforce authentication policies, manage user access through existing identity providers, and streamline onboarding and offboarding. ## Enable SSO for your environment OpenOps supports Single Sign-On (SSO) through two authentication methods: * **SAML** * **OIDC (OpenID Connect)** To learn more or to enable SSO for your environment, please contact your OpenOps account manager. # Subagents Source: https://docs.openops.com/paid/subagents AI-powered agents that investigate and analyze your workflows **Subagents** is an Enterprise edition feature. See [pricing](https://www.openops.com/pricing/) for details. Subagents are specialized AI agents that run in isolated environments to handle complex, long-running analysis tasks on your behalf. Unlike the general-purpose AI assistant, each subagent is purpose-built for a specific domain and can work through large amounts of data autonomously before returning a structured result. Subagent Page ## Investigation subagent The first available subagent is the **Investigation** agent. It analyzes workflow execution data to help you understand why a workflow run failed, behaved unexpectedly, or performed poorly. The investigation subagent can help you: * **Diagnose failures** — identify which step failed, why it failed, and what the error means. * **Trace unexpected behavior** — follow data through each step to explain why a workflow produced an unexpected result. * **Spot performance issues** — find bottlenecks or steps that took longer than expected. After completing its analysis, the agent streams a structured report with findings, and a root cause assessment. ## Using the investigation subagent The investigation subagent is available as a tool inside the OpenOps AI chat interface. To start an investigation: 1. Open the AI chat in your OpenOps environment. 2. Describe the issue you want to investigate — for example: *"Why did this workflow fail?"* or *"The last run produced unexpected output in the final step, can you check what happened?"* 3. Provide the **workflow run ID** you want to analyze. 4. The agent runs in the background and streams progress updates as it works. When complete, it returns its findings directly in the chat. ## How it works Subagents run in isolation from the rest of your environment, with no persistent storage and no access to external systems beyond the data they are given. ## Enabling subagents for your environment To learn more or to enable subagents for your environment, contact your OpenOps account manager. # Analytics Source: https://docs.openops.com/reporting-analytics/analytics How to create and use charts and dashboards in OpenOps Analytics You can visualize data that you collect with [OpenOps tables](/reporting-analytics/tables/) and display the visualizations in the **Analytics** view in OpenOps. In addition to OpenOps tables, OpenOps Analytics can connect to and visualize your existing data sources, such as CSV files, Google Sheets, Postgres databases, and more. The analytics service is optional. You can disable it by setting `OPS_ANALYTICS_ENABLED` variable to `false` in your `.env` file if you don't need analytics functionality. ## Analytics admin portal To configure data visualizations, click **Analytics** on the main navigation bar in OpenOps. When the **Analytics** view opens, click **Admin Panel** to proceed to the Analytics admin portal that is separate from the main OpenOps application. To sign in to the Analytics portal, use `admin` as the username and the password defined with the `OPS_ANALYTICS_ADMIN_PASSWORD` variable in the `.env` file in your OpenOps installation folder. (If you haven’t changed the password, the default is `please-change-this-password-1`.) If you don't have access to the OpenOps installation folder: * Contact your OpenOps instance administrator if you're using a self-managed OpenOps instance. * [Contact OpenOps support](mailto:support@openops.com) if you're using an OpenOps-hosted instance. Once you log in, you can see a built-in dashboard called **FinOps**. Modifying this dashboard will affect the **Analytics** tab in OpenOps. Built-in dashboards in the analytics portal Behind every OpenOps table, there is a Postgres database view that can be used to build charts and queries. When a new table is created in [OpenOps tables](/reporting-analytics/tables/), the system automatically creates a new database view with the naming convention *table name \_ table id \_ userfriendly*. You can use this view to create dashboards in OpenOps, as well as connect it to other BI systems. ## Building new charts To configure a new chart based on an OpenOps table to display in the **Analytics** view in OpenOps, do the following: 1. Navigate to **Datasets** and click **+ Dataset**: Creating a dataset 2. Select `openops_tables_connection` for **Database** and `public` for **Schema**. In the **Table** dropdown, select a Postgres DB view corresponding to the OpenOps table you want to source data from. For example, here is what a view may be named for the *Opportunities* table: 3. Click **Create dataset and create chart**. 4. In the **Create a new chart** view, select a chart type, then click **Create new chart**: Selecting a chart type 5. Configure your chart. Refer to [this Superset documentation page](https://superset.apache.org/docs/using-superset/creating-your-first-dashboard#creating-charts-in-explore-view) if you need help. To preview the configured chart, click **Create chart** in the right pane. Chart preview 6. If you make further changes to the chart, click **Update chart** to refresh the preview. 7. When you're done, click **Save**. In the **Save chart** dialog, select **FinOps** in the **Add to dashboard** dropdown: 8. Click **Save**. When you go back to the **Analytics** view in OpenOps, you can see that the chart is now displayed there: Chart in OpenOps Analytics For more information on how to create charts, see the [Superset documentation](https://superset.apache.org/docs/intro/). ## Connecting to external data sources Here's what you can do to connect OpenOps Analytics to external data sources such as CSV files: 1. In the Analytics admin portal, in the top right corner, click **Settings**, then **Database Connections**. 2. Click **+ Database** to connect to an external data source, such as your own Postgres instance or Google Sheets. 3. Once you have created a database connection, if you’d like to upload CSVs to it, click the **Edit** icon for the database connection: Editing a database connection 4. In the popup that displays, go to **Advanced > Security**, scroll down, and enable **Allow file uploads to database**. 5. Click **Finish**. To upload CSV files into your database, click **+** in the top right corner, then select **Data > Upload CSV to database**: You can now build charts based on the data from your external data source, similar to how you do it with OpenOps tables. When you add charts to the **FinOps** dashboard, they become available in the **Analytics** view in OpenOps. ## Support Feel free to join our [Slack community](https://slack.openops.com) if you have any questions or need help with your installation. # Connecting OpenOps to External Analytics Tools Source: https://docs.openops.com/reporting-analytics/connecting-to-external-tools How to feed data from OpenOps to your existing analytics tools Many organizations use centralized BI/analytics systems and may want to include data generated by OpenOps in their existing dashboards. OpenOps stores analytics data in a PostgreSQL database. External analytics tools, such as [AWS Quick Sight](#connecting-aws-quick-sight-to-openops), [Microsoft Power BI](#connecting-microsoft-power-bi-to-openops), or [Google Looker](#connecting-google-looker-to-openops), can connect to this database. Once connected, they can query the same tables and views that power [OpenOps tables](/reporting-analytics/tables), including the *Opportunity* table. Connecting any external analytics tool to OpenOps consists of two parts. First, you need to **prepare OpenOps to accept external connections**. This usually means: * Ensuring the OpenOps PostgreSQL container is reachable from the analytics tool. * Allowing incoming connections on the PostgreSQL port (`5432`) through your cloud provider’s networking layer (security groups, VPC firewall rules, etc.). * Optionally configuring a read-only database user for analytics. Depending on your environment, connectivity may be provided through private VPC networking, VPN, or site-to-site tunnels. Second, you need to **configure your external analytics tool to connect to PostgreSQL**. This usually involves configuring the OpenOps installation's host and port, database name, authentication method, and selecting the tables or views to visualize. PostgreSQL views corresponding to OpenOps tables follow the naming pattern *table name \_ table id \_ userfriendly*. These are the views that you want to use when setting up connections in external analytics tools. A specific configuration will vary depending on the analytics tool. See the sections below detailing how to connect to OpenOps from several popular analytics products. ## Connecting AWS Quick Sight to OpenOps AWS Quick Sight is a fully managed SaaS analytics service. To connect Quick Sight to OpenOps, you must make the OpenOps PostgreSQL database reachable from your AWS account. Available networking options include: * [AWS Site-to-Site VPN](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) to your data center or VPC. * [AWS Direct Connect](https://aws.amazon.com/directconnect/). * [VPC peering](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) if OpenOps runs inside AWS. * [AWS PrivateLink](https://aws.amazon.com/privatelink/) if exposing PostgreSQL through a private endpoint. Once network access is available, you can configure Quick Sight to use the OpenOps PostgreSQL database as a data source. See also: * [Creating a data source](https://docs.aws.amazon.com/quicksuite/latest/userguide/create-a-data-source.html) * [Configuring VPC connections in Amazon Quick Sight](https://docs.aws.amazon.com/quicksuite/latest/userguide/working-with-aws-vpc.html) ## Connecting Microsoft Power BI to OpenOps Power BI has two ways to reach on-premises or private-network databases. If you're using the self-hosted **Power BI Report Server**, it can connect directly to PostgreSQL inside the same LAN/VPC as OpenOps. If you're using **Power BI Service** SaaS, it cannot directly reach internal databases. Instead, you need to use the [Microsoft On-Premises Data Gateway](https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-onprem), which should be installed on any machine that can access the OpenOps PostgreSQL port. This gateway acts as a secure bridge between Power BI's cloud service and the local PostgreSQL database. After connectivity is configured, you create a PostgreSQL data source in Power BI (via the gateway or locally) and select the relevant OpenOps tables. ## Connecting Google Looker to OpenOps Looker is available as both a fully managed SaaS product and a self-hosted deployment. Self-hosted Looker can run inside your LAN or VPC and connect directly to your OpenOps PostgreSQL database. For Looker SaaS to reach a private PostgreSQL instance, you typically use one of the following: * Whitelisting Looker's outbound IPs and exposing PostgreSQL securely to the internet (TLS, firewall restrictions). * SSH tunneling, where Looker connects through a bastion host that you manage to the PostgreSQL database. * Private connectivity in your GCP environment, if OpenOps runs in GCP. Looker can integrate with databases inside your VPC through Google-managed networking. See also: * [Enabling secure database access](https://docs.cloud.google.com/looker/docs/enabling-secure-db-access) # Tables Source: https://docs.openops.com/reporting-analytics/tables Saving data into and getting data from OpenOps Tables OpenOps includes tables, a data storage mechanism based on [Baserow](https://baserow.io/user-docs/intro-to-tables). They are a hybrid of a spreadsheet and a database: think Airtable. Here are some of the things that tables help you do: * **Sort and filter** your data: for example, only show opportunities that are not completed or dismissed. * **Group** your data: for example, show opportunities by owner. * **Import and export** data from/to CSV, JSON, or XML. * **Link to other tables**, much like relational databases. OpenOps tables are fully integrated with OpenOps workflow capabilities: there are [actions](/workflow-management/actions/) that let you create and update records in tables, as well as read data from them. Tables help you perform multiple tasks, such as: * Map **cloud resources to owners** based on tags and business units. This is an essential stage for workflows that include [human-in-the-loop](/workflow-management/human-in-the-loop/) steps. For every resource that provides cost-saving opportunities requiring human intervention, the workflow needs a way to determine who to send an approval request to. * Log **opportunities and anomalies** in a central location, with options to approve, dismiss, mark as false positive, or snooze. * Compile a list of unused or idle **resources to delete**. * Generate **spend reports** broken down by business unit, owner, or cloud service. ## Preconfigured tables OpenOps comes with multiple [workflow templates](/workflow-management/workflow-templates/), and many of them use tables to perform one or more of the tasks outlined above. All tables used in the templates come preconfigured in your workflow installation: Preconfigured tables This means that when you decide to create a workflow based on a template, you don't need to create the tables that your workflow uses: they're already available. If you’re using workflows from templates, make sure not to modify the structure of preconfigured tables to avoid breaking the workflows. Let's take a look at two tables that come preconfigured and are used in many workflow templates: **Opportunities** and **Tag-owner mapping**. ### Opportunities The preconfigured **Opportunities** table is used in multiple workflow templates to track realized and unrealized savings and to provide visibility into why savings have not yet been achieved. By default, this table has 20 fields (columns): **ID**, **Status**, **Owner**, **Estimated savings USD per month**, **Snoozed until**, **Workflow**, **Resource ID**, **Follow-up task**, **Account**, **Region**, **Service**, **Opportunity source**, **External opportunity ID**, **Opportunity type**, **Resolution notes**, **Opportunity details**, **Complexity**, **Risk**, **Creation time**, and **Last modified time**. Here's a sample of the **Opportunities** table in an active OpenOps installation: Sample Opportunities table ### Tag-owner mapping The preconfigured **Tag-owner mapping** table is used in workflow templates to retrieve emails of resource owners based on values of resource tags whose labels are specified in the workflow. This table has three fields: **Owner tag value**, **Owner email**, and **BU**. The latter connects it to another preconfigured table, **Business units**, which stores more details about each business unit. ### Example of usage in a workflow template To better understand how the two tables described above are used in real-life workflows, here's what the **Idle RDS Instances in Staging, Terraform Remediation** workflow template does with them: * For each AWS Compute Optimizer recommendation for idle RDS, it finds the value of the `unit` tag and maps that tag to an email using the **Tag-owner mapping** table. * It logs opportunity details to the **Opportunities** table with the following fields: * **Status** is set to **Created**, as this is a new opportunity. * **Estimated savings USD per month** is set to the estimate provided by AWS Compute Optimizer. * Once the owner receives a Slack message suggesting deletion of the resource, the **Status** field in the **Opportunities** table is updated with one of three values: * **Under review** if the owner approved deletion and the workflow has created a GitHub PR. * **Dismissed** if the owner has chosen to dismiss the opportunity. * **Snoozed** if the owner has chosen to consider the opportunity later. The number of days to delay is reflected in the **Snoozed until** field. ## Creating new tables In addition to preconfigured tables, you can create your own. This is especially useful when you're developing original workflows that are not based on OpenOps templates and you want to set up a visual way to save data generated by the workflows. To create a new table from scratch: 1. Go to the **Tables** tab. In the tree view on the left, click **+ New table** under the list of currently available tables in the **OpenOps Table** dataset: 2. In the **Create new table** popup, keep **Start with a new table** selected and click **Add table**: Create new table popup A new table is created with three default fields: Default table Feel free to remove the default fields and add new ones depending on your use case. When you click **+** in the table header to create a new field, you can choose from multiple field types: The first table field serves as the **row identifier**. If you intend to update rows after creating them, choose a specific type for the row identifier field — see [Creating and updating rows in tables](#creating-and-updating-rows-in-tables) below for more details. In the tree view on the left, if you click the options icon alongside your table's name, you can choose to rename, duplicate, export, or delete your table: ## Creating and updating rows in tables In some scenarios, you create rows in OpenOps tables but never need to update or delete them. In these cases, the order and type of fields in your table don't really matter. More often, however, you want to update table rows at some point after initially creating them. In this case, you need to carefully choose the type of the **row identifier** field. The row identifier field is the first field in the table. It is used to find the specific row to update and therefore must contain unique values. For example, in the built-in **Opportunities** table, the row identifier field is **ID** and has a UUID type, which guarantees that the values in this field are unique. ### Setting up the row identifier field in a new table When you create a new table, the default row identifier field, **Name**, has the type **Single line text**, which does not guarantee uniqueness of values. Here's how you can modify the row identifier field to ensure unique values: 1. Click the arrow to the right of the field name in the table header and select **Edit field**: 2. In the **Edit field** popup, change the field type to **UUID**: 3. Change the name of the field to **ID** or **Identifier** to reflect the field's new function. 4. Click **Save**. As a result, OpenOps will generate a unique identifier for each row in the table, which you can use to update the row later. ### Using the row identifier field in workflows When [building your workflows](/workflow-management/building-workflows/), you can use four table actions in your workflow steps: Two of these actions may require a unique row identifier: **Add or Update Record** and **Delete Record**. When you use the **Add or Update Record** action, its properties pane contains a field called **Primary Key Value**, which is the row identifier. If you leave it empty, the action will create a new row in your table. If you want to update an existing row, you need to provide a value for the **Primary Key Value** field. Often, a workflow contains a step that creates a new row in a table and then another step that updates the same row. In this case, you can use the output of the first step as the input for the second step. To do this, click **Primary Key Value** in the action properties of the second step to show the **Data Selector** view, then expand the output of the first step that created the row, and select the row identifier field: Specifying the ID from a previous step As a result, your second step will know to update the same row that was created in the first step. When you use the **Delete Record** action, use the same approach to specify the row identifier value. This will ensure that the action deletes the correct row in your table. # Actions Source: https://docs.openops.com/workflow-management/actions Understanding and using Actions in OpenOps workflows OpenOps provides 120+ actions: operations that you can add as steps to your workflows. When you select an action in the workflow editor, actions are grouped into blocks. By default, you see a list of all available blocks: You can also filter them to show actions that belong to a specific category, such as *Collaboration*, *Data Sources*, or *FinOps*: Below is an overview of the action blocks currently available in OpenOps. To help you navigate them more easily, they are categorized by intent in the following sections. Some action blocks appear in multiple sections if they contain actions with different intents. ## Decide These actions help control the sequence of operations in your workflow and make decisions based on inputs: * **Condition**: split the workflow into exactly two branches based on a [condition](/workflow-management/conditional-branching/). * **Split**: split the workflow into multiple branches based on a [condition](/workflow-management/conditional-branching/). * **Loop on Items**: iterates sequentially over a list. Each iteration runs independently and may finish, fail, or pause, but the loop continues with the next item. After all iterations, the loop's final state reflects the outcomes: if any iterations fail, the loop fails; if any pause, the loop pauses until they resume. Workflow-wide limits ([timeouts](/workflow-management/investigate-workflow-run#changing-the-default-timeout) or size limits) can also halt execution. * **Delay**: pause workflow execution for a specified time period or until a specific time. * **Stop Execution**: stops the execution of the current scope. When used inside a loop, this action skips to the next iteration; otherwise, it ends the entire workflow. This is useful in [conditional branching](/workflow-management/conditional-branching/) when a branch represents a condition that ends the workflow early. ## Get data These actions help you retrieve data from cloud resources, third-party services, APIs, and other sources. * Cloud provider integrations: * **AWS**: includes multiple actions related to AWS resources such as EC2, EBS, and RDS, as well as a CLI action to execute commands that are not available as dedicated actions. * **Azure**: execute Azure CLI commands, make REST API calls, query Azure Resource Graph using KQL. * **Google Cloud**: execute Google Cloud CLI commands, make REST API calls, run SQL queries on BigQuery. * Recommendation and analytics service integrations: * **[Archera](https://archera.ai/)**: retrieve available and recommended commitment plans for cloud providers. For details about this integration, see [Archera](/integrations/archera/). * **AWS Compute Optimizer**: retrieve a summary of recommendations, as well as EBS- or EC2-specific recommendations. * **Azure**: get Azure Advisor cost recommendations. * **[Cloudability](https://www.apptio.com/products/cloudability/)**: retrieve, snooze and unsnooze recommendations. For details about this integration, see [Cloudability](/integrations/cloudability/). * **[CloudFix](https://cloudfix.com/)**: get recommendations and reports, or create change requests. For details about this integration, see [CloudFix](/integrations/cloudfix/). * **[CloudHealth](https://www.vmware.com/products/app-platform/tanzu-cloudhealth)**: get recommendations, search assets and retrieve asset perspectives, or manage asset tags. For a tutorial on creating a workflow to address CloudHealth recommendations, see [CloudHealth](/integrations/cloudhealth/). * **[CloudZero](https://www.cloudzero.com/)**: make API calls to fetch telemetry, billing data, budgets, insights, and more. For details about this integration, see [CloudZero](/integrations/cloudzero/). * **[Finout](https://www.finout.io/)**: get view data and recommendations, manage virtual tags. For details about this integration, see [Finout](/integrations/finout/). * **[Flexera](https://www.flexera.com/)**: retrieve active recommendations and incidents. For details about this integration, see [Flexera](/integrations/flexera/). * **[Flexera Spot](https://spot.io/solutions/finops/)**: fetch clusters and make custom API calls. * **Google Cloud**: get recommendations from selected Google Cloud recommenders. * **[Hyperglance](https://www.hyperglance.com/)**: get recommendations, view tracked cloud resources, check the status and statistics of cloud credentials. * **[Kion](https://kion.io/)**: perform API calls to manage billing sources and cloud rules, get reports, and more. * **[nOps](https://www.nops.io/)**: get organization accounts, retrieve cost summary data, make custom REST API calls. * **[Pelanor](https://www.pelanor.io/)**: perform API calls to fetch reports, apply dimensions, monitor anomalies, and more. * **[Ternary](https://ternary.app/)**: fetch usage recommendations, retrieve budgets and anomalies, get and create cases and users. For details about this integration, see [Ternary](/integrations/ternary/). * **[Umbrella](https://umbrellacost.com/)** (formerly Anodot): get recommendations, manage comments, get user accounts, update user status. For details about this integration, see [Umbrella](/integrations/umbrella/). * **[Vantage](https://www.vantage.sh/)**: perform custom API calls. For details about this integration, see [Vantage](/integrations/vantage/). * **[Vega Cloud](https://www.vegacloud.io/)**: get anomalies, perform API calls to fetch recommendations or forecasts. * **AWS Athena**: run Athena queries. * **Snowflake**: run individual or batch Snowflake queries. * **Databricks**: run SQL queries in Databricks workspaces and trigger existing jobs. * **File operations**: create or read files in OpenOps storage. * **HTTP**: send HTTP requests to any API or respond to HTTP requests. Many actions in this category involve writing CLI commands (AWS CLI, Azure CLI, Google Cloud CLI) or SQL queries (AWS Athena, Snowflake, Databricks, BigQuery). The OpenOps workflow editor provides [AI assistance](/ai-assistance/overview/) to generate such commands and queries, making it less overwhelming for occasional and less technical users. AI assistance works [using your own API keys](/ai-assistance/llm-connections/) with an LLM provider of your choice. OpenAI, Anthropic, Perplexity, and a dozen other LLM providers are supported. ## Process data These actions allow you to apply various transformations to data received from previous workflow steps. * **List operations**: process a list (array) output from another workflow step by grouping, mapping, or extracting values. * **Date operations**: format dates, extract individual date units (year, month, day, hour, etc.), or calculate date differences. * **Math operations**: perform arithmetic operations, average numbers, find minimum and maximum values, or generate random numbers. * **Text operations**: concatenate, split, find and replace text, and convert between HTML and Markdown. * **AI Step**: enter LLM prompts with inputs from previous steps, and receive responses in structured or unstructured formats. * **Code**: execute custom code in TypeScript or JavaScript. [AI assistance](/ai-assistance/overview/) is available to help you generate and insert code for actions of this kind. ## Request human intervention These actions implement [Human-in-the-Loop](/workflow-management/human-in-the-loop/) processes: requesting approvals and sending notifications. * **Approval**: request approval with or without pausing the workflow. * **Slack**: send and update messages, request human action, and wait for user responses. * **SMTP**: send emails through a custom SMTP server. * **Jira Cloud**: update issues and issue status, create and update issue comments. * **Microsoft Teams**: send chat and channel messages. * **Monday.com**: create and update boards and board items. * **Linear**: create and update issues and comments. * **Zendesk**: create or update tickets, perform other Zendesk API calls. ## Make changes to cloud resources These are integration actions that provide various ways to make and request changes to your cloud resources via cloud provider APIs, infrastructure-as-code (IaC) tools, or pull requests. * Cloud provider integrations: * **AWS**: multiple actions related to AWS resources such as EC2, EBS, and RDS, an action to prefill AWS Systems Manager runbooks and generate execution links, as well as an AWS CLI action to execute any command. * **Azure**: execute Azure CLI commands and make REST API calls. * **Google Cloud**: execute Google Cloud CLI commands and make REST API calls. * IaC integrations: * **AWS CloudFormation**: update or delete resources in a CloudFormation template. * **Terraform**: update or delete resources in a Terraform template, modify Terraform variables files. * Other integrations: * **Snowflake**: add rows to Snowflake tables. * **GitHub**: retrieve file content, create pull requests, or trigger GitHub Actions runs. * **Archera**: apply commitment plans for cloud providers. Since many of these actions can make destructive changes in your cloud environment, they are considered high-risk and are marked with a red shield icon in the [workflow editor](/workflow-management/building-workflows/): ## Interact with project management tools These actions allow you to retrieve and update data in issues and boards in project management tools. * **Jira Cloud**: search, create, or update issues and issue comments. * **Monday.com**: manage boards, groups, columns, and items. * **Linear**: create and update projects, issues, and comments. * **ServiceNow**: retrieve, add, update, or delete records and requests. * **Zendesk**: make API calls to Zendesk to create or update tickets, create chat messages, and more. ## Save data and report These actions help store and share information collected during workflow runs. * **OpenOps Tables**: create and update records in [tables](/reporting-analytics/tables/). * **Microsoft Outlook**: send, forward, reply to, find, and move emails. * **SFTP**: create or read files on a remote server via SFTP. * **SMTP**: send emails. * **Storage**: store data in and read it from your OpenOps installation's key-value storage. The storage is accessible at the run, workflow, and installation levels. * **Put**: saves or overwrites a string value under a given key. * **Get**: retrieves a string value by key from storage. If the key does not exist, returns an optional default value. * **Append**: appends text to an existing string value. Optionally inserts a separator between values (for example, `\n` for new lines). Fails if the existing value is an array, not a string — in this case, use *Add To List* instead. * **Remove**: deletes a key and its associated value from storage. * **Add To List**: treats the stored value as an array and appends a new item to it. The item value is always stored as text: any non-string input is implicitly converted to a string (for example, objects are JSON-serialized). If the key does not exist, it is created and initialized with an empty array. Can optionally skip insertion if an equal value already exists in the array. Fails if the existing value is a string, not an array — in this case, use *Append* instead. * **Remove from List**: removes a matching item from an array value for the given key. Uses deep equality to find the item. If multiple matching values exist, only the first match is removed. Fails if the stored value is not an array. * **List**: returns all keys and their values (both strings and arrays) in storage for the selected scope. Supports optional regex-based key filtering. # Building Workflows Source: https://docs.openops.com/workflow-management/building-workflows How to use the OpenOps workflow editor to create new workflows In many cases, you can apply optimizations by taking one of the pre-made [workflow templates](/workflow-management/workflow-templates), creating a workflow off of the template, and customizing it to your liking. When there's no template to bootstrap from, you can create a new workflow from scratch. To end up with a minimally usable workflow, you need to: 1. [Create a new workflow](#creating-a-new-workflow) 2. [Add a trigger](#adding-a-trigger) 3. [Add at least one action](#adding-actions) 4. [Test the workflow](#testing-a-workflow) 5. [Publish the workflow](#publishing-a-workflow) Every workflow is made of steps. There are **two types of workflow steps**: triggers and actions. * A **trigger** is your workflow's first step. It defines how often your workflow executes. It may also represent an event that needs to occur for your workflow to kick off. A workflow always has exactly one trigger. * **Actions** are all subsequent steps of your workflow that start executing once your workflow is activated by a trigger. Below is an example of a workflow that is triggered on a schedule. The first node represents the schedule trigger, and all other nodes are actions: In another example, here's a workflow that uses an update of a Jira Cloud issue as a trigger: ## Creating a new workflow To create a new empty workflow, go to the **Workflows** section in your OpenOps instance, and click **New Workflow** in the top right corner. What you'll see is the workflow editor, which initially looks like this: Empty workflow editor Let's look around and see what controls the editor provides: * In the top left corner, if you click the arrow next to the workflow name, you'll see a menu that lets you rename or delete the workflow, move it to a folder for better organization, or perform [export and import](/workflow-management/import-export/) operations: * To the right of the workflow name, use the **Notes** button if you want to describe the intent of your workflow in detail or leave any other comments for future reference. * Click the three-dot menu icon to expose additional options: **Tree view**, **Version history**, and **Run logs**. Version history and run logs become more relevant when you update or [troubleshoot](/workflow-management/investigate-workflow-run) your workflows later. You can also click **Tree view** to display a side panel showing the compact structure of your workflow, including its trigger, all actions, and any [conditions and branches](/workflow-management/conditional-branching): ## Adding a trigger When you create a new workflow, the editor creates an empty stub trigger. When you click the trigger node, you can see a list of trigger blocks — groups of related triggers. Select a block that works for you: After selecting a block, choose a specific trigger within that block: OpenOps provides over 10 triggers divided into several blocks: * **Schedule**: *Every X minutes*, *Every hour*, *Every day*, *Every week*, *Every month*, *Cron expression*. * **Jira Cloud**: *New issue*, *Updated issue*. * **Linear**: *New issue*, *Updated issue*, *Removed issue*. * **IMAP**: *New email*. * **Microsoft Outlook**: *New email*. * **Webhook**: *Catch webhook*. Some triggers are used more often than others. For most of your scenarios, you will probably use one of the triggers in the **Schedule** block, setting your workflows to run at a predetermined interval. For details on schedule triggers, see [Scheduling](/workflow-management/scheduling/). If you use the **Webhook** trigger, note that it supports both asynchronous and synchronous calls: * Use the live URL shown in the trigger properties to start the workflow asynchronously. * If the webhook caller expects a response, add `/sync` to the end of the live URL. The request waits for the workflow to complete. * To return a response body and headers from your workflow, add an **HTTP** step with the **Send Webhook Response** action. After selecting a trigger, click the trigger node again to display a right-hand pane with the properties of the trigger. For example, here are the properties of the *Every day* trigger: Trigger properties You can choose a specific hour in a specific time zone and include weekends, or go with the reasonable defaults. Properties will vary with each type of trigger. For example, if the trigger is a new issue in Jira Cloud, you can specify a search query using Jira's JQL query language. ## Adding actions As soon as you've created a trigger, the next and all subsequent steps of your workflow will be actions. ### Adding the first action Click the **+** icon under the trigger, and a pop-up menu will display a list of available action blocks. Clicking a block lets you select a specific action: OpenOps provides a total of [120+ actions](/workflow-management/actions/). One way to make sense of them is to classify them by intent: * To **get data** for your workflow to process, look at cloud provider integration actions like **AWS**, **Azure** or **Google Cloud**, recommendation provider actions such as **Umbrella**, **Archera** and **AWS Compute Optimizer**, or generic **HTTP** actions. * To **control the execution of your workflow**, use actions grouped under **Condition** and **Split**, **Loop on items**, **Delay**, and **Stop Execution**. * To **process data obtained in previous steps**, use **Date, List, Math, and Text operations**, **Data mapper** for advanced transformations, **AI Step** for applying LLM prompts to step outputs, and **Code** for transformations that you can't express with available no-code actions. * To **request human intervention**, use **Approval** or **Slack**. * To **make or request changes to cloud resources**, use cloud provider actions, IaC integration actions like **AWS CloudFormation** and **Terraform**, and the **GitHub** action. * To **make updates in project management tools**, use **Jira Cloud**, **Linear**, **Zendesk**, or **Monday.com** actions. * To **save data and generate reports**, use **SMTP**, **SFTP**, **Storage**, and **OpenOps Tables** actions. When you select an action, OpenOps adds it to the workflow graph and displays a right-hand pane with the properties of the action: Properties of an action The specific set of properties depends on the type of action. Here are a few general rules: * Actions that get data from or send data to external resources will require you to [define a **connection**](/cloud-access/access-levels-permissions). For example, for AWS-related actions, you'd need to specify your access key ID, secret access key, and the default region. For a Slack connection, you'd specify your Slack instance's redirect URL, your client ID, and your client secret. One connection can be reused across multiple actions, and the OpenOps UI provides a separate view to list all connections you have defined so far. * Actions that process data obtained in previous steps will ask you to specify the input data. For details, see [Passing Data Between Workflow Steps](/workflow-management/passing-data). * You can get [AI assistance](/ai-assistance/overview/) in many actions that involve writing CLI commands (AWS CLI, Azure CLI, Google Cloud CLI), SQL queries (AWS Athena, Snowflake, Databricks, BigQuery), or custom code. To enable AI assistance, you'll need to [connect OpenOps to an LLM provider](/ai-assistance/llm-connections) of your choice. OpenAI, Anthropic, Perplexity, and a dozen other LLM providers are supported. * Every action has two toggles: **Continue on Failure**, which lets the current action fail and continues the workflow regardless, and **Retry on Failure**, which retries the current action up to four times before giving up. ### Adding more actions You can add more actions by clicking the **+** icon in the workflow graph. You don't need to add actions sequentially: the **+** button is available between existing actions, allowing you to add new actions in the middle of your workflow. #### Copying and pasting steps If you need to reuse an action step in multiple places, you can **copy/paste** it. This copies the action along with all its property values, saving you the trouble of reconfiguring it. For example, you can copy/paste actions between different workflows, or between [conditional branches](/workflow-management/conditional-branching/) of the same workflow that often end up sharing a part of their containing actions. There are three ways to use copy/paste actions: 1. With the standard copy/paste keyboard shortcuts (**Ctrl+C/V** or **Cmd+C/V** on Mac). When you paste this way, the copied action is inserted after the action that is currently selected in the workflow graph. 2. Using the right-click context menu of any action: 3. By clicking the three-dot menu of any action: There are several ways to paste the copied action: * Select an action after which you want to insert the copied action, then right-click and choose **Paste after**. * Right-click the **+** icon between two existing actions and click **Paste here**: * Right-click a loop action and select **Paste inside loop**. This inserts the copied action as the first action inside the loop: * To paste as the first action after a loop or condition, right-click anywhere inside the loop or condition and click **Paste after selection**. * To paste as the last action in the workflow, right-click anywhere outside the workflow graph and click **Paste after selection**. Note that copy/paste has variable availability depending on the protocol used to access OpenOps: * HTTPS installations, and HTTP on localhost: keyboard shortcuts, context menu, and three-dot menu are all available. * Non-localhost HTTP installations: * Keyboard shortcuts are available for copying and pasting. * Three-dot menu and right-click context menu are available, but only for copying. Use the keyboard shortcut for pasting. * After copying via the context or three-dot menu, you can only paste within the same workflow. #### Collapsing and expanding steps As you add more actions to your workflow, you'll notice that the workflow graph becomes more cluttered and harder to navigate. This is even more evident when your workflow includes many loops and conditions. To make it easier to navigate complex workflows, you can collapse steps representing loops, [conditions](/workflow-management/conditional-branching#condition), and [split](/workflow-management/conditional-branching#split) actions. For example, in the following image, step 7 is a condition with a branch that contains another condition: Workflow with nested conditions If you're not currently working on this part of the workflow, you can collapse it by clicking the collapse icon to the left of step 7: Click the icon again to expand the condition the next time you need to work on it. ## Testing a workflow As you build your workflow, you should test individual steps (both the trigger and all actions) in isolation. Once you're done editing and testing the steps, you should also [test the entire workflow](#testing-the-entire-workflow) to make sure that everything works as expected. ### Testing individual steps In the properties pane for every step, there are two tabs: **Configure** and **Test**. When you click the **Test** tab, it displays two sections: **Step output** and **Sample output data**. Under **Step output**, you can click **Test Step** to test or retest the step in isolation. "Testing" in this context means running the step's action against a live system that it is configured to connect to. Sometimes, the **Test Step** button may be grayed out, like this: Your step will also have a yellow warning icon next to it. If this happens, make sure you have filled in every mandatory input field in the step's properties pane. You may need to scroll through the properties pane to see all required fields. Once you've filled in all mandatory fields, the **Test Step** button becomes active. Click it to run the test and view the output generated by the step: If you don't have a connection defined when working on a step, or if you want to avoid running the step against a live system for any other reason, open the **Sample output data** tab. Once there, paste the expected output of the step. Depending on what the step's action does, this could be the result of a math operation, a JSON response from an API call, or similar. Finally, click **Apply**: This lets you avoid running the step against a live system while still being able to provide input data for subsequent steps in your workflow. All steps that use sample output data have a corresponding label in the workflow graph: ### Testing the entire workflow As soon as you have implemented and tested all steps, including a trigger and actions, it's time to test your entire workflow. If all the steps in your workflow are complete, you'll see the **Test Workflow** button at the top of the workflow editor, right above the trigger node: If some of the steps aren't complete, you'll see the **Complete *n* steps** button at the top of the workflow editor instead. Incomplete steps will also be marked with a yellow warning icon: Click **Complete *n* steps** to navigate to the first incomplete step in your workflow. Locate the remaining incomplete steps by the yellow warning icons next to them. Once you've confirmed that all individual steps are complete, the **Test Workflow** button at the top of the workflow editor becomes active. Before clicking the button, there's one more consideration. "Testing" the workflow in OpenOps means running all actions in the workflow against their respective live systems. If your workflow contains loops, and actions within those loops update live systems, you may want to set execution limits for each of these actions. To do this, click the **Settings** icon to the right of the **Test Workflow** button. This opens the **Set Action Limits** dialog: Set Action Limits dialog In the **Set Action Limits** dialog, OpenOps lists all write actions found inside loops in your workflow. For each action, you can set the maximum number of times it can be executed during workflow testing, or keep the default value of 10. After setting and saving the execution limits, click **Test Workflow** to start testing. Note that when you test the entire workflow, OpenOps will ignore any sample output data you may have provided for individual actions. Instead, it will run all actions in the workflow against their respective live systems. After performing a test run of the workflow, OpenOps will show the results of the run in the **Run Details** pane to the left of the editor, indicating the status of each step, as well as its inputs and outputs: ## Publishing a workflow When you're happy with your workflow and want to start running it, click **Publish** in the top right corner. This also applies when you're editing an existing workflow: to avoid disrupting pending workflow runs, your changes won't take effect until you publish them. # Conditional Branching Source: https://docs.openops.com/workflow-management/conditional-branching How to create decision paths in your workflows Depending on data received in previous steps of your workflow, you may want to decide how to proceed further. Two actions help you split your workflow based on conditions: * [**Condition**](#condition) splits the workflow into exactly two branches. * [**Split**](#split) splits the workflow into multiple branches. You can add either of these just like you add any other action, using the **+** button in the workflow editor: ## Condition The **Condition** action splits the workflow into exactly two branches. One is executed if one or multiple conditions that you specify are satisfied, and the other is executed otherwise. Think of this as the equivalent of an `if` statement in programming. If you choose the **Condition** action, the properties pane on the right lets you define the condition. By default, there's only one condition, but you can combine multiple conditions with logical conjunction (click **And**) or disjunction (click **Or**). Every condition contains one or two data fields. Clicking a data field opens the **Data Selector** view, allowing you to select output from any of your prior actions: Data selector for a condition Alongside the data fields, there's a combo box that defines the specific operation for your condition. See [Operators](#operators) for details. Here's an example of a complete condition that uses disjunction to check values returned from two separate prior steps: Condition action If you click the **Test** tab in the condition step's properties pane, you can evaluate the condition and verify that the result matches your expectations. ## Split The **Split** action splits the workflow into multiple branches. Each branch executes if its specific condition is met. An extra branch, called the default branch, executes if none of the conditions specified for other branches is satisfied. Every condition should be unique: if conditions in multiple branches are satisfied, this results in a workflow failure. Think of this action as the equivalent of a `switch` statement in programming. Each condition in the **Split** properties pane has one or more data fields and a combo box to define the [operator](#operators). Unlike the **Condition** action, **Split** only allows one condition per branch, meaning you can't define complex conditions using **And** or **Or** operators. ## Operators When you define conditions using the **Condition** or **Split** actions, you need to specify what operation to apply to the value(s) you supply. The combo box alongside the data fields lets you do just that: Operators OpenOps provides 20+ operators applicable to several types of data: text (strings), numbers, boolean values, lists, and dates. Here's the complete list of operators along with their additional settings: | Data type | Operator | | - | - | | Text | Contains | | Text | Does not contain | | Text | Is | | Text | Is not | | Text | Starts with | | Text | Does not start with | | Text | Ends with | | Text | Does not end with | | Number | Is greater than | | Number | Is less than | | Number | Is equal to | | Boolean | Is true | | Boolean | Is false | | All data types | Exists | | All data types | Does not exist | | List | Is empty | | List | Is not empty | | List | Length is greater than | | List | Length is less than | | List | Length is equal to | | List | Contains | | List | Does not contain | | Date | Is before | | Date | Is after | All text operators provide a setting to toggle case sensitivity. All other operators come without additional settings. ## Exploring conditional branches in large workflows If you're working with a large workflow that has many conditional branches and are having trouble navigating between them, consider collapsing steps you don't need to focus on right now, or use the **Tree view** pane. To collapse a condition, split, or loop step, click the collapse icon to the left of the node. A collapsed node can be expanded by clicking the icon again: Alternatively, for a bird's-eye view of the workflow, open the three-dot menu in the top control pane of the workflow editor, then click **Tree view**: This displays the **Tree view** pane on the left side of the editor — a great way to see a compact representation of your workflow, including conditions and branches: # Human-in-the-Loop Source: https://docs.openops.com/workflow-management/human-in-the-loop How to request human approval and intervention in your workflows Some workflows can run safely in unattended mode. Others, such as resource deletions, are more impactful and may require review by stakeholders before proceeding. To address this, OpenOps offers two Human-in-the-Loop mechanisms: [approvals](#requesting-approvals) and [notifications](#sending-notifications). For example, you can create a workflow that flags idle RDS instances for review, prompting human approval before any scaling down or termination actions are taken. ## Requesting approvals You can automate sending your stakeholders messages with actionable links or buttons and make your workflow stop executing until the receiver clicks one of these links or buttons. Depending on their choice, you can split the subsequent steps of your workflow into conditional branches. OpenOps offers dedicated approval request features for Slack and Microsoft Teams, as well as a more generic approval mechanism that you can use with other communication channels such as email. ### On Slack OpenOps provides several Slack-related actions: #### With "Request Action" One of Slack-related actions, **Request Action**, is the most straightforward way to request approval. It lets you build a Slack message with standard action buttons, send it to a chat or a public channel, and wait until the recipient clicks one of these buttons, signifying their decision: When this action fires, the Slack user receives a message that you've defined in the action's properties. The message may look like this: As soon as the user clicks one of the buttons, your **Request Action** step receives this as the output. You can then create a [conditional branch](/workflow-management/conditional-branching/) with the **Split** action and implement distinct steps depending on which button the user clicked: Splitting based on a user action #### With "Send Message" and "Wait For User Action" If you want to build approval requests with more customization options, you can use the **Send Message** action in the **Slack** block instead of **Request Action**. The upside of **Send Message** is that it enables you to create approval requests using Slack's rich [Block Kit](https://api.slack.com/block-kit) UI framework. However, **Send Message** doesn't wait for a reply from the recipient. Instead, use the **Wait For User Action** action and pass the output of **Send Message** to it. This allows the workflow to capture button clicks in the approval request. Once a button click associated with a decision is captured, you can then use the **Split** action to add workflow steps depending on the decision. ### On Microsoft Teams OpenOps provides the following actions in its Microsoft Teams block: **Request Action** is the action you can use to request approval. It lets you build a Teams message with action buttons, send it to a chat or a channel, and wait until the recipient clicks a button to convey a decision: When this action runs, the Microsoft Teams user or channel receives a message that you've defined in the action's properties. The message may look like this: When the user clicks one of the buttons, your **Request Action** step receives the selection as its output. You can then create a [conditional branch](/workflow-management/conditional-branching/) with the **Split** action and implement different steps depending on which button the user clicked: Splitting based on a user action ### By email To request approvals through other communication channels, such as email, use the **Approval** block of actions: In this case, you can create the approval part of your workflow as follows: 1. Add the **Create Approval Links** action from the **Approval** block. This action generates two links: one for approval and one for disapproval. 2. Add an action to send the two links to a stakeholder. For example, you can use **Send Email** from the **SMTP** block or **Send Email** from the **Microsoft Outlook** block. 3. Add the **Wait For Approval** action from the **Approval** block. Once the stakeholder clicks a link, this action updates the approval status accordingly. 4. Add the **Condition** action to define steps for approval and disapproval. Here's a sample workflow that uses **Create Approval Links**, delivers an email notification using **Send Email** from the **SMTP** block, and then proceeds based on the output of the **Wait For Approval** action: Sending approval links via email The email with approval links may look like this: Email with approval links ## Sending notifications Besides approvals, you can also send notifications about completed workflows or steps. Some of the actions that enable sending notifications include: * Actions in the **Slack** block: * **Send Message** to send a direct message or a message to a public Slack channel. * **Update Message** to update a message previously sent to a public Slack channel. * **Send Channel Message** and **Send Chat Message** under **Microsoft Teams**. * Actions in the **Jira Cloud** block, such as **Change Issue Status** and **Add Issue Comment**. * Actions to send emails under **SMTP** and **Microsoft Outlook**. # Exporting and Importing Workflows Source: https://docs.openops.com/workflow-management/import-export How to share workflows using the import/export functionality Sometimes you may want to share a workflow you've created with others or import one that someone else has created. Here's how you can do this in OpenOps. ## Exporting workflows To export a workflow: 1. Open the workflow you want to export in the workflow editor. 2. Click the arrow next to the workflow name in the top left of the editor. 3. Click **Export**: 4. Save the workflow as a JSON file to your computer. A workflow export file contains all actions and properties of the original workflow. It does not include the connection settings used in your OpenOps installation. When importing into a different OpenOps installation, the recipient will need to configure their own connections. ## Importing workflows To import a workflow: 1. Click **New Workflow** to create a new empty workflow in your OpenOps installation. 2. In the top left of the workflow editor, click the arrow next to the workflow name. 3. Click **Import**: 4. In the **Import Workflow** dialog, click **Choose file**. 5. Select the downloaded JSON file. 6. Click **Import**. 7. If the imported workflow requires connections that your OpenOps instance doesn't have, you'll be prompted to create them. 8. Once you've finished creating connections, click **Create workflow**. # Investigating Workflow Runs Source: https://docs.openops.com/workflow-management/investigate-workflow-run How to troubleshoot and debug workflow runs If a workflow didn't execute the way you expected it to, you can investigate what went wrong by viewing the history of workflow runs. You can do this [from the **Runs** view](#finding-a-run-from-the-runs-view) or directly [from the workflow editor](#finding-a-run-from-the-workflow-editor). ## Finding a run from the Runs view Click **Runs** in the OpenOps main menu. This opens the list of all runs across all your workflows, with the most recent runs shown first: The list of all workflow runs You can filter the list by workflow name, run status (succeeded, failed, paused, timeout, etc.), type (triggered, manual run, test run), or a date range: Workflow runs with filters applied When you've found a run you want to investigate, click on it. This will open the workflow editor in a view-only mode. Alternatively, if a run is taking longer than expected or is stuck in a paused state, you can abort it by clicking the three-dot menu on the right and selecting **Stop Run**: Stopping a run ## Finding a run from the workflow editor If the workflow you want to investigate is already open in the workflow editor, click **Run logs** in the top menu: In the **Recent Runs** pane that opens on the left, click a run that you want to investigate. Failed runs are marked with the ❌ icon: This will open the selected run in the **Run Details** pane. ## Investigating in the Run Details view In the **Run Details** pane, each workflow step will display a ✅ or a ❌ to indicate its execution status. Click on a failed step to see its inputs and outputs. Explore the outputs to view the error message: To update the workflow to address the error, click **Edit** in the top-right corner of the workflow editor. This switches the editor from view-only mode, enabling you to select the problematic step and modify its properties. ## Changing the default timeout By default, OpenOps times out if a workflow runs for more than 10 minutes. This applies to both scheduled runs and test runs. If you build long-running workflows, you may want to extend the default timeout. To do this, open the `.env` file in your OpenOps installation directory and add a new environment variable named `OPS_FLOW_TIMEOUT_SECONDS`. Set its value to the desired timeout in seconds — for example, `900` for 15 minutes or `3600` for 1 hour. After making any changes to the `.env` file, restart the OpenOps containers: ```shell theme={null} sudo docker compose down sudo docker compose up -d ``` # Passing Data Source: https://docs.openops.com/workflow-management/passing-data How to pass data between workflow steps Any OpenOps workflow consists of multiple steps. The first step is a **trigger**, followed by any number of **action** steps. ## The general principle of data flow Any [action](/workflow-management/actions/) step can access the output data of any of its previous steps: both the trigger and actions. For example, in the section of a workflow shown above: * **Step 4** has access to data produced by steps 3, 2, and 1. * **Step 3** has access to data produced by steps 2 and 1. * **Step 2** has access to data produced by step 1. There are certain nuances when it comes to accessing data from loops and conditional statements that were executed before: 1. If there was a conditional statement, such as **Condition** or **Split**, before your current action, then your current action will not have access to the outputs of any actions inside the branches of the conditional statement. If you need the output of actions in these branches to be available after the conditional statement completes, make sure to save it elsewhere, such as in OpenOps’ internal storage using the **Put** action in the **Storage** block. You can then retrieve it from storage using the **Get** action in the same block. 2. This is also true for loops: the output of actions that occur inside a loop is not available outside the loop. If you need any data from the loop after it completes, make sure to save the data to storage while still inside the loop. ## Selecting data from prior steps When you create a new action step, chances are that its properties pane contains one or more data fields that accept data from previous steps. When you click in a data field, it opens the **Data Selector** pane, which helps you select a piece of data produced by previous steps as the input for the current step. Continuing with the example above, when you click in the **Items** field in the properties pane of the **Loop on items** action step, the **Data Selector** suggests all data generated prior: Data Selector If an item in this panel has a caret (**⌄**) to the right, you can click on it to expand its children. When you've found the piece of data you need, click **Insert** next to it to use it in the current data field. Take time to expand the items before inserting them to understand the type of data they contain and whether they're the right fit for your needs. For example, if you're inside a loop, you may not need the entire object from the current loop iteration — expand it until you find the specific value you need: If a property provides a fixed list of values (such as a dropdown) but you're not happy with any of them, click the **Dynamic** toggle on the top right of the property. This turns the property into a regular input where you can use the **Data Selector** to choose a custom value: Also note that although the **Data Selector** appears in every input field, you don't always have to use it. Sometimes, you can simply enter a value manually. For example, if you're using the **Group By** action to regroup a list, just type in the property key that you want to group by in the **Property Key** field: ## Transforming outputs Sometimes, the output of a previous step may not be immediately suitable for use in your next steps. In this case, you can use several [actions](/workflow-management/actions/) or combinations of actions to transform the output into a different format: * Use actions from the **Text Operations** block to concatenate, split, or otherwise transform text values. * Use actions from the **Math Operations** block to perform arithmetic operations, calculate averages, or return minimum and maximum values. * Use actions from the **Date Operations** block to format dates, extract individual date units (year, month, day, hour, etc.), or calculate date differences. If the output you want to transform is a list, first create a loop using the **Loop on Items** action, then use any of the actions listed above to transform individual list entries inside the loop. There's also a block of actions called **List Operations** that you can apply to a list without creating a loop: * **Group By** creates several nested lists, each containing one distinct value of a property that you specify. * **Map List Items** does the same as **Group By**, but makes each nested list the value of a separate property. * **Extract From List** keeps only one out of many properties in each list item. Finally, if none of the transformation actions above meet your needs, use the **Custom TypeScript Code** action in the **Code** block to define a bespoke transformation in TypeScript or JavaScript. If you're not an experienced developer, [AI assistance](/ai-assistance/overview/) can help you generate the code. # Scheduling Source: https://docs.openops.com/workflow-management/scheduling How to schedule workflows to run automatically Every workflow starts with a trigger. OpenOps provides multiple triggers, enabling you to start workflows upon catching a webhook or depending on issue-related events in Jira Cloud or Linear. For many of your scenarios, you will probably use one of the triggers in the **Schedule** block, setting your workflows to run at a predetermined interval. The **Schedule** block consists of six triggers. ## Every X minutes Use this if you want your workflow to run more often than once per hour: ## Every hour Use this to run your workflow exactly once an hour. By default, it only runs on weekdays, but you can optionally set it to run on Saturdays and Sundays as well: ## Every day Use this to run your workflow every hour, on the hour, in a specific time zone, every working day. Optionally, you can choose to also run on weekends: ## Every week Use this to run your workflow on a specific day and hour of the week: ## Every month Use this to run your workflow once a month on a specific day and at a specific time: ## Cron expression Use this trigger with the [cron syntax](https://www.baeldung.com/cron-expressions) for custom scheduling that can't be expressed with other triggers: For example, if you want to run your workflow every 3 hours, use the following cron expression: ```cronexp theme={null} 0 */3 * * * ``` What if you're based in a country that rests on Fridays but works on Sundays, and you want your workflow to run at 3 AM and 7 PM every working day? Try this cron expression: ```cronexp theme={null} 0 3,19 * * 0-3,6 ``` Note that since the properties of this trigger accept exactly one cron expression, you can't create schedules that are defined with two or more expressions, such as scheduling every 1 hour and 30 minutes. # Webhook responses Source: https://docs.openops.com/workflow-management/webhook-responses Send HTTP responses back to webhook callers from your workflows When a workflow is triggered by a webhook, you can send a custom HTTP response back to the caller. This enables synchronous communication patterns where the webhook caller waits for and receives a response from your workflow. ## Use cases Webhook responses are useful when you need to: * Return processed data to the webhook caller * Acknowledge receipt of webhook data with custom status codes * Implement synchronous API endpoints using OpenOps workflows * Provide immediate feedback to external systems ## How it works When a workflow is triggered by a webhook, OpenOps can send a response back to the caller before the workflow completes. The response includes: * HTTP status code * Response headers * Response body (JSON or raw text) By default, webhook triggers return a standard acknowledgment response. Use the **Send Webhook Response** action to customize this response. ## Sending a webhook response To send a custom response to a webhook caller: 1. Add the **HTTP** block's **Send Webhook Response** action to your workflow 2. Configure the response properties: * **Status**: HTTP status code (default: 200) * **Headers**: Custom HTTP headers as a JSON object * **Body Type**: Choose between JSON or Raw text * **Response**: The response body content ### Example: JSON response ```json theme={null} { "status": 200, "headers": { "Content-Type": "application/json" }, "body": { "success": true, "message": "Data processed successfully", "processedAt": "2026-01-29T10:00:00Z" } } ``` ### Example: Raw text response ```text theme={null} Status: 200 Body Type: Raw Response: "Operation completed successfully" ``` ## Response timing The webhook response is sent as soon as the **Send Webhook Response** action executes in your workflow. The workflow continues to run after sending the response, but the webhook caller receives the response immediately. If your workflow doesn't include a **Send Webhook Response** action, OpenOps automatically sends a default acknowledgment at the end of the workflow execution. ### Default response ```json theme={null} { "status": 200, "headers": { "Content-Type": "application/json" }, "body": { "message": "Request completed." } } ``` ## Best practices * **Send responses early**: Place the **Send Webhook Response** action early in your workflow to avoid timeouts * **Use appropriate status codes**: Return meaningful HTTP status codes (200 for success, 400 for bad requests, 500 for errors) * **Include error handling**: Use conditional branching to send different responses based on workflow outcomes * **Keep responses lightweight**: Avoid sending large payloads in webhook responses ## Limitations * Only one response can be sent per webhook trigger * The response is sent asynchronously through the OpenOps engine ## Example workflow Here's a complete example of a workflow that receives webhook data, processes it, and sends a custom response: 1. **Webhook trigger**: Catches incoming webhook 2. **Data validation**: Validates the incoming data 3. **Send Webhook Response**: Sends acknowledgment to caller 4. **Process data**: Continues processing in the background 5. **Store results**: Saves processed data to a database This pattern allows you to acknowledge receipt immediately while continuing to process data asynchronously. # Workflow Templates Source: https://docs.openops.com/workflow-management/workflow-templates How to create automations from a library of pre-configured workflow templates OpenOps provides a pre-made library of FinOps best-practice workflows, based on research and input from FinOps leaders across industries and verticals. The library, referred to as the **template catalog**, contains dozens of templates that provide ready-to-use recipes for anomaly management, workload and rate optimization across the following cloud services: * **Amazon**: CloudFront, CloudWatch, DynamoDB, Elastic Block Store (EBS), Elastic Compute Cloud (EC2), Elastic File System (EFS), Elastic Kubernetes Service (EKS), Elastic Load Balancing (ELB), Lambda, Relational Database Service (RDS), Simple Storage Service (S3), and Virtual Private Cloud (VPC). * **Azure**: App Service, Application Insights, Container Registry, Cosmos DB, SQL Database, Managed Disks, Elastic Pool, Firewall, SQL Managed Instance, Virtual Network, SQL Server on Azure Virtual Machines (SQL VM), Storage, and Virtual Machines (VM). * **Google Cloud Platform**: Cloud Logging and Compute Engine. ## Exploring templates To view the catalog, click **Explore templates** in the top-right menu bar in the **Overview** or **Workflows** section: The catalog will open in an overlay: OpenOps template catalog before signing up with OpenOps Cloud By default, the catalog contains six templates. To view more, click **Explore more** and sign up for a free OpenOps Cloud account. You may not be able to connect to OpenOps Cloud and see additional templates if: * Your browser is configured to block third-party cookies. Allow third-party cookies ([Chrome](https://support.google.com/chrome/answer/95647), [Safari](https://help.apple.com/safari/mac/8.0/en.lproj/sfri11471.html), [Firefox](http://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection)) for your OpenOps installation’s URL. * You're using an OpenOps installation served over HTTP in Safari. Consider enabling HTTPS for your installation by following the instructions for [AWS](/getting-started/deployment/aws-ec2#enabling-tls), [Azure](/getting-started/deployment/azure-vm#enabling-tls), or [GCP](/getting-started/deployment/gcp-vm#enabling-tls) deployments. As soon as you sign up, the **template catalog** in your OpenOps installation is extended to show all available templates: OpenOps template catalog after signing up with OpenOps Cloud ## All templates OpenOps currently provides the following templates. ### AWS * Automate HTTPS Redirection in CloudFront * Automatic activation of AWS Cost Allocation Tags * AWS EC2 Cost anomalies follow-up and knowledge base \[Jira events] * AWS EC2 Cost anomalies follow-up and knowledge base \[Main] * AWS EC2 RI Expiration recommendations, Jira ticket * AWS EC2 RI Purchase recommendations, Jira ticket * AWS Lambda Memory optimization * AWS RDS RI Purchase recommendations (custom logic), Jira ticket * AWS RDS RI Purchase recommendations (Trusted Advisor), Jira ticket * AWS Sample workflow * Build opportunities for untagged EBS snapshots * Bulk apply EC2 tagging policy * Bulk idle EBS cleanup * Delete Orphaned RDS Snapshots * Dev EC2 instances outside business hours \[Main] * Dev EC2 instances outside business hours \[Restart] * Dev EC2 instances outside business hours \[Shutdown] * DynamoDB Over-Provisioned Tables Detection * EBS Generation upgrade (gp2 to gp3) * EC2 upgrade to Graviton, Jira ticket * EFS: check Infrequent Access usage * EKS Extended Support Avoidance * Elastic IP Idle Address Cleanup * Enable compression on Cloudfront distributions * Enforce 180 days max retention for CloudWatch logs * Idle Dev environment RDS instances, GitHub action * Idle Elastic Load Balancer (ELB), Jira ticket * Idle RDS instances in Staging, Terraform remediation * Low Utilization EC2 recommendations, Jira ticket * Migrate x86 AWS Lambda runtimes to Graviton * Old generation EC2 migration, Jira ticket * Over-provisioned EBS Volumes recommendations, Jira ticket * RDS Extended Support Avoidance * S3: Detect non-current file versions * Stopped EC2 recommendations, Jira ticket * Storage class and retention policy for logs in S3 * TTL policy for EBS snapshots * Unattached EBS in Production, Jira ticket * Unattached EBS in Staging, delete action * Underutilized EC2 in Prod, CloudFormation update \[Jira events] * Underutilized EC2 in Prod, CloudFormation update \[Main] * Underutilized EC2 in Staging, rightsize action * Unused NAT Gateways, Jira ticket * VPC Gateway endpoints for Amazon S3 and DynamoDB * VPC Interface Endpoints Optimization ### Azure * \[Dev AKS Clusters] Scale down after business hours * \[Dev AKS Clusters] Scale up for business hours * App Service Plans with Low Utilization * Application Insights logs sampling check * Archive and delete policy for Blob Storage * ASE App Service Plan Consolidation * Azure Container Registry (ACR) 7-day retention policy * Azure Cost Anomalies detection and alerting * Azure Idle VMs - low CPU and Network usage * Azure Idle VMs recommendations with approval * Azure Managed Disk Snapshots optimization * Azure OpenAI Consumption Spikes alerting * Azure Sample workflow * Azure Service Bus Messaging Inefficiency Detection * Azure Service Bus Premium Off-Hours MU Autoscaling * Azure Storage Transaction Inefficiency Detection * Azure temp VMs older than 14 days * Configure Log Export to Storage Account * Daily email report of new Azure recommendations * Detached Azure Public IP Addresses * Elastic Pool Off-Hours Scale Down - Identify and Tag Eligible Pools * Elastic Pool Off-Hours Scale Down - Increase Capacity For Business Hours * Elastic Pool Off-Hours Scale Down - Reduce Capacity Outside Business Hours * Elastic Pool Storage Optimization * Enable autoshutdown * Enforce Azure Budget Policies to Prevent Overspend * Enforce maximum log retention period * Enforce Tagging Policy for Azure Resource Creation * Identify Azure SQL Resources Without Azure Hybrid Benefit (AHB) * Identify Firewalls Eligible for Downgrade to Basic * Identify Idle Event Hubs Namespaces * Identify Unused App Services * Identify Unused Sql resources * Identify VMs for Reserved Instance Recommendations * Identify Windows VMs Without Azure Hybrid Benefit (AHB) * Move Under-Utilized Azure Functions from Elastic Premium to Consumption * Notify on Untagged Resources * Optimize Autoscale Max Throughput in Cosmos SQL DB * Optimize Manual Throughput in Cosmos DB * Orphaned Azure Standard Load Balancers * Remove Stale Recovery Services Vault Backups * Rightsize ASE App Service Plans * Rightsize Azure VMs via CPU & Memory Analysis * Rightsize EventHubs Throughput Units & Cap Auto-Inflate * Scale Dev ASE Plans to single Instance * Start autoshutdown VMs * Unattached Azure Managed Disks * Unattached Azure Network Interfaces ### GCP * Business Unit Labelling Policy on GCE Instances * Business Unit Labelling Policy on GCP Cloud Run Services * Cleanup Policies for GCP Artifact Registry Repositories * Dev GCE instances Outside Business Hours \[Main] * Dev GCE instances Outside Business Hours \[Restart] * Dev GCE instances Outside Business Hours \[Shutdown] * Enforce Time-to-Live for GCE Disk Snapshots * GCP Cloud Run Idle Service Detection * GCP Cloud Storage Class Optimization * GCP Cloud Storage Lifecycle Policy Compliance * GCP Idle SQL Instance Cleanup * GCP Idle Virtual Machines Cleanup * GCP Unattached Persistent Disk Cleanup * GCP Unused Cloud DNS Zones Cleanup * GCP Unused Cloud Scheduler Jobs Cleanup * GCP Unused Load Balancers Cleanup * GCP Unused Pub/Sub Topics Cleanup * Google Cloud Sample workflow * Set retention period for log buckets * Set Time-to-Live for GCP Disk Snapshots * Unused GCP Static IPs Cleanup ### Multi-cloud * Detect new or unknown cost types * Sample FOCUS data aggregation ## Creating workflows based on templates When you click a template in the catalog, OpenOps displays its full description, a preview diagram visualizing the workflow steps defined in the template, and the integrations that the template uses: CloudWatch log retention enforcement template If you want to use the workflow defined in the template, click **Use template** in the top-right corner. OpenOps will then ask you to specify existing or create new connections to cloud services that are required for the selected template to work: You can set up the required connections now or later. When you click **Create workflow**, your workflow will open in the workflow editor, where you can [customize it to your liking](/workflow-management/building-workflows). ## Creating templates based on workflows In OpenOps Enterprise, you can create templates based on the workflows you've built and make them available in your company's own template catalog. These templates appear in the **My Organization Templates** section of the template catalog. To learn more, see [Organization Template Catalog](/paid/organization-template-catalog/). # Workflow Version History Source: https://docs.openops.com/workflow-management/workflow-version-history-lifecycle How to track and manage workflow versions When you create a new workflow or start editing an existing one, you're working with a draft. For draft editing, there are **Undo** and **Redo** buttons in the top menu of the workflow editor: Use **Undo** and **Redo** to cancel or repeat the creation of workflow steps. Note that operations more granular than step creation, such as modifying the properties of an action, do not create a new item in the undo stack. Every time you publish a workflow, OpenOps records the published version so you can view or restore it later. When a workflow is open in the workflow editor, you can click **Version History** in the drop-down menu: This opens the **Version History** pane to the left of the editor: The version that is currently published is marked with a green dot. The eye icon marks the version that you're currently viewing. If you click the three-dot menu to the right of a version, you can choose to view that version or use it as a starting point to draft a new version: Reverting to an earlier version is especially useful if the latest published version of a workflow has proven to be problematic, and you'd like to revert to an older version that works. In this case, select **Use as draft** for a previous version known to be functional, then click **Publish**, and the working version is now back in action. Note that whenever you start editing your workflow, your current draft is also represented in **Version History** by a record with a yellow dot next to it: