Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ ___

<iframe width="560" height="315" src="https://youtube.com/embed/YzdAWnOWqpw?si=awz7ANnzGV2j_P0b" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

### Why is the setup needed ?

Google Cloud Storage (GCS), BigQuery, and Google Sheets API setup is required for the below reasons:

- Store and retrieve chatbot data (including media files like images, PDFs, and audio).
- Analyze chatbot interactions using BigQuery.
___

**Google Cloud Storage (GCS) is a cloud-based service provided by Google Cloud Platform (GCP) that allows you to store and access data—such as files, images, videos, backups, and large datasets—on Google’s secure servers instead of on your local computer or server.**
**Google Cloud Storage (GCS) will be used for various purposes like storing data for reporting via BigQuery as well as for storing media files.**

### Prerequisites

Expand Down Expand Up @@ -116,6 +114,64 @@ This whole process of account information and payment information verification w

<img width="560" alt="image" src="https://github.com/user-attachments/assets/9576010a-f8dd-44e4-9be1-2d9bd23c8087" />

### GCS Setup with UPI (not mandatory, required only when the payment method is UPI.)

Step 1: Creating a GCS Account

- Navigate to the GCS registration portal.
- Click on 'Create New Account'.
<img width="624" alt="Screenshot 2025-03-31 at 9 28 01 PM" src="https://github.com/user-attachments/assets/766089d2-8b9a-4f7d-83b4-1d1c18d5d018" />

- Agree to the Terms of Service.
Step 2: Starting the Free Trial

- Click on 'Try for Free'.
<img width="629" alt="Screenshot 2025-03-31 at 9 28 43 PM" src="https://github.com/user-attachments/assets/94d0c0a3-819e-4f80-9b21-bfa6c160d991" />

- Note that this is a trial account with USD 300 in benefits.

Step 3: Selecting Country

- Choose your country from the dropdown and selection “Agree & continue”
<img width="627" alt="Screenshot 2025-03-31 at 9 28 59 PM" src="https://github.com/user-attachments/assets/f314f437-3a26-4551-9c68-6655b4193462" />

Step 4: Selecting Payment Profile

- Choose an existing payment profile or create a new one.
<img width="623" alt="Screenshot 2025-03-31 at 9 29 15 PM" src="https://github.com/user-attachments/assets/030d8510-58c7-48cd-8567-4e63f9ed7e7a" />

Step 5: Filling Out Payment Form

- Enter the required billing details in the form.
<img width="624" alt="Screenshot 2025-03-31 at 9 29 30 PM" src="https://github.com/user-attachments/assets/49960d7d-05f8-4638-a8ed-d8d76468518b" />

Step 6: Choosing Payment Method

- Click on Add payment method.
<img width="592" alt="Screenshot 2025-03-31 at 9 29 43 PM" src="https://github.com/user-attachments/assets/2d701226-2f3b-472b-a956-ea6b86209138" />

In the payment method screen shown here, Choose the UPI QR code option for payment. You can alternatively choose Credit Card or Net banking as well.

<img width="613" alt="Screenshot 2025-03-31 at 9 30 02 PM" src="https://github.com/user-attachments/assets/afa0772d-7339-4327-82e5-5ce44fe15fc2" />

- Highlight: The Reserve Bank of India (RBI) requirement for mandate approval.

Step 7: Selecting UPI QR Code

- Use your phone (UPI app) to make the payment after scanning the QR code.
<img width="621" alt="Screenshot 2025-03-31 at 9 30 16 PM" src="https://github.com/user-attachments/assets/aaa2b627-692b-4517-bbe6-1d0be8d0dcbb" />

Step 8: Completing Welcome Form

<img width="624" alt="Screenshot 2025-03-31 at 9 30 41 PM" src="https://github.com/user-attachments/assets/76c2107d-3fe0-4e44-8c5d-4a95e1ad9295" />

The screen changes once the payment is completed and a welcome form appears after payment confirmation.

Step 9: Verifying Credits

<img width="624" alt="Screenshot 2025-03-31 at 9 30 55 PM" src="https://github.com/user-attachments/assets/4a47237f-1afb-423a-b128-01bbb890f638" />

The account dashboard shows the credited USD 300 trial funds.

### Step 3: Enable Required APIs

Expand Down Expand Up @@ -208,7 +264,7 @@ ___
The JSON key is what authenticates Glific to access your data.


## Integrate Google Cloud Storage with Glific
### Integrate Google Cloud Storage with Glific

1. Open the Glific account and click on the NGO main account button (bottom left corner), then go to Settings and
select Google Cloud Storage.
Expand All @@ -218,15 +274,65 @@ select Google Cloud Storage.

4. Enter the bucket name (you can find it in Google Cloud Console > Cloud Storage > Buckets).

## Integrate BigQuery API with Glific
### Integrate BigQuery API with Glific

1. Open BigQuery from the left panel in Glific.

2. Enable the active box and paste the copied JSON content into the Goth Credentials field. Click Save.

## Integrate Google Sheets API with Glific
### Integrate Google Sheets API with Glific

1. Open Google Sheets from the left panel in Glific.

2. Enable the active box and paste the copied JSON content into the Goth Credentials field. Click Save.

### What's the reason for setting the GCS bucket to public?

The `GCS (Google Cloud Storage)` bucket is set to public to make it easier to share files—like PDFs, images, videos etc — without needing user authentication.

This is especially useful when files need to be accessed directly through chatbot flows or shared publicly with partners and beneficiaries.
When a file is public, anyone with the link can open or download it without logging in. This avoids errors or delays caused by restricted access.

Example:

If an NGO’s bot sends a PDF through a the chatbot, and the file is stored in a public bucket, the end user can simply tap the link and view it — no login or permission required.
Note: Only non-sensitive, public-facing files should be stored in the public bucket. Private or personal data should always be stored securely with proper access controls.

### Is it possible to keep my GCS bucket private instead of making it public?

It's perfectly fine to keep your `GCS bucket` private as long as you don't plan to share any content publicly.

However, if you need to send media as attachments (instead of sharing via links), the bucket would need to be public for access.

Also, just to clarify — `BigQuery tables` and `GCS buckets` serve different purposes.

- BigQuery tables are used to store structured data (like databases).
- GCS buckets are used to store media files such as images, audio, and documents.

### Assign access to the Service Account in Google Console

- Go to [Google Cloud Console](https://console.cloud.google.com) and sign in with your Gsuite account.

![image](https://user-images.githubusercontent.com/32592458/212658353-8fed1d92-2e9d-4a9f-99c9-a359dc08698f.png)

- Click on `IAM & Admin` and select `Service Accounts`.

<img width="1467" alt="image" src="https://github.com/user-attachments/assets/4864bf84-2ab1-44f5-957c-f80c62dc3ead"/>

<img width="1464" alt="image" src="https://github.com/user-attachments/assets/bcb9735b-088a-4a8f-abce-f382e081b720"/>

- Access the created `Service Account` and go to `Permissions`.

<img width="1282" alt="image" src="https://github.com/user-attachments/assets/3205a3b3-504b-4ff8-b9af-3870d8f2cc18"/>

- Click on Grant Access, select `New Principal`, enter the desired email address (e.g., [email protected]), and assign the role as `Owner`.

<img width="1308" alt="image" src="https://github.com/user-attachments/assets/b6ddcaee-8e5f-4b79-94e1-19a877d9a44e"/>

- Click `Save`.

### Reference Articles

- [GCS Pricing Details](https://cloud.google.com/storage/pricing)

- [Google Help Docs](https://cloud.google.com/storage/docs/quickstart-console)