Create personalized documents, emails, and reports with Mail merge API using our solution – powerful Go library. Simply merge Word and PDF templates using Go. The result of the Mail merge operation can be saved in DOCX, PDF, HTML and other popular formats.
Our product provides a powerful Mail merge API to build your own advanced software solution. Whether you need to create personalized emails for clients, generate a report based on the received data set or create a personalized document for any purpose, our product API can easily handle it.
With our Go solution, you can perform a Mail merge operation in Go. To do this, use the merge template in Word, PDF or other file format and the source data.
Note that the Mail merge template must contain the merge fields into which the source data will be inserted after the Mail merge operation is executed.
Use Mail merge to automate email creation and sending bulk emails. To do this, create an appropriate Mail merge template with merge fields and then automate the mailing by substituting data from your source. For example, you can create an email template with Mail merge fields instead of your customer names. Using Mail merge, you can fill in these fields with client names pulled from your data source.
So you get the fast and easy way to create thousands of personalized emails in seconds!
You can generate reports with Mail merge in Go. You still need to create a Word, PDF or other file format Mail merge template with merge fields. Such fields will be used to substitute data from the data source and build a report.
To see how the Go Mail merge operation works using our Go solution, import Word or PDF template with merge fields and data in XML or JSON format. After performing the code, save the merge result generated using our product API in a convenient format – DOCX, HTML, PDF and so on:
import (
"os"
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models"
)
config, _ := models.NewConfiguration("config.json")
wordsApi, ctx, _ := api.CreateWordsApi(config)
template, _ := os.Open("Input1.docx")
data, _ := os.Open("Input2.docx")
executeMailMergeOnlineOptions := map[string]interface{}{}
executeMailMergeOnline := &models.ExecuteMailMergeOnlineRequest{
Template: template,
Data: data,
Optionals: executeMailMergeOnlineOptions,
}
_, _ = wordsApi.ExecuteMailMergeOnline(ctx, executeMailMergeOnline)
Run go get -v github.com/aspose-words-cloud/aspose-words-cloud-go/2007/api to install Aspose.Words Cloud SDK for Go. You can get a lot of useful information about other installation methods from the "How to use SDK" section.
Clone Aspose.Words Cloud SDK for Go source code from GitHub and use it in your project. Please follow these Instructions to quickly get the necessary security credentials and access our REST API.
Refer to the Repository Documentation to see the details.