Google Sheets
Last updated
Last updated
Let's see how we can integrate Google Sheets as a data source for building rules in our application. This feature allows users to leverage data from Google Sheets to create and manage rules efficiently without manually writing extensive tons of rules that you were writing before.
This would come handy if you want to use huge data within your excel, google sheets and want to run any logic/workflow over it. This can also be useful if you want to do certain POC for some point of time over sample data exported to google sheets before running the rules/workflow directly over your database.
Access to the Nected Platform
A Google account with access to Google Sheets
Navigate to the data source integration section in the left navigation pane and Select the option to connect a new data source.
Click on "Sign in with Google".
Choose the appropriate Google account and Grant the application access to your Google Drive.
After granting access, test the connection to ensure it's established correctly and publish it in Staging or Production depending on testing needs. Confirm successful connection before proceeding.
Before you start using the google sheet in rules, you need to add a new data source to your Nected environment. Follow these steps:
Now, select the sheet you wish to use from the list of available sheets in your Google Drive. Ensure the sheet contains the data needed for your rules.
Optionally, indicate whether the first row in the sheet serves as a header.
Navigate to the rule creation section in the Nected. Click on “Add Rules” and select a rule from the drop down menu.
Then click on "Add Inputs Attributes" and go to option “Map with Data Source” .
Select the Dataset from the drop down menu.
Fill in the required details and click on Save & Close.
Note: Ensure to map only one or two primary or unique key for efficient data retrieval. Rest of the data would automatically be fetched based on these primary keys
After defining input attributes, navigate to the "Property" tab.
In the dropdown menu, under "Input Attributes," you will find a list of attributes. These attributes have been mapped with sheet attributes on previous “Map with Data Source” step.
Define the conditions under which the rule should trigger and Use the mapped input parameters to set these conditions.
Optionally, set default values for certain conditions and Define fallback scenarios in case the primary conditions are not met.
Enter input attributes to test the rule.
Ensure these parameters correspond to the data in your Google Sheet.
Execute the test and Review the output to verify that the rule works as expected.
Triggering a Gsheet as a action in Nected involves a series of steps. Here's a simplified guide on how to trigger a Gsheet as a rule action, assuming that you have already completed the Gsheet integration and rule creation steps:
Select the Gsheet Operation: Nected provides you with 2 options i.e Add Single Row and Update Rows which includes inserting new records or updating existing records, respectively.
Configure the Operation Details:
For Add Operation: Select the spreadsheet by clicking on add sheet. Now choose a worksheet present from the selected spreadsheet . Addtionally define whether your first row in sheet serves as headers or not.
Test the Rule: Please refer Test & Publish Rules
Error: Dataset not published.
Solution: Please publish the dataset associated with this rule before attempting to publish the rule itself.
Navigate to the Data Sources section in the left navigation panel ,click on “+Create Data Source” and select the Google sheet option from the drop down menu.
Access the Rule Configuration: Navigate to the rule you have created within Nected. This is where you will specify the Gsheet operation you want to trigger as an action.
For Update Operation: Simply follow the steps we performed in add operation.