Generate and Email Documents
Using High Volume Document Generation API, generate PDFs and send emails using HTML templates.
Prerequisites
-
A valid and active Conga Advantage Platform organization.
-
ClientID and Secret generated and implemented. See Authorizing High Volume Document Generation.
Use Case
In this use case, we use an HMTL email template and an HTML template to merge with data from CSV or JSON data, convert it to PDF format and email it via Conga Advantage Platform.
Step 1: Create an HTML Template
Create an email template on using the HTML Editor. Once done, copy the template's file ID. For more information on how to create a template and get the File ID, see the following topics:
Step 2: Create the Merge Request
You can control the values of the document generation by including the values in the merge API request body:
-
dataFileId: Required for the document to generate. It must contain the ID of a selected data file.
-
TemplateIds: Required for the document to generate. It must contain the ID of a selected template. Although this value is set in an array, only one template ID is supported at this time.
-
Format: The value of the format must be set to either JSON or CSV, depending on your data file.
-
EmailProvider: Currently, the only supported email provider for high volume document generation is
CongaPlatform
. -
EmailTemplateID: The ID value of an email template to send to your recipients. In order to send an email with the documents, this field must contain a value.
-
useCongaSign: As this is not a Conga Sign integrated solution, this value must be set to false. For details on using high volume document generation with Conga Sign, refer to Generate and Conga Sign documents.
-
useSFTP: In this example, we are not using secure file transfer protocols and the value is set to false. For details on using high volume document generation with SFTP, refer to Generate and Send for SFTP.
-
sftpFolderName: As we are not using SFTP, this value may contain either "null" or placeholder text. .
-
Here is an example of the High Volume Doc Gen API method to create the document:
Merge Request | Parameters |
---|---|
Endpoint | https://prod-rls10.congacloud.com/api/highvolumemerge/v1/merge |
Request Method | Post |
Request Body |
|
Response Codes | Description | Example Schema |
---|---|---|
200 | Successful Operation |
|
400 | Invalid Data |
|
500 | Internal Server Error |
|
Step 3: Check Merge Request Status
Once the documents begin to merge and send, you can verify the status of the process by checking against the batchId of the merge using the following API settings.
Status Request | Parameters |
---|---|
End Point | https://coreapps-rlspreview.congacloud.com/api/highvolumemerge/v1/status/{{batchId}} |
Request Method | GET |
Body |
|
Errors |
|