Category: Nintex Drawloop Document Generation

Using Macros with Nintex Doc Gen

Nintex Doc Gen does not support macros running on their servers. However, Nintex Doc Gen does support using templates containing macros if they are not set to trigger when the document is opened.

The workaround is to manually run the macros after the document is generated with your Salesforce data OR use a workaround such as excel-as-middleware to avoid the need to use macros.

Troubleshooting: Why can my user manually run a Doc Package but not via workflow?


Your user is able to manually run a Document Package via button click but unable to run a Document Package via workflow (automated document package).


Typically this occurs when there is a permissions issue. Navigate to the Profile for the user(s) experiencing this issue and ensure you have check-marked the ‘Send Outbound Messages’ checkbox.

Nintex Drawloop: 5 Awesome Features (Part 2)

Advanced Optional Documents

Automatically include or exclude a document based on a field value. Making work less work…

Sort with Previous

Allow the user generating the document to change the order of the documents. Can you imagine how useful this is if you are generating PowerPoint slides? Amazing.

Pause to Edit

This feature generates the document with your Salesforce data in the original file type (Word, Excel, etc) then allows you to download to make changes. Once you make changes you re-upload the document and it continues on the delivery path. This is a great feature when you need to make any manual edits prior to a delivery option such as Email.

Read more about the Pause to Edit feature here.

Job Queue

If you generate one document and get an error, you see the error code on your screen. But what if you are generating hundreds of documents at once? Nintex Drawloop developed this genius interface that will display the number of documents being generated, how many are successful, and how many resulted in an error. You can even see the error messages in the custom interface.

Read more about the Job Queue and how to enable it here.


This is another field you will need to drag and drop onto the Document Package page layout. Place the locale code in this field to ensure all dates, current, and numbers are displayed in your generated document correctly. Use a field tag in this field to make it dynamic.

Find a list of locale codes here.

Nintex Drawloop: 5 Awesome Features (Part 1)

Button Wizard

Easily create customized buttons to trigger the document generation process. No need to spend hours trying to figure out button parameters and perfect syntax!

DocGen Queue

Send multiple files (Word, Excel, PPT, PDF) to the DocGen Queue and quickly bundle them into a single document. This is great for non-profits who are using MassLOOP to create donation letters that need to be printed and physically mailed.

Set Security

All admins know how painstaking and complex permissions can be. Thankfully the geniuses at Nintex Drawloop made this extremely simple for customers! Easily control who can view and run Document Packages by using the interface on the Document Package record.

Use Admin Credentials

When using the Insert-Update feature, this checkbox will allow the Chatter post, Task, or record created to have the System Administrator as the creator. Pretty cool.

Keep Word Formulas

Okay so you probably haven’t seen this option before. You will need to drag it onto the Document Package page layout. This is a key feature when troubleshooting document containing Word formulas. Setting your Document Output type to ‘Originals’ and marking this checkbox on the Document Package will ensure your formulas are not flattened, allowing you to toggle and correct any mistakes made. I recommend adding this field to your page layouts for future use.

Nintex Drawloop Error: a request was made without prior authorization


An error has occurred: a request was made without prior authorization. Please have your administrator reauthorize the document generation app. (AuthInvalid)

What is the problem?

A system administrators credentials are no longer stored in the DocGen Admin tab for Nintex Drawloop to use in order to run the document package.


Why is this needed?

Credentials need to be stored in order to use some Nintex Drawloop features. For example, if you set up a scheduled document package no one is clicking the button to trigger the document generation process to begin. Therefore, Nintex Drawloop will use the credentials of the System Administrator that are stored and run the document package as that user.


What is the solution?

Follow the steps below to resolve this error:

  1. Navigate to the DocGen Admin tab
  2. Scroll to the bottom of the page. Then, click the Authorize Nintex DocGen button.
  3. A pop-up window will appear. Click the Allow button.
  4. Done! You should now see your username listed as the Integration User.


Attach back to record when using a Scheduled Report Document Package


The Sales Manager of XYZ Consulting currently uses Nintex Drawloop Document Generation to generate a monthly sales report for each active Account in Salesforce. Each generated report is then emailed to the Account Owner. They would like to keep an archive of these reports on the Account record going forward.


Update the Scheduled Report Document Package email delivery option to support attaching the generated document. Then, leverage the Insert-Update feature to attach the generated reports to the appropriate Account record.


Follow the steps below:

  1. Navigate to your current delivery option. Under Attach Options, check-mark both the ‘Allow Document Storage’ and ‘Require Document Storage‘ checkboxes. Then set the Store As field to ‘Attachment’. Click ‘Save‘.
  2. Next, navigate back to your Document Package and click the New Insert-Update button.
  3. Set the Type field to ‘Advanced’. 
  4. New fields will now appear on the screen. Set the Object Name to ‘Account’ since that is the object we want to attach the generated reports to. Then, check-mark the Update existing record and Attach to this Object checkboxes. 
  5. Click the ‘Save‘ button.
  6. Lastly, you will want to ensure the first column of your Mass Recipient Report is the OwnerId (ID field of the User or Contact we are emailing) and the second column is the AccountId (ID field of the object we want to attach to).


When our Scheduled Report Document Package runs monthly, the generated sales report will be emailed to the owners of the Accounts as well as attach to the Account record.



Embedded Signing: Route via Client Code

If you read my previous post regarding the Nintex Drawloop + DocuSign ‘Embedded Signer’ feature, you know its pretty slick. What if you want to set up TWO embedded signers?

First, you will need to navigate to your second recipient option and set the Embedded Signer field to ‘Route via Client Code’. You will then need to create a visualforce page to iframe the DocuSign signing event as well as a controller Apex class. Once you’ve developed your custom code, you will use the visualforce page URL in the retURL field on the same DocuSign recipient. Nintex Drawloop will them make API calls to DocuSign to create the envelope when the document generation process begins and DocuSign will handle the rest.

How to create a Task and attach the generated document

A common Nintex Drawloop use case involves the need to create a completed Task when the DocGen Package is ran and automatically attach the generated document to the newly create Task record. In order to do this you will need TWO Insert-Updates. The first Insert-Update is used to create the Task record at the beginning of the document generation process. The second Insert-Update is used to attach the document at the end of the document generation process.


  1. Navigate to the DocGen Package and click the ‘New Insert-Update’ button.
  2. Set the Type drop-down to ‘Task’ to reveal additional fields on the page.
  3. Click the ‘Save’ button.
  4. You will be redirected back to your DocGen Package. Open the Insert-Update and click the ‘Edit’ button.
  5. In the Order field put “1”.
  6. Next, check-mark the Run at Beginning checkbox.
  7. Click the ‘Save’ button.
  8. Follow steps 1-4 again to create the second Insert-Update.
  9. Navigate back to your second Insert-Update and click the ‘Edit’ button.
  10. In the Order field put “2”.
  11. Make any additional configurations to your second Insert-Update. Then, click the ‘Save’ button.
  12. Run the DocGen Package! The first Insert-Update will run at the beginning of the process and create the Task record. The second Insert-Update will run at the end of the document generation process and update the Task fields (such as the Status and Subject) and automatically add the attachments.