Skip to content

feat(google-drive): support key-value template replacements#7336

Open
azan-baloch wants to merge 1 commit into
camunda:mainfrom
azan-baloch:gdrive-simple-template-vars
Open

feat(google-drive): support key-value template replacements#7336
azan-baloch wants to merge 1 commit into
camunda:mainfrom
azan-baloch:gdrive-simple-template-vars

Conversation

@azan-baloch

@azan-baloch azan-baloch commented May 25, 2026

Copy link
Copy Markdown
Contributor

Description

Added a new key-value template replacement mode for the Google Drive connector.

Previously, users had to provide full Google Docs API request syntax even for basic placeholder replacements.

Example:

{
  "requests": [
    {
      "replaceAllText": {
        "containsText": {
          "text": "{{candidateName}}",
          "matchCase": true
        },
        "replaceText": candidateName
      }
    },
    {
      "replaceAllText": {
        "containsText": {
          "text": "{{jobTitle}}",
          "matchCase": true
        },
        "replaceText": jobTitle
      }
    }
  ]
}

With this change, users can now use a simpler key-value format for common template replacement workflows:

{
  "candidateName": "Azan Baloch",
  "jobTitle": "Junior Developer",
  "salary": "$2000"
}

The connector internally converts these key-value pairs into Google Docs replace requests.

This PR also keeps backward compatibility with the existing advanced Google Docs request format.

Demo

The video below shows the new key-value template replacement mode working in a local Docker setup.

Watch the demo

Related issues

closes #7335

Checklist

  • Backport labels are added if these code changes should be backported. No backport label is added to the latest
    release, as this branch will be rebased onto main before the next release. Example backport labels:
    • backport stable/8.8: for changes that should be included in the next 8.8.x release.
    • or backport release-8.8.7: for changes that should be included in the specific release 8.8.7, and this
      release has already been created. The release branch will be merged back into stable/8.8 later, so the change
      will be included in future 8.8.x releases as well.
  • Tests/Integration tests for the changes have been added if applicable.
  • If the change requires a documentation update, it has been added to the appropriate section in the documentation.

@azan-baloch azan-baloch requested a review from a team as a code owner May 25, 2026 09:08
@CLAassistant

CLAassistant commented May 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mathias-vandaele

Copy link
Copy Markdown
Collaborator

I am a bit hesitant with this approach.

Today the connector is basically centered around the native Google Docs request format, and the runtime still consumes template.variables.requests and forwards that to the Docs batch update API. With this PR we introduce an additional key-value replacement format via a new mapping in the element template.

My concern is that this adds a second mapping system that we now need to own and support on our side, instead of staying with the Google-native format.

What do you think @crobbins215 @sbuettner ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add key-value template replacements for Google Drive connector

3 participants