Force page setting for new Google doc

Looks like someone else has asked this before too with no result: Create Google doc - defaults to Letter size rather than A4?

To use the “Make an API Call” module to set the document page size,

Hint: you can convert CM to PT by Googling “cm to pt”

Module Export - quick import into your scenario

You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.

  1. Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.

  3. Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.

JSON module export — paste this directly in your scenario

{"subflows":[{"flow":[{"id":6,"module":"google-docs:makeApiCall","version":1,"parameters":{"__IMTCONN__":95013},"mapper":{"url":"/v1/documents/{{4.id}}:batchUpdate","method":"POST","headers":[{"key":"Content-Type","value":"application/json"}],"body":"{\"requests\":[{\"updateDocumentStyle\":{\"documentStyle\":{\"pageSize\":{\"height\":{\"magnitude\":595.276,\"unit\":\"PT\"},\"width\":{\"magnitude\":841.8898,\"unit\":\"PT\"}}},\"fields\":\"pageSize\"}}]}"},"metadata":{"designer":{"x":824,"y":-33,"name":"Update pageSize"},"parameters":[{"name":"__IMTCONN__","type":"account:google","label":"Connection","required":true}]}}]}],"metadata":{"version":1}}

Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?

Hope this helps! Let me know if there are any further questions or issues.

@samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

1 Like