Question

How do I remove unused lines from a Google Docs template populated by Typeform responses?

  • 15 August 2023
  • 1 reply
  • 83 views

Userlevel 1

Hi Everyone

I’m using the action ‘Create Document from Template in Google Docs’, populating a number of field placeholders using values from a Typeform form.

The document being created is a set of meeting minutes and includes a table of attendees at the top of the document.  In a column alongside the attendees names is a hardcoded list of job roles.  Where an attendee does not attend I need to not only have the placeholder disappear (‘Unused Fields Preference - Remove’), but also remove the whole line from the table (to avoid large amounts of whitespace in the middle of the doc).

 

Has anybody got a clean way of doing this?

My solution is to prepare numerous templates, one for each combination of attendees, and then use Paths to match the relevant attendance to the relevant template. However, this seems cumbersome at best. 

Can anyone think of a simpler way?  (Apologies - I’m new to Zapier, so there may be a very obvious solution using an app I’m unfamiliar with).

Any help, much appreciated.

Christian


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @Christian Mc 

Good question.

You’d likely have to go with one of these more advanced route:

  1. Zap action: GDocs - Append Text to Doc
    1. A Code step would have to be configured first to prep the table based on the dynamic inputs
    2. This supports HTML
  2. Zap action: GDocs - API Request
    1. GDocs API: https://developers.google.com/docs/api/reference/rest