Jitterbit Harmony Google Sheets Update Sheets Activity¶
Introduction¶
A Google Sheets update sheets activity updates a spreadsheet at a Google Sheets connection and is used as a target in an operation. After configuring a Google Sheets connection, you can configure as many Google Sheets activities as you like for each Google Sheets connection.
Create a Google Sheets Activity¶
An instance of an activity is created from a connection using an activity type.
To create an instance of an activity, drag the activity type to the design canvas or copy the activity type and paste it on the design canvas. For details, see Creating an Activity Instance in Component Reuse.
An existing activity can be edited from these locations:
- The design canvas (see Component Actions Menu in Design Canvas).
- The project pane's Components tab (see Component Actions Menu in Project Pane Components Tab).
Accessing Menu Actions¶
Menu actions for an activity are accessible from the project pane and the design canvas. For details, see Activity Actions Menu in Connector Basics.
Configure a Google Sheets Update Sheets Activity¶
Follow these steps to configure a Google Sheets update sheets activity:
Step 1: Enter Basic Information¶
Tip
Fields with a variable icon support using global variables, project variables, and Jitterbit variables. Begin typing an open square bracket
[
into the field or click the variable icon to display existing variables to choose from.
-
Name: Enter a name to use to identify the Google Sheets update sheets activity. The name must be unique for each update sheets activity and must not contain forward slashes (
/
) or colons (:
). -
Number of Columns: Enter the number of columns to be used when creating the spreadsheet (optional); if not provided, the default value of 26 is used.
-
Continue on Error: Select to continue the activity execution if an error is encountered for a dataset in a batch request. If any errors are encountered, they are written to the operation log.
-
Save & Exit: If enabled, click to save the configuration for this step and close the activity configuration.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard Changes: After making changes, click Discard Changes to close the configuration without saving changes made to any step. A message will ask you to confirm that you want to discard changes.
Step 2: Review Data Schema¶
-
Data Schema: The request and response data schemas from Google Sheets will be displayed. If the operation uses a transformation, the data schemas will be displayed again later during the transformation mapping process, where you can map to target fields using source objects, scripts, variables, custom values, and more.
The Google Sheets connector uses the Google Sheets API v4. Refer to the API documentation for information on the schema fields and practices for manipulating Google Sheets.
-
Request:
Request Schema Field/Node Google API Field/Method, type Notes updateSheetsRequest spreadsheets.update Request to update a spreadsheet spreadsheetId spreadsheetId ID of the spreadsheet to be updated title title Sheet title request node Each request is one of findReplaceRequest, addSheetRequest, updateSheetRequest, deleteSheetRequest, deleteCellRequest, or updateCellRequest findReplaceRequest FindReplaceRequest Finds and replaces data in cells over a range, sheet, or all sheets find String The value to search replacement String The value to use as the replacement matchCase Boolean True if the search is case sensitive searchByRegex Boolean True if the find value is a regex. The regular expression and replacement should follow Java regex rules. matchEntireCell Boolean True if the find value should match the entire cell includeFormulas Boolean True if the search should include cells with formulas. False to skip cells with formulas. unionFields node Union field scope: The scope over which to find/replace; one of SheetID, allSheets, or gridRange must be set -
Response:
Response Schema Field/Node Google API Field Notes updateSheetsResponse n/a Response from creating the spreadsheet spreadsheetId spreadsheetId ID of the newly-updated spreadsheet sheets n/a Node representing the spreadsheet properties n/a Node representing the properties returned code n/a Error code returned (if any) message n/a Message returned upon creation (if any)
-
-
Add Plugin(s): Plugins are Jitterbit- or user-provided applications that extend Harmony's native capabilities. To apply a plugin to the activity, click to expand this section and select the checkbox next to the plugin to be used. For additional instructions on using plugins, including details on setting any required variables used by the plugin, see Plugins Added to an Activity.
-
Refresh: Click the refresh icon
or the word Refresh to regenerate schemas from the endpoint. This action also regenerates the schema in other locations throughout the project where the same schema is referenced, such as in an adjacent transformation.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Finished: Click to save the configuration for all steps and close the activity configuration.
-
Discard Changes: After making changes, click Discard Changes to close the configuration without saving changes made to any step. A message will ask you to confirm that you want to discard changes.
Next Steps¶
After configuring a Google Sheets update sheets activity, complete the configuration of the operation by adding and configuring other activities, transformations, or scripts as operation steps. You can also configure an operation's operation settings, which include the ability to chain operations together that are in the same or different workflows.
Google Sheets update sheets activities can be used as a target with these operation patterns: - Transformation Pattern - Two-transformation Pattern (as the first or second target)
Other patterns are not valid using Google Sheets update sheets activities. See the validation patterns on the Operation Validity page.
A typical use case is to use a Google Sheets Update activity in the Two-transformation Pattern. In this example, the first transformation (Update Sheets Request) creates a request structure that is passed to the Google Sheets Update activity. The second transformation (Update Sheets Response) receives the response structure, which is then written to a variable by a Variable Write activity (Write Update Sheets Response) and a message is then logged by the Write to Operation Log script:
To use the activity with scripting functions, write the data to a temporary location and then use that temporary location in the scripting function.
When ready, deploy and run the operation and validate behavior by checking the operation logs.