wbb-spreadsheet-integration
v0.0.3
Published
This project allows you to easily integrate with Google Spreadsheet to fetch and store information in a google sheet.
Downloads
3
Readme
WBB Spreadsheet Integration
This project allows you to easily integrate with Google Spreadsheet to fetch and store information in a google sheet.
Setup
To use this integration you will need a GCP Service Account. This allows the service account to read and write to spreedsheats. You will also need to have Google Sheets API
enabled.
Blocks Provided
This integration provides the following blocks under the topic of Google-Spreadsheet
.
- Save to Google Sheets - Pre-defined function block to start using save-data handler
- Fetch from Google Sheets - Pre-defined function block to start using get-data handler
- No Credentials set - when the required settings have not been provided.
- No Spreadsheet ID Set - when the required settings have not been provided.
- No Key Column Name Set - when the required settings have not been provided.
- No Value Property Name Set - when the required settings have not been provided.
- No Return String Set - when the required settings have not been provided.
Handler Names
The following handler names and their functions are available :
| Handler Name | Purpose | | ------------ | ---------------------------------------------------------------------------------- | | save-data | It will save data to a spreadsheet from any form attached with this function block | | get-data | Return form values from a spreadsheet based on a give parameter |
Configuration Options
Within the function there are a number of options that can be set to configure the behaviour of the integration. The tables below show the settings that are available for each handler.
save-data
| Property | Required | Description |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| credentials.clientEmail | true | The client_email
property copied from JSON Service Account credentials for an account that has access to google spreadsheet. |
| credentials.privateKey | true | The private_key
property copied from JSON Service Account credentials for an account that has access to google spreadsheet. |
| spreadsheetID | true | A spreadsheetID is the long id in the sheets URL. |
| confirmationBlock | true | The block to send the user to after completing the form. |
| saveUserId | false | Set param to true if you want to save user _id alongside other data. |
get-data
| Property | Required | Description |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| credentials.clientEmail | true | The client_email
property copied from JSON Service Account credentials for an account that has access to google spreadsheet. |
| credentials.privateKey | true | The private_key
property copied from JSON Service Account credentials for an account that has access to google spreadsheet. |
| spreadsheetID | true | A spreadsheetID is the long id in the sheets URL. |
| sheetIndex | false | The index of the tab to fetch data from. Index starts at zero. |
| keyColumnName | true | Column name from the spreadsheet that form value will be matched against |
| valuePropertyName | true | Form question title name which value will be used to match the requested row |
| returnString | true | Text user will be sent after the right row is matched with other form values, e.g. Your order number, %%orderNumber%% will be delivered on %%expectedDeliveryDate%%
. |
| notFoundDataBlock | true | The block to send the user if no data is found. |