Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions labs/Connectors/Gemini/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,28 @@ To configure the Vertex AI connection, perform the following steps
![alt text](images/ConnectorCreation1.png)

2. Create the connection according to the information in the following screenshots:

![alt text](images/ConnectorCreation2.png)

BaseURL will be: `https://<your region>-aiplatform.googleapis.com/`
![alt text](images/ConnectorCreation3.png)
Note: The hostname is https://yourregion-aiplatform.googleapis.com/
![alt text](images/ConnectorCreation4.png)
![alt text](images/ConnectorCreation5.png)

3. With the Connection created, let's create our integration flow
1. With the Connection created, let's create our integration flow

Go back to the integration, and click "Configure Connector" again.

Choose the newly created Vertex connection
![alt text](images/ConnectorCreation6.png)

Configure the connection as per the follwoing screenshot:

![alt text](images/ConnectorCreation7.png)

Back in the integration canvas, drag and drop an API trigger and a "Data Mapping" task into the canvas, and connect them, and change the connector taskname to "InvokeGemini"

![alt text](images/IntegrationCreation1.png)

4. Configure the Data Mapper
Expand Down Expand Up @@ -95,7 +100,11 @@ Exit the data mapper
In the integration flow canvas, create a variable called "Output". It will hold the output from Gemini and return the output back to the caller of the integration
![alt text](images/CreateIntegration6.png)

To parse Gemini's response, we will use the "Data Transformer" task. Drag and drop a "Data Transformer" task and connect it at the end.
To parse Gemini's response, we will use the "Data Transformer" task.

Drag and drop a "Data Transformer" task and connect it at the end.

![alt text](images/CreateIntegration6a.png)

Open the "Data Transformer" task, click "Script" at the top-right corner, delete the existing script, and paste the following:

Expand Down
Binary file modified labs/Connectors/Gemini/images/ConnectorCreation2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified labs/Connectors/Gemini/images/ConnectorCreation7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified labs/Connectors/Gemini/images/FinalIntegration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified labs/Connectors/Gemini/images/IntegrationCreation1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions labs/Connectors/webhook-trigger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In this demo, we will use the Webhook Connector to trigger an integration.
2. In the navigation menu, click Integrations. The Integrations List page appears listing all the integrations available in the Google Cloud project.
3. Select an existing integration or click Create integration to create a new one. If you are creating a new integration:
1. Enter a name `<prefix>-webhook-trigger` and description in the Create Integration pane
2. Select a region for the integration
2. Select a region for the integration, if asked.
3. Click Create
4. This opens the integration in the integration editor
5. In the integration editor navigation bar, click Triggers to view the list of available triggers
Expand Down Expand Up @@ -50,7 +50,7 @@ To configure the Webhook trigger using a new Webhook connection, perform the fol
6. With the Connection created, let's provide the following configuration details in the Connector Event Trigger Editor page:
1. **Region:** Select the region of your Webhook connection.
2. **Connection:** Select the Webhook connection that you want to use. Application Integration only displays those Webhook connections that are active and have an event [subscription](https://cloud.google.com/integration-connectors/docs/eventsubscription) enabled.
3. **Event subscription type:** Enter the type of event that you want to use to trigger the integration. Type `issues`
3. **Custom Event type ID:** Enter the type of event that you want to use to trigger the integration. Type `issues`
4. **Service Account:** Select a service account with the [required IAM roles](https://cloud.google.com/application-integration/docs/configure-webhook-trigger#iam) for the Webhook trigger.
5. Press Done.

Expand All @@ -71,9 +71,11 @@ To configure the Webhook trigger using a new Webhook connection, perform the fol

8. Publish the Integration. Use curl to test it
```sh
export URL=https://<your service URL>

curl -X POST \
-H "X-GitHub-Event: issues" \
https://YOUR_EVENT_LISTENER_URL \
"$URL" \
-d '{"event_type" : "issue created"}'
```

Expand Down
21 changes: 14 additions & 7 deletions labs/IntegrationCore/data-manipulation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In this lab, we will explore different ways of handling the response and mashing
1. Login to your GCP console, select your GCP project
2. Enable the Google Maps API. Set the PROJECT_ID env variable
```sh
export PROJECT_ID=<project>
export PROJECT_ID=$(gcloud config get-value project)
gcloud services enable \
--project "$PROJECT_ID" \
"elevation-backend.googleapis.com" \
Expand Down Expand Up @@ -174,11 +174,16 @@ Now let’s try using the Cloud Functions Task

**NOTE:** DO NOT update the TriggerURL Parameter

| Parameter 1 | Parameter 2 |
|-------------|-------------|
| Key: **elevation** | Key: **geocode** |
| Type: **String** | Type: **String** |
| Value: **responseBody (Elevation API)** | Value: **responseBody (Geocoding API)** |
| Parameter 1 | Parameter 2 |
| -------------------------------- | -------------------------------- |
| Key: **elevation** | Key: **geocode** |
| Type: **String** | Type: **String** |
| Value: Click variable and choose | Value: Click Variable and choose |
| ![alt text](images/image.png) | ![alt text](images/image-1.png) |
| ![alt text](images/image-3.png) | ![alt text](images/image-2.png) |


Result should look like this:

![alt text](images/CloudFunctions.png)

Expand Down Expand Up @@ -214,4 +219,6 @@ Now let’s try using the Cloud Functions Task

![alt text](images/CloudFunctions2.png)

10. Click Publish and Test the integration
10. Delete the Data Transfomer Task
11. Click Publish and Test the integration

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion labs/IntegrationCore/error-catcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For this lab, we will create a Pub/Sub topic

```sh
export PREFIX=<prefix>
export PROJECT_ID=<project>
export PROJECT_ID=$(gcloud config get-value project)
export REGION=<region>
```

Expand Down
13 changes: 10 additions & 3 deletions labs/IntegrationCore/pub-sub-trigger-mapping-logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ Create a new integration by performing the following steps:
2. In the navigation menu, click Integrations. The Integrations List page appears.
3. Click **Create** integration.
4. Enter a name and description in the Create Integration dialog. For example, `<prefix>-integration`. Replace the prefix with an appropriate value similar to the prefix you used in the above step while creating the Topic
5. Select a region for the integration
5. Select a region for the integration, if asked.
6. Click Create to open the integration editor
7. Enable logs to be sent to cloud logging by clicking on the gear icon ![alt text](images/gear_icon.png) at the top-right of the integration and a menu with integration details should appear as in the below screenshot
7. Enable logs to be sent to cloud logging by clicking on the gear icon ![alt text](images/gear_icon.png) at the top-right of the integration and a menu with integration details should appear as in the below screenshot.
![alt text](images/enable-cloud-logging.png)
8. Drag the slider to the right to Enable Cloud Logging (to send Execution Logs to Cloud Logging)

## Create and Configure a Cloud Pub/Sub trigger
Expand Down Expand Up @@ -78,11 +79,14 @@ To add a Cloud Pub/Sub trigger to the integration, follow the steps below:
- Click TO_STRING() to transform the data type of the variable from double to string
- Click the second row in the Output column to create a new variable to hold the value of the transformed data. Complete the following fields:
- Name: `prefix-TempinCelsiusString`
- Blank default value means: Select : ”Empty String”
- Within the Variable Type drop-down select the “Output from Integration” option
- Blank default value means: Select : ”Empty String”
- Click Create to create the variable and close the pane. The new variable will appear in the Variables list on the left side of the data mapping editor
- Confirm your data mapping is as below and exit by clicking the `<-` button on the top left
![alt text](images/datamapping2.png)
2. Click the back button to go back to the integration editor

![alt text](images/back-to-int-editor.png)

## Creating a Send Email task

Expand All @@ -94,6 +98,9 @@ To configure the Send Email task:
1. To Recipient(s): Enter your email address. You will use this email to confirm the successful completion of the integration.
2. Subject: Enter Temperature in Celsius.
3. Body in Plain Text: Select the prefix-TempInCelsiusString variable created earlier in the Data Mapping task.

![alt text](images/TempInCelsiusString-var.png)

4. The remaining options can be left in the default configuration.

Add the required edge connections
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions labs/ProductionReadiness/IntegrationCLI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ Click on "Cloud Shell" on the top right corner of the browser tab, which opens c

Run the following commands in Cloud Shell:

```

curl -L https://raw.githubusercontent.com/GoogleCloudPlatform/application-integration-management-toolkit/main/downloadLatest.sh | sh -
```sh
curl -L https://raw.githubusercontent.com/GoogleCloudPlatform/application-integration-management-toolkit/main/downloadLatest.sh | sh -

export PATH=$PATH:$HOME/.integrationcli/bin
export PROJECT_ID=$(gcloud config get-value project)
export PATH=$PATH:$HOME/.integrationcli/bin

integrationcli --version
integrationcli --version

token=$(gcloud auth print-access-token)
token=$(gcloud auth print-access-token)

project=<your_project_id>
project=$PROJECT_ID

region=<region_in_which_you_configured_Application_Integration>
region=<region_in_which_you_configured_Application_Integration>

integrationcli prefs set -p $project -r $region -t $token
integrationcli prefs set -p $project -r $region -t $token
```

Your outputs should be as seen in the screenshot below:
Expand Down