Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Show Page Sections

download

Generate and Email Documents

Using High Volume Document Generation API, generate PDFs and send emails using HTML templates.

Prerequisites

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

Create a merge request to generate the document. The merge request contains several parameters that determine which features are included in the generated document. An example of the parameters as they appear in JSON is as follows:{ "dataFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "templateIds": [ "3fa85f64-5717-4562-b3fc-2cE963f66afa6" ], "emailTemplateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "emailProvider": "CongaPlatform", "format": "Json", "useCongaSign": false, "useSFTP": false, "sftpFolderName": "null" }

You can control the values of the document generation by including the values in the merge API request body:

  1. dataFileId: Required for the document to generate. It must contain the ID of a selected data file.

  2. 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.

  3. Format: The value of the format must be set to either JSON or CSV, depending on your data file.

  4. EmailProvider: Currently, the only supported email provider for high volume document generation is CongaPlatform.

  5. 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.

  6. 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.

  7. 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.

    1. 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 RequestParameters
Endpointhttps://prod-rls10.congacloud.com/api/highvolumemerge/v1/merge
Request MethodPost
Request Body { "dataFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "templateIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6" ], "emailTemplateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "emailProvider": "CongaPlatform", "format": "Json", "useCongaSign": false, "useSFTP": false, "sftpFolderName": "null" }
Response Codes
Response CodesDescriptionExample Schema
200Successful Operation { "batchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
400Invalid Data { "type": "string", "title": "string", "status": 400, "detail": "string", "instance": "string", "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }
500Internal Server Error { "errors": [ { "status": 500, "title": "string", "detail": "string" } ] }

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 RequestParameters
End Pointhttps://coreapps-rlspreview.congacloud.com/api/highvolumemerge/v1/status/{{batchId}}
Request MethodGET
Body { "batchId": "82e44b05-a8e3-454d-930a-a3e6f0b201ea", "status": "Completed", "totalJobs": 1, "inProcessJobs": 0, "completedJobs": 1, "failedJobs": 0, "avgMergesPerMinute": 25, "avgTimePerMergeMilliseconds": 2342, "elaspedTime": "00:00:02", "lastUpdated": "2025-01-30T05:44:21.348Z" }
Errors { "errors": [ { "status": 0, "title": "string", "detail": "string" } ] }