Automate document generation

Learn how to automatically generate documents at scale by calling the Document Generation API using the Adobe PDF Services Connector in Microsoft Power Automate.

Automating document generation is a way to speed up productivity by automatically using your data to populate reusable word templates to create thousands of custom documents. There are many options for how the document generation API can be invoked, such as using a programing language with the rest API or in our example here we’re going to use power automate. Microsoft’s Low Code Automation Solution. The first step to get started is to generate the required credentials to invoke Acrobat services. To do so, go to developer dot Adobe dot com. Select. Create a new project. Then add API document Cloud and PDF Services API and then select next. There are two options for authentication. PIN the connectors for power Automate have recently been updated to include OAuth. This is the preferred method as the JWT authentication is being deprecated. Select the Enterprise PDF Services Developer profile and then say the configured API. Next, you’ll need to generate an access token and once you generate the access token, you’ll now copy the required information into the Adobe Services Power Automate Connector Configuration. Now let’s go ahead and create a new flow and power automate. Select automated cloud flow and create a name. Our flow can be triggered by many different events, but for an easy example, let’s create a flow that’s triggered by a new document generation template being added to a SharePoint folder and have the resulting generated document be saved in a different SharePoint folder. Our flow here is triggered by a new document being added to a SharePoint folder. The parameters highlighted in red are the parameters that need to be customized when creating a document generation flow. For this SharePoint action, we need to input a SharePoint site address and a folder ID. The second action is to initialize variable, which will require a JSON data file as input. This JSON file can be static text and power automate variable like we are showing here, or it can be dynamically assembled here in power. Automate from any number of input sources. So I’ll go ahead and just copy and paste this into the value field. The third action here in our flow is the call to the document Generation API. Using the power automate acrobat service connectors. So we’ll go ahead and add new connection. After adding a connection name, we’ll copy the values from the Acrobat services credentials that we created into the fields required for the Acrobat services Power automate Connector. Here are the client ID and the client secret values that we copied, and now we can create our connection. Once we’ve connected to the Acrobat Services Power Automate Connector, we fill in the highlighted parameters. This document Generation Flow, requires a word template. So let’s look at how we can create the word template. This is a standard word document and we’ve installed in Adobe Add on that makes it easy to set up as a template for document generation. I’m going to load the data file into my word template with the Adobe Add on, so I’ll select upload JSON. I usually add on. I can easily drop in values for simple data, merge images, tables, lists and dynamically grow based on the data. Let’s go ahead and add a table here. Notice how you can search for table and column records as well. And then we’re going to add conditional text here in this paragraph above special terms. The add on can also insert Adobe Acrobat sign tags, which you can see here as well. Let’s return to the document generation flow and add the last action. The last action in this flow is to create a file in SharePoint and the highlighted parameters show what the file should be named with the content of the file is and where it should be saved. Once you have your template uploading it to the SharePoint folder triggers a power automate flow. Then our last action in the flow puts the result in another SharePoint folder. Let’s see the final generated document. And there you have it. All the data is merged. Organizations can use this to generate centralized agreements in sales, contracts, invoices or even custom onboarding packages for employees and save valuable hours of labor.