Friendly reminder about, you must have enabled Lambda functions in your Gridly account to use this integration.
To enable an API for your project:
- Go to the API Console.
- From the projects list, select a project or create a new one.
- If the APIs & services page isn't already open, open the console left side menu and select APIs & services, and then select Library.
- Click the API you want to enable. If you need help finding the API, use the search field.
- Click ENABLE.
Note: The process of enabling an API varies depending on the API. Some APIs will prompt you to accept their Terms of Service before you can enable them. Some APIs are in preview mode, meaning that they require special signup and whitelisting before you can use them. Others might ask for additional information, such as your organization's contact information and the name of the application you are developing. When more information is requested, it will not be shared outside of Google; it's used to help Google understand how the API is being used and as a secondary contact should we need to contact you regarding your use of the service.
A Google Cloud project is required to use Google Workspace APIs and build Google Workspace add-ons or apps. This project forms the basis for creating, enabling, and using all Google Cloud services, including managing APIs, enabling billing, adding and removing collaborators, and managing permissions.
To create a Google Cloud project:
- Open the Google Cloud Console.
- At the top-left, click Menu menu > IAM & Admin > Create a Project.
- In the Project Name field, enter a descriptive name for your project. Optional: To edit the Project ID, click Edit. The project ID can't be changed after the project is created, so choose an ID that meets your needs for the lifetime of the project.
- In the Location field, click Browse to display potential locations for your project. Then, click Select. Caution: Can't find your Google Workspace organization? This means you aren't signed in to a Google Workspace account. Some of the features described in Google Workspace developer documentation are only available to projects associated with an organization.
- Click Create. The console navigates to the Dashboard page and your project is created within a few minutes.
For further information on Google Cloud projects, refer to Creating and managing projects.
A service account is a special kind of account used by an application, rather than a person. You can use a service account to access data or perform actions by the robot account itself, or to access data on behalf of Google Workspace or Cloud Identity users. For more details, refer to Understanding service accounts.
- Open the Google Cloud Console.
- At the top-left, click Menu menu > IAM & Admin > Service Accounts.
- Click Create service account.
- Fill in the service account details, then click Create and continue. Note: By default, Google creates a unique service account ID. If you would like to change the ID, modify the ID in the service account ID field.
- Optional: Assign roles to your service account to grant access to your Google Cloud project's resources. For more details, refer to Granting, changing, and revoking access to resources.
- Click Continue.
- Optional: Enter users or groups that can manage and perform actions with this service account. For more details, refer to Managing service account impersonation.
- Click Done.
You must obtain credentials in the form of a public/private key pair. These credentials are used by your code to authorize service account actions within your app.
To obtain credentials for your service account:
- Open the Google Cloud Console.
- At the top-left, click Menu menu > IAM & Admin > Service Accounts.
- Select your service account.
- Click Keys > Add keys > Create new key.
- Select JSON, then click Create. Your new public/private key pair is generated and downloaded to your machine as a new file. This file is the only copy of this key. For information about how to store your key securely, see Managing service account keys.
- Click Close.
Share the folder with the e-mail address you received for your service user.
You can use a blank Grid, because if you have a true in the "synchColumns", it will generate the columns automatically, but it is mandatory to have an enabled Record ID and Path columns.
- Download or clone the files from git
- Install the required dependecies with pip by using the following command:
pip install -r requirements.txt -t . --no-user
Rename The JSON you downloaded from google API to “cred.json” and add it to the folder with the python files.
{
"gridlyApiKey":"yourGridlyAPIKEY",
"spreadSheetName":"theNameOfTheSpreadsheetYouWantToImport",
"viewId":"${view.id}",
"synchColumns":"true",
"sheetUniqueIdColumn":0
}
You must set your gridly API key for the value of this item, because the data imported through the API.
You must set the name of the sheet you would like to connect to your Grid.
This is a placeholder in the payload, you don’t have to change it’s value.
You can set “synchColumns” “true” and “false”, if you have set to true, the script will create the columns from your spreadsheet, and delete the columns that aren’t in your spreadsheet. If it is set as “false”, the script won’t touch the columns.
Here you can define the index of the unique ID column of your spreadsheet.