I have Docusign integrated with Salesforce. Currently, I have a DocuGen Template created and I can click a Salesforce button to generate a document from an Opportunity, complete with various merge fields.
I have a use case where I’d like to help automate workflows by having a Salesforce Flow (with Invocable Apex assistance, if necessary) take a given Opportunity, generate the ContentDocument, and then attach the ContentVersion as an email along with a Salesforce Email template and send it to a Contact.
I can see how to generate a Docusign Envelope through Apex (really great documentation btw), but I don’t want an entire envelope. I just want to generate the doc itself, and send that raw doc attached to a templated email to the designated Contact for review. I cannot find any documentation about how to use the DocuGen features to use the Template and merge fields to generate the doc so that I can use it as an attachment. Any help is appreciated.
Thanks!