Error Message:
Error while creating new document. Error message: Error: 500. Error description: { “error”: { “code”: 500, “message”: “Internal error encountered.”, “status”: “INTERNAL” } }

Solution: 

  1. Check if this error happening under all users or just non admin users. And refresh your app authorization with google drive under documents configuration tab.
  2. If refreshing your authorization did not resolve error, you may have an extra “{” possibly in your google doc template in one of your merge fields or wrong formatting on one of your merge fields. Or you may be missing an opening { or closed bracket } in one of your merge fields causing this error and improper formatting of the field. So you should check all merge fields within template and ensure following right formatting when selecting the field from the embedded template builder in document action template.
  3. If not the above two reasons, there could be some hidden formatting within your template causing this error message. If you uploaded your google doc template from a word document, there is a chance there is hidden formatting in there. You can test by creating a blank google doc (do not copy the original one), update sharing settings and then replace this google doc ID into your document action. Then test to see if error comes up. If it does not, then you know it is an issue within your previous template and if you cannot find the merge field it is coming from, then it may be issue with hidden formatting and you need to recreate your google doc template and can copy/paste from old template to new template so you can be sure no hidden formatting.