Full Error Message: 
Error while sending email. Error message: Send Email failed. First exception on row 0; first error: INVALID_ID_FIELD. Invalid entity of whatID.

-You may receive this error message when trying to generate a document with email feature in document action and there may be issue with your Salesforce settings so that it will not be able to send.

How to resolve:
Check that you have the “Allow Activities”¬†checkbox checked on the standard or custom object being used as base object in document action. Once this is checked, you should be able to send an email without error.