If you do not wish to generate documents from the Aveneer UI level or if you prefer to automate the document generation process based on a certain set of criteria, you can do so via Apex. Below you will find a sample code that you will have to modify (change the variables) to suit your current needs. ApiProxy methods can be used in almost any place in the code (for example – Apex Class, Apex Trigger, Invocable Method, Aura Method etc).

 Id firstRecordId = 'someRecordId1';
 Id secondRecordId = 'someRecordId2';
 Id firstTemplateId = 'someTemplateId1';
 Id secondTemplateId = 'someTemplateId2';

// Wrapper version
List<ave.GeneratorParameter> documentsToGenerate = new List<ave.GeneratorParameter>();

// two parameters, first is ID of template to generate, second is ID of record
documentsToGenerate.add(
 new ave.GeneratorParameter(
 firstTemplateId, 
 firstRecordId
 )
); 
documentsToGenerate.add(
 new ave.GeneratorParameter(
 firstTemplateId, 
 secondRecordId
 )
);

// three parameters version, first is ID of template to generate, second is ID of record to generate, and last parameter is ID of record to which document should be related after generation
documentsToGenerate.add(
 new ave.GeneratorParameter(
 secondRecordId, 
 firstRecordId, 
 UserInfo.getUserId()
 )
); 

// @future version - slightly faster than queueable version
String externalGeneratorId = ave.ApiProxy.scheduleDocumentGenerationForRecords(
 documentsToGenerate
);
// queueable - slower version, but necessary to proceed from for example Batch
String externalGeneratorId = ave.ApiProxy.scheduleDocumentGenerationForRecordsQueueable(
 documentsToGenerate
);

// Map version, ID of the template as map key, Set of record IDs as value
Map<Id, Set<Id>> documentsToGenerateMap = new Map<Id, Set<Id>> {
        firstTemplateId => new Set<Id> {
                firstRecordId,
                secondRecordId
        },
        secondTemplateId => new Set<Id> {
                firstRecordId
        }
};

// @future version - slightly faster than queueable version
String externalGeneratorId = ave.ApiProxy.scheduleDocumentGenerationForRecords(
 documentsToGenerateMap
);

// queueable - slower version, but necessary to proceed from for example Batch
String externalGeneratorId = ave.ApiProxy.scheduleDocumentGenerationForRecordsQueueable(
 documentsToGenerateMap
);

// Map version with only one parameter. Aveneer Assignment Rules will decide which documents will be generated for specified records
Set<Id> recordIdsToGenerate = new Set<Id> {
        firstRecordId,
        secondRecordId
};

// @future version - slightly faster than queueable version
String externalGeneratorId = ave.ApiProxy.scheduleDocumentGenerationForRecords(
 recordIdsToGenerate
);

// queueable - slower version, but necessary to proceed from for example Batch
String externalGeneratorId = ave.ApiProxy.scheduleDocumentGenerationForRecordsQueueable(
 recordIdsToGenerate
);