Skip to main content

The “Create Document from Template” action in the Google Doc integration allows us to create a doc and replace placeholder variables, but we’d also like to be able to replace placeholder variables in existing Google Docs.

Our use case is that we want to be able to tag messages in Slack by applying a certain slack reaction to a message, then use Zapier to add that message to a specific section in a Google doc.  If we had the ability to replace placeholders within a Google doc, we would be able to do so.

 

For example, our doc might have the following content:

DOC TITLE

Random document content.

Related Slack Messages:
{{slack_message}}

More random document content.

When somebody adds a reaction to a slack message, we would use the new “Replace placeholder in existing doc” action to replace {{slack_message}} with the the message AND a new placeholder.  That would allow us to use the action repeatedly to keep appending more content.  After a couple messages, the doc would look like:
 

DOC TITLE

Random document content.

Related Slack Messages:
12/3/2021 @ 11:20am 2jlabanca]: Foo foo foo, bar foo, bar foo foo
12/3/2021 @ 11:23am 2jsmith]: Foo bar foo baz?
12/3/2021 @ 11:28am 2jlabanca]: BAAAAAAZ!!!!!
{{slack_message}}

More random document content.

 

We know about the “Append Text to Document” action, but that won’t work for our use case.  We want to transcribe the slack messages into a specific section closer to the top of the document.

 

When combined with this other feature request to add links to Google Docs, we’d be able to actually link the transcribed slack messages directly to slack!
 

 

Hi @jlabanca 

Feedback and feature requests can be submitted to Zapier Support via a ticket to be logged: https://zapier.com/app/get-help


@jlabanca 

It’s likely the GDocs API would have to be used for your described use case: https://developers.google.com/docs/api/reference/rest

App APIs can be used in Zaps with the Code app or Webhooks app.

Code: https://zapier.com/apps/code/help

Webhooks: https://zapier.com/apps/webhook/help