Why Is Placeholder Text Not Replacing in Google Docs Workflow?

This topic was automatically generated from Slack. You can find the original thread here.

Thanks Leo.

I still can’t seem to get it to work as you have.

In my case it is now not replacing anything at all.

I am getting an intermittent error:

Error
Fetch Error: status 400

Which I was getting intermittently when building the workflow yesterday too. I couldn’t quite catch what might have been causing the error so ran a number of tests including not specifying any placeholders (see pic)

I’ve tried my best to be careful of things like trailing/leading spaces. I have tried starting afresh with a new workflow. New test document. Leading spaces out of the replacement text, etc.

Interestingly, it still copies the document and renames it, but it is not replacing any placeholder text.

Details of “Fetch Error”:

DETAILS
at null.null (/tmp/__pdg__/dist/code/f103fd83e0477b37116a17eba22a4e063dec74075040d20185d43c214d936f96/node_modules/.pnpm/google-docs-mustaches@1.2.2/node_modules/google-docs-mustaches/lib/apis/fetch.js:24:27)
at process.processTicksAndRejections (internal/process/task_queues.js:95:5)
at Mustaches.interpolate (/tmp/__pdg__/dist/code/f103fd83e0477b37116a17eba22a4e063dec74075040d20185d43c214d936f96/node_modules/.pnpm/google-docs-mustaches@1.2.2/node_modules/google-docs-mustaches/lib/Mustaches.js:15:9)
at Object.run (file:///tmp/__pdg__/dist/code/f103fd83e0477b37116a17eba22a4e063dec74075040d20185d43c214d936f96/code/actions/create-file-from-template/create-file-from-template.mjs:69:25)
at global.executeComponent (/var/task/launch_worker.js:139:22)
at MessagePort.messageHandler (/var/task/launch_worker.js:598:28)

Hello , the template in your Google doc still need to have the brackets:
{{ placeHolder }} . You should only remove the brackets in your Pipedream action. Could you check the images in this message here for example?

the {{ placeholder }} notation should be used within the doc itself, then just use placeholder in the Pipedream action. Our instructions within the action description are not great and we’ll get those improved to be more instructive.

Thank you It is working perfectly. I noticed the spaces are not necessary (e.g. {{projectName}} works fine).

I have always wanted to contribute in some way to Pipedream but felt limited by my abilities but here I can probably help, so have made a pull request in Github with updated descriptions for you, if that’s helpful.

That is super helpful — these improvements are always best when they come directly from the community! Thanks, Paul! Glad we were able to get it sorted out.

FYI Paul I just published your changes, with a few tweaks of my own — you should see an “Update” button at the top right of the action, within the builder.