Build integrations with Gemini Code Assist

Gemini Code Assist is an AI-powered collaborator in Google Cloud that provides help to users of all skill levels where they need it. In Application Integration, Gemini Code Assist can assist you to do the following:

For detailed information about Gemini for Google Cloud, seeGemini for Google Cloud overview.

Before you begin

  1. In the Google Cloud console, go to theApplication Integration page.

    Go to Application Integration

    The following image shows the Application Integration page:

    Enable Gemini in Application IntegrationEnable Gemini in Application Integration

    1. In theGet AI to build your integrations section, clickExplore.
    2. In theGemini in Application Integration pane that appears, clickEnable Service to enable the Gemini for Google Cloud API.

      For information about activating Gemini Code Assist in a Google Cloud project, seeSet up Gemini Code Assist for a project.

  2. Set up Application Integration in your Google Cloud project. For more information, seeSet up Application Integration.
  3. If you plan to create an integration usingconnectors, ensure to configure the desired connections in your Google Cloud project.
  4. If you plan to create an integration usingApigee API Hub APIs that are in a host project, ensure that you haveprovisioned the API Hub in your project and that the Application Integration service account has therequired role to access the APIs in the other project.
Note: Gemini provides connector- and API Hub-based recommendations or suggestions for your integrations using the configured connections inIntegration Connectors and APIs inApigee API Hub. If you don't have any connections or APIs configured in your project, then Gemini might not provide connector- and API-based recommendations or suggestions.

Required roles

Supported tasks and triggers

Gemini can assist you to add the following tasks and triggers:
TriggersTasks

Gemini also assists you to create the following control flow tasks but can't generate sub-integrations:

Create an integration

Gemini assists you to create and build integrations using your natural language statements (orprompts) as input. This allows you to create and build simple to complex integrations quickly and with minimal manual configurations.

Provide Gemini a brief prompt or description of the integration flow that you intent to build and Gemini will suggest one or more integration flows to help you get started.

To build an integration using Gemini, perform the following steps:

  1. In the Google Cloud console, go to theApplication Integration page.

    Go to Application Integration

  2. ClicksparkHelp me create. TheCreate Integration with Gemini pane appears.

    Alternatively, on theCreate Integration page,create a new integration and then on theintegration editor, clickpen_sparkCreate integration flows with Gemini to use Gemini.

  3. image showing Gemini icon in the navigation barimage showing Gemini icon in the navigation bar

    1. If you want to select a prompt template, select one from theSample prompt templates. Otherwise, enter a prompt for Gemini to generate integrations. To learn how to write better prompts, seeWrite better prompts.

      For example, suppose you added the following prompt:Create an integration which fetches a jira issue and then creates the zendesk ticket.

    2. ClickGenerate.Note: Gemini suggests one or more integration flows that qualifies your prompt:

      The following diagram shows theCreate an integration with Gemini pane with the suggestions provided by Gemini:

      Gemini create integration suggestionsGemini create integration suggestions

      Use thePrevious andNext buttons to view the suggestions provided.

    3. If you want to modify the suggested integration name, you can update theIntegration name field.Note: Integration name must be unique in the Google Cloud project.
    4. Select a region for the integration. If your project has a single provisioned region, then theRegion field is set to that region.Note: TheRegion list shows the regions provisioned in your Google Cloud project. To provision a new region, ClickEnable Region. SeeEnable new region for more information.
    5. If you want to edit the prompt, clickEdit Prompt.
    6. To accept an integration flow suggestion, clickConfirm. Application Integration shows the progress of the steps for creating the integration. Integrations created using Gemini replaces any existing integration elements and variables.

      Gemini create integration loaderGemini create integration loader

Contextual recommendations

You can use Gemini to provide contextual recommendations for your existing integrations. Gemini can assist you to provide contextually appropriate connector configuration recommendations based on the logical flow of your existing integration. If a connection in your integration has more than 1000 entities, then that connector isn't included in the recommendations by Gemini. For more limitations, seeLimitations.

Configure connector tasks

Gemini can assist you to provide contextually appropriate connector configuration recommendations based on the logical flow of your existing integration. If a connection in your integration has more than 1000 entities, then that connector isn't included in the recommendations by Gemini. For more limitations, seeLimitations.

You can configure connector configuration with the Gemini recommended replacements, or you can interact with Gemini (usingprompts) and ask for the desired configuration suggestions.

To configure a connector task in your integration using Gemini, perform the following steps:

  1. In the Google Cloud console, go to theApplication Integration page.

    Go to Application Integration

  2. In the navigation menu, clickIntegrations.

    TheIntegrations page appears listing all the integrations available in the Google Cloud project.

  3. Select an existing integration to open it in theintegration editor.
  4. In the navigation bar, click theNew canvas view (Preview) toggle to the on position. Then, use the canvas to create your integration workflow.
  5. For a connector task, clickMore actions and then clickConfigure task.

    A pop-up menu, similar to the following image, appears displaying a set of Gemini recommendations.Note: Gemini can recommend connectors task for Call REST endpoint tasks and vice-versa.

    image showing Gemini pop-up menuimage showing Gemini pop-up menu

  6. Gemini automatically recommends one or more replacements or alternatives relevant to the logical flow of your integration. You can use the prompt input to interact with Gemini and fine-tune or re-generated the suggested recommendations if desired.

  7. Select any one of the recommended replacements or modifications to accept. Gemini configures the selected connector task.

Configure Call REST API tasks

If you have API Hub enabled in your project, then Gemini in Application Integration can assist you in providing contextually appropriateCall REST Endpoint task and task configuration recommendations based on the logical flow of your existing integration. You can leverage these recommendations to directly replace your existing tasks or modify them without the need of going through any manual configuration process.

You can either directly replace an existing task or a task configuration with the Gemini recommended replacements, or you can interact with Gemini (usingprompts) and ask for the desired task suggestions.

After you have met allprerequisites, to replace or modify an existing task in your integration using Gemini, perform the following steps:

  1. In the Google Cloud console, go to theApplication Integration page.

    Go to Application Integration

  2. In the navigation menu, clickIntegrations.

    TheIntegrations page appears listing all the integrations available in the Google Cloud project.

  3. Select an existing integration to open it in theintegration editor.
  4. In the navigation bar, click theNew canvas view (Preview) toggle to the on position. Then, use the canvas to create your integration workflow.
  5. In theintegration editor canvas, select the task that you want to replace or modify.
  6. ClickMore actions and then clickConfigure task.

    A pop-up menu, similar to the following image, appears displaying a set of Gemini recommendations.Note: Gemini can recommend connectors task for Call REST endpoint tasks and vice-versa.

    image showing Gemini pop-up menuimage showing Gemini pop-up menu

  7. Gemini automatically recommends one or more replacements or alternatives relevant to the logical flow of your integration. You can use the prompt input to interact with Gemini and fine-tune or re-generated the suggested recommendations if desired.

  8. Simply select any one of the recommended replacements or modifications to accept.

    Gemini directly replaces your selected task or modifies it without any additional configurations.

Add edge conditions and append additional tasks

You can use Gemini to append new tasks and to addedge conditions to your existing integration flow.

To add an edge condition or to append new tasks to your integration using Gemini, perform the following steps:

  1. In the Google Cloud, go to theApplication Integration page.

    Go to Application Integration

  2. In the navigation menu, clickIntegrations.

    TheIntegrations page appears listing all the integrations available in the Google Cloud project.

  3. Select an existing integration to open it in theintegration editor.
  4. In the navigation bar, click theNew canvas view (Preview) toggle to the on position. Then, use the canvas to create your integration workflow.
  5. In theintegration editor, select theedge for which you want to add the edge condition or from which you want to append a new task.
  6. ClickMore actions and then clickCreate branch.

    A pop-up menu, similar to the following image, appears prompting you to provide an input.

    image showing Gemini pop-up menuimage showing Gemini pop-up menu

  7. Enter your prompt specifying the edge condition that you want to add or the additional task that you want to append.

    Here is a sample prompt that you can use:

          If order qty>100, send an email
    To learn how to write better prompts, seeWrite better prompts.

  8. Click pen_sparkCreate.
  9. Gemini automatically inserts the qualified edge conditions and configures the additional tasks from the selected edge in your existing integration.

  10. ClickConfirm to accept the sugessted insertions and additions.

    If you din't like the suggested inserts or additions, clickCancel .

Configure JavaScript tasks

Preview

This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.

You can use Gemini to configureJavaScript tasks in your integration. Gemini can assist you in providing contextually appropriate JavaScript task configuration recommendations based on the logical flow of your existing integration. You can leverage these recommendations to directly replace your existing tasks or modify them without the need of going through any manual configuration process.

Add a JavaScript task

The JavaScript task lets you write custom JavaScript code snippets for your integration. To add the code snippets using Gemini, follow these steps:

  1. In the Google Cloud, go to theApplication Integration page.

    Go to Application Integration

  2. In the navigation menu, clickIntegrations.

    TheIntegrations page appears listing all the integrations available in the Google Cloud project.

  3. Create an integration or select an existing integration to open it in theintegration editor.
  4. Click and place theJavaScript element in the integration editor.
  5. Click theJavaScript element on the canvas to view theJavaScript task configuration pane.
  6. ClicksparkScript with Gemini. TheScript with Gemini pane opens. Then, do the following:
    1. If you want to select a prompt template, select one from theSample prompt templates. Otherwise, enter a prompt for Gemini to generate the JavaScript code. To learn how to write better prompts, seeWrite better prompts.

      Suppose that you want to process a customer order. Your intgeration contains thecustomer anditem variables. To create an order, you can enter a prompt similar to the following:

      Create order using customer and items.

      add prompt to generate script using Geminiadd prompt to generate script using Gemini

    2. ClickGenerate.

      Gemini suggests one or more code snippets that qualifies your prompt. Use thePrevious andNext buttons to view the suggestions provided.

    3. To add the suggested code snippet to theJavaScript task, clickConfirm.The code snippet appears in theJavaScript editor field.

Edit a JavaScript task

The JavaScript task lets you write custom JavaScript code snippets for your integration. To add the code snippets using Gemini, follow these steps:

  1. In the Google Cloud, go to theApplication Integration page.

    Go to Application Integration

  2. In the navigation menu, clickIntegrations.

    TheIntegrations page appears listing all the integrations available in the Google Cloud project.

  3. Select an integration that contains theJavaScript task..
  4. Click and place theJavaScript element in the integration editor.
  5. Click theJavaScript element on the canvas to view theJavaScript task configuration pane.
  6. ClickOpen Script Editor. TheJavaScript Task Editor page appears.
  7. ClicksparkUse Gemini to edit and understand the script>Edit script. TheEdit script with Gemini pane appears. Then, do the following:
    1. If you want to select a prompt template, select one from theSample prompt templates. Otherwise, enter a prompt for Gemini to generate JavaScript code. To learn how to write better prompts, seeWrite better prompts.

      Suppose that you want to log in the order when the cost of the order is greater than 100. Then, you can enter a prompt similar to the following:

            Log in the order when the cost is greater than 100.

      edit prompt to generate script using Geminiedit prompt to generate script using Gemini

    2. ClickGenerate.

      Gemini suggests one or more code snipptes that qualifies your prompt. Use thePrevious andNext buttons to view the suggestions provided.

    3. To add the suggested updates to the code snippet into theJavaScript task, clickConfirm. The updated code snippet appears in theJavaScript editor field.

Understand the JavaScript task

Gemini can help you understand the code snippet in theJavaScript task. To do so, follow these steps:

  1. In the integration, click theJavaScript element on the canvas to view theJavaScript task configuration pane.
  2. In the task configuration pane, clickOpen script editor. TheScript editor pane appears. Then, do the following:
    1. Clickspark>info_sparkHelp me understand.

      If you want to understand a part of the code, you can select the part of the snippet that you want to understand and clickspark>info_sparkHelp me understand.

      TheGemini pane appears:

      help understand script using Geminihelp understand script using Gemini

    2. In theGemini pane, enter a prompt for Gemini to understand the code snippet. To learn how to write better prompts, seeWrite better prompts.

Generate integration description

The integration description feature available in Gemini in Application Integration provides a description summary of the integration that you've created in yourintegration editor. The integration description summary is generated in plain language and can help you in understanding the overall integration use case, underlying orchestration, and business context which might be difficult to assess due to the structure or complexity of an integration.

To generate an integration description summary of your integration using Gemini, perform the following steps:

  1. In the Google Cloud console, go to theApplication Integration page.

    Go to Application Integration

  2. In the navigation menu, clickIntegrations.

    TheIntegrations page appears listing all the integrations available in the Google Cloud project.

  3. Select an existing integration to open it in theintegration editor.
  4. In theintegration editor toolbar, and click (Integration summary). The integration details page appears.
  5. In the integration details page, clickHelp me with description.

    Gemini parses through the integration in yourintegration editor and generates a detailed summary description similar to the following image.

    image showing Gemini pop-up menuimage showing Gemini pop-up menu

  6. ClickDone to accept the generated integration description.

    Verify and validate the integration (including the variables) before running it.

Quotas and limits

For information about quotas and limits, seeQuotas and limits.

Limitations

Gemini in Application Integration is subject to the following limitations:

  • If the connection in your integration has more than 1000 entities, then that connector isn't included in the recommendations by Gemini.
  • Application Integration supports data residency. Integrations that are built using Gemini support data residency. We don't store any data such as prompts and Gemini responses. Only data in use and transit for generation using Gemini doesn't support data residency.

Provide feedback

You can get support or provide contextual feedback while using Gemini for building integration. This information helps us improve Gemini.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.