Business Scenario

As you may know, the Rotating Banana team has developed a cloud application deployed on SAP BTP within the Cloud Foundry environment. To ensure the application operates smoothly, the operations team needs to validate its functionality and recover it when necessary.
As an administrator at Rotating Banana, your task is to create a recovery command that:
- Checks the app’s API to confirm it is running correctly.
- Restarts the app if an issue is detected.
- Automatically generates a diagnostic ticket in a ticketing system (such as Atlassian Jira).
Note
Although this example uses Jira, the process applies to any ticketing system.
The steps from the ops flow are also visualized as per the diagram below:

As the team is lacking experience with building automation flows, they decide to use GenAI to generate their command.
The goal is a fully functional, no-code operational workflow generated instantly from a single prompt. This outcome demonstrates how GenAI streamlines complex DevOps processes, making them more efficient and user-friendly.
Enable Content Generation Assistant in SAP Automation Pilot
Enable Content Generation Assistant in your SAP Automation Pilot instance to benefit from this feature (by default, this feature is not enabled.
To do so, you must have the GenAI role in your subaccount. For more information, see Permissions and Roles in the SAP Help Portal.
Follow the steps below to enable or disable the AI-based generation of commands, executors, inputs, and scheduled executions.
- From the sidebar navigation, choose Terms and Conditions.

- Enable the Content Generation Assistant by switching on the toggle button.

- Read and understand the terms and conditions for using the AI-based feature. Select the ‘I have read and understood the terms and conditions’ checkbox at the bottom of the pop-up to provide your consent.
- Choose "Accept".

With this, the Content Generation Assistant is enabled, and you can generate AI-based commands.

Prepare your Prompt
Since you have already enabled the Content Generation Assistant, let’s proceed to the next step: drafting your prompt.
All that is needed from the user is to prepare a prompt describing the scope of the desired automation flow. The entire ops automation flow is designed, and it will be delivered to you quickly and without code by the SAP Automation Pilot GenAI feature.
Business Scenario

For the automation required at Rotating Banana, the team came up with the following prompt:
I want a command that:
- Sends an HTTP request to a specified URL from the input key "appUrl" to verify the status of my application
- If the response body contains DOWN, restart the Cloud Foundry application using input keys prefixed with "app."
- Lastly, if the response body contains DOWN, it creates a Jira issue using input keys prefixed with "jira". Inputs for Jira server, user, and passwords will be provided as input keys. The project must be "CLMTEST" and the type "Bug" (replace CLMTEST with a valid input depending on your actual Jira project where the ticket shall be created). Do not add any labels and components. Within the Jira issue description, add only details about the output from the HTTP request, output the application status if the HTTP request response is DOWN - 'DOWN'; otherwise - 'UP'.
Generate the Ops Automation Flow
After you draft a prompt, see the GenAI feature in action.

As you notice, using the Content Generation Assistant is simple. All you need to do is:
- Navigate to the "Commands" section and click the "Generate" button.

- Choose in which catalog your ops automation command shall be stored and add a command name.
- Provide your input in a simple user's prompt describing the ops command you want generated.

- Click on the "Generate" button, and SAP Automation Pilot will generate the ops automation flow described, comprising all required activities.
Note

Caution
Once the inputs are created, reference them when running the command. For detailed guidance, consult the Managing Inputs documentation.
Business Scenario

Note
Executing the Ops Automation Flow
With the command generated and the required inputs created, it’s time to execute the automation flow and review the outputs.
1. Run the command.
Navigate to the command and trigger it, ensuring the input collections you created are appropriately referenced (see the following example).

2. Monitor its execution.
After execution, access the Execution Overview page for more insights.

Business Scenario

The Rotating Banana team has successfully triggered the execution of the required command. To check out the created Jira issue, the team can find the Jira ID of the created issue in the command Output by clicking on the "Show" link:

To check out the created Jira issue, the team can find the Jira ID of the created issue in the command Output by clicking on the "Show" link. The team can now consult the command output again to find the Jira ticket ID or the issue that has been created:

The team navigates to the created Jira ticket and checks that it contains all the required information about the outcome:

Hint
Enhance Available Ops Automation Flows with GenAI
You can also leverage the GenAI Assistant to enrich existing commands.
Business Scenario

The Rotating Banana team would like to enhance their previously created command by capturing more details in the Jira ticket. For this, they want to use the GenAI Assistant to design an additional executor to add technical insights as comments.
To achieve this:
- Access the Command Executors configuration section and click Generate.

- Provide a prompt for the GenAI to process.

Hint
See the prompt from the preceding screenshot as text:If the response body contains DOWN, add an initial comment to the Jira issue with information about the Cloud Foundry application name, app region, and app subaccount or which the check was executed. Inputs for the Jira server, user, and passwords are provided as input keys with the prefix "jira".
- Review the newly generated executor, which has been placed within your automation flow and mapped to the relevant input keys.

- Re-trigger the command and inspect the updated behavior.
Business Scenario

After enhancing the command and re-running it, the Rotating Banana team inspects the newly created Jira ticket:
This enhancement automatically captures in-depth technical information about the application, providing precise context and actionable data within the Jira ticket. These additional insights streamline the troubleshooting process by facilitating accurate application identification and expediting root cause analysis – reducing the overall ops efforts for the Rotating Banana team.
Summary
Within the current lesson, you have learned how to use GenAI of SAP Automation Pilot to get the following benefits:
- Accelerated onboarding to technical ops automation: simplifies the process of automating ops tasks by enabling users to create and utilize operational commands with less effort quickly
- Enhanced use cases: extending the scope of your ops automation by leveraging GenAI's understanding of programming languages and public APIs, making complex workflows more accessible and efficient