Skip to Content

Jitterbit Harmony Google Docs Update Docs Activity

Introduction

A Google Docs Update Docs activity updates a document at a Google Docs connection and is used as a target in an operation. After configuring a Google Docs connection, you can configure as many Google Docs activities as you like for each Google Docs connection.

Create a Google Docs 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:

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 Docs Update Docs Activity

Follow these steps to configure a Google Docs Update Docs activity:

Step 1: Enter Basic Information

Connections tab

Tip

Fields with a variable icon 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 Docs Update Docs activity. The name must be unique for each Update Docs activity and must not contain forward slashes (/) or colons (:).

  • 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

Connections tab

  • Data Schema: The request and response data schemas from Google Docs 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 Docs connector uses the Google Docs API v1. Refer to the API documentation for information on the schema fields and practices for manipulating Google Docs.

    • Request:

      Request Schema Field/Node Google API Field Notes
      request Request Zero or more document requests
      documentId documentId Document ID of the Google Doc
      ReplaceAllTextRequest ReplaceAllTextRequest Replaces all instances of text matching a criteria with replace text
      replaceText replaceText Text that will replace the matched text
      text containsText Text for the SubstringMatchCriteria, case sensitive
      InsertTextRequest InsertTextRequest Inserts text at the specified location
      text text Text to be inserted
      index index Insertion location index; as no segmentId is specified, inserted in body
      DeleteContentRangeRequest DeleteContentRangeRequest Deletes content from the document
      startIndex startIndex Zero-based start index of this range, in UTF-16 code units
      endIndex endIndex Zero-based end index of this range, exclusive, in UTF-16 code units
      InsertTableRequest InsertTableRequest Inserts a table at the specified location
      rows rows Number of rows in the table
      columns columns Number of columns in the table
      index index Insertion location index; as no segmentId is specified, inserted in body
    • Response:

      Response Schema Field/Node Google API Field Notes
      update documents.batchUpdate.response Zero or more document responses, one for each document request
      statusCode n/a Status code, set if error
      documentId documentId Document ID of the Google Doc
      message n/a Messages returned, 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 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 Docs Update Docs 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 Docs Update Docs 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 Docs Update Docs activities. See the validation patterns on the Operation Validity page.

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.