- There is a limit to the API call duration we make to generate your document, which is 2 minutes. If we do not receive the information from the API for this long, it means the template you have built is highly complex and needs optimization.
- Allow Preview checkbox shall be set on your Button Configuration. More information can be found in our documentation.
¶ I got this error message: "exceptionType"."mmdoc.MavenDocsException","isUserDefinedException": true,"message": "invalid _grant", "stackTrace”: ”(mmdoc)”. Can you help me understand what it means and how I can fix it?
- This error signals that you need to revoke and grant access to your Google account one more time. Perhaps some changes were made to your Google account. So you can grant access to it in the Maven Documents settings tab. And this instruction(link here) may help you.
¶ The generation process ends in the following error: Error[{"exceptionType":"System.LimitException", "isUserDefinedException":false,"message":" Apex heap size too large: 7058814","stackTrace":"External entry point\n(mmdoc)"}]. There's something said about the limits, but I didn't reach any Salesforce limit. Can you explain why this is happening and which limits are reached?
- This error is telling you that data in the query you've built is not filtered, so the generated document is trying to show you all the data that you have in your org connected to the query.
To avoid this issue, you just need to add a filter to the query in the Query Builder tab. So set the needed conditions in the Filter section of Query Builder and save it.
If the generation process ends in the following error: Error[{"exceptionType":"System.LimitException","isUserDefinedException":false,"message":"mmdoc:Too many query rows: 50001","stackTrace":"(mmdoc)"}], the described solution fixes it as well.
- Yes, you can. Once you've uploaded the image to Salesforce, you can fetch its data by adding the corresponding object and field to the Query.
-
Go to the Query Builder tab and click Add Query.
-
For the Object, select "ContentDocumentLink".
-
For the Field, start writing down Content and click on ContentDocument ContentDocument ID.
-
In the "Select Field" field, start writing down Latest and select LatestPublishedVersion.LatestPublishedVersion.ID.
-
In the "Select Field" field, write down Version and select the VersionData field.
-
Save the Query.

-
Go to the document in which you want to insert the Image element and run the Maven Add-in.
-
Select the Image element and in the Source field select the added field from the Query.

-
After you insert the element and generate the template, the uploaded image will be shown in the generated file.
- It is possible to use merge fields in Excel formulas. The reason why these fields are not processed is because that generated file is open without having Edit mode enabled. Make sure that you allow editing after you open the file.

- Yes, having either an image or text Watermark in your document won't break the generation process. The generated file will have the corresponding watermark.
These statements are true for both Google Docs and Microsoft Word templates.
¶ I used some special characters in the Folder Path field on a DOCX Document Template, but got an error while generating. Is it okay, cause I tried the same in Google Document Template and it works fine?
- Yes, it works as expected. There are some differences between processing the content in the Folder Path field on the Google and DOCX Document Templates:
- If you use special characters such as # (Number) or * (Asterisk) in the Folder Path field, it leads to an error for DOCX Document Templates, but it works fine for Google.
- If you use a DateTime merge field in the path, it leads to an error for DOCX Document Templates, but is resolved fine for Google.
- If you have two forward slashes // in a row in the Folder Path field, it does nothing on OneDrive, but creates a folder called "New Folder" on Google Drive.
- The answer is yes. Here is how you can do it:
- Duplicate the original file uploaded to the Document Template.
- Clear the content of the duplicated file. If needed, leave the header and footer.
- Instead of the deleted content, add the following Include element:
<mdoc:include name="The Name of the element" sourceType="documentTemplate" source="The name of the original Document Template"/>
.
- Double-check that you put the correct name of the original Document Template.
- Add the needed Watermark to the newly created file.
- Create a new Document Template and name it "Document with Watermark" or anything meaningful to your taste.
- Adjust your process to use the initial Document Template or new Document Template with the Watermark, depending on the requirements.
It allows you to maintain the content of the Initial Document Template just in your original file. The new template adds the Watermark and includes the whole content from the original template. This means you make changes to the template in one place only.
We've already mentioned in our Documentation that, because of the Microsoft limitations, the Restrict Editing feature is only available in the desktop version.
With that in mind, there are two requirements to meet that allow you to edit the "restricted" file in Preview:
- It is crucial to have Microsoft Word installed.
- Turn on the Autosave feature in the desktop version of Microsoft Word.
Once you click edit on the file in Preview, you'll be prompted to open it in the desktop version of Microsoft Word.

After you agree, the file from Preview is open, and the Autosave toggle is switched.

That means all the changes you make in the file are saved in its copy in OneDrive, and you will find them in the generated document.
Yes, you can. Depending on how you are generating the document, you can:
- use the Locale field on a Document Template.
- use the Locale field on a Document Request record.
- use the Locale field in Flow.
All you need to do is put the needed locale value into the field and generate the document. In the screenshot below, we displayed how it could look on a Document Template. In our case, the Danish locale is used.

¶ I generated a DOCX document, and the number of pages in Word does not match the respective value in the consumption record. Is there an issue in the app?
This can happen in some scenarios. Different applications that support the DOCX format have their own internal document processing. Because of that, they can show the file with a different number of pages.
Similar is in Maven Documents: when we process the DOCX file, we calculate its pages, which in some cases can be different from the page count you'll see when you open that document in your Word application.
This scenario is possible. We've included some additional theoretical information in the response to help you understand the full context.
- Emails can be internal or external.
Internal emails represent users from a single organization and typically use a domain associated with that organization.
External emails represent users who are not part of the organization and may use various types of domains.
- If an internal email does not match any user with the specified email address, it will appear in the corresponding field on the created Document Request.
If valid external emails are defined in the same list, they will also be marked as failed
- If any internal or external emails are invalid or malformed, only those emails will fail.
- If any email fails, the generation process is still completed.
Failed emails are listed in the respective fields on the Document Request.
The generated file on OneDrive includes a sharing link without any specific user assigned.
Please check if you have Google Drawings embedded in your template. Generation might fail when drawings are created directly in the Google Docs you work on.
But you can use the following instructions as a workaround:
- Create a Google Drawing on your Drive.
- In your Google Docs, click "Insert" and select the "Drawing" option to be inserted "From Drive"
- Select the Drawing and select the "Link to source" option
- Click "Insert"
With that sequence, Google Docs is going to be generated without issues, showing the inserted Drawing.