feat(google-drive): support key-value template replacements#7336
Open
azan-baloch wants to merge 1 commit into
Open
feat(google-drive): support key-value template replacements#7336azan-baloch wants to merge 1 commit into
azan-baloch wants to merge 1 commit into
Conversation
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 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 ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Related issues
closes #7335
Checklist
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.backport release-8.8.7: for changes that should be included in the specific release 8.8.7, and thisrelease 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.