Generating your first Document with Make

Ready to generate your first document with Make and PDFmonkey? Learn to create your first document effortlessly with PDFMonkey's step-by-step guide.

Create an account on PDFMonkey

To create an account, go to the Register page and fill in you email and password.

We do not ask for a password confirmation but you can toggle password hiding by clicking on Show my password.

Once you’ve filled in your credentials, we will send you an activation email. Click the link in the email to activate your account. You will not be able to sign in until your account is confirmed.

Sign in

Once your account confirmed, fill in your credentials in the Sign in page to get access to your dashboard.

Create your first Template

To create a template, head to the Templates page and click on Create my first Template.

Give a name to your template, select the Code edition mode and select the Base Template named Blank.

It will open the Template Editor, where PDFMonkey’s magic happens.

A name is just a name

You can change the name of your Template as often as you want, it will have no impact on your client applications.

Writing your first Template

In the HTML tab, insert the following code:

<p class="greeting">Hello {{name}}!</p>
<p>Your favorite number is {{favoriteNumber}}.</p>

In the CSS tab, insert the following code:

.greeting {
  color: #6D28D9;
  font-size: 24px;

And finally in the Test data tab, insert this:

  "name": "Peter Parker",
  "favoriteNumber": 8

You can now click on the Save button, and you should see the preview panel on the right update to reflect your changes.

Real PDF preview

The PDF preview you see is actually a 100% accurate version of what the final result will be as it is a real PDF, generated using the same process we use to generate your Documents.

The last step is to make your Template available for generation. To do so, click on the Publish button.

Always publish your template!

Forgetting to publish your template is a frequent mistake, especially when switching back and forth between Make and PDFMonkey. If the documents you generate don't match your template, always check you published it.

pageAuthoring TemplatespageWhat are the Template test data?

Generating your first Document

Now that your Template is complete, let's head to Make.

For this guide we will define a scenario triggered by a form submission on Tally, generate a PDF in PDFMonkey and then send the PDF by email.

The Tally form

We will use the following Tally form as our source of information in our scenario:

Setting up your scenario

Start by creating a new scenario. As trigger we will use Tally's Watch New Responses event.

Make will allow you to connect to your Tally account and select your form. Once you do, a webhook URL will be created and automatically attached to your Tally form.

We then proceed to fill our form and check it's correctly connected in Make by clicking the Run once button in our scenario:

Calling PDFMonkey

Now that our trigger is set, we will configure our PDFMonkey module.

Add the PDFMonkey Generate a Document module and click the Create a connection button. You can then enter your API Secret Key (get it from the My Account page).

You can then select your Workspace and Template, and then define the mapping between the Tally questions and the variables in your Template:

Naming variables

If you’re wondering how to write proper names so it works in PDFMonkey, we provide a list of correct/incorrect variable name formats.

We’re now ready to test the Document generation.

Click again on the Run once button and select Use existing data. Once the scenario completed, you should see relevant information about your Document.

Sending the PDF by email

Now that our PDF is generated, let's send it by email.

First, we need to download the file in order to attach it to the email. Add the HTTP Get a file module and give it the Download URL returned by PDFMonkey.

You can then use your email provider of choice. For simplicity, we will use Make's default Email Send an email module. In the attachments section you can then select your PDF.

We usually recommend customizing the File name, otherwise the file will simply be named file.pdf as the Get a file module ignore the actual name of the file…

In this guide, we will use the filename returned by PDFMonkey:

You can now test your full scenario.

Congrats! You generated your very first PDFMonkey Document using Make! 🎉

Mind the gap!

One key thing to pay attention to when generation PDFMonkey Documents with Make is that you're sending the data as JSON.

Since the Make module let's you write this JSON directly, data must be properly escaped. If for instance we were to fill in the name as Peter "Spider-Man" Parker the JSON would end up being incorrect:

  "name": "Peter "Spider-Man" Parker",
  "favoriteNumber": 8

One way to avoid this is be replacing " with \" inside the value:

This will ensure that your JSON is correct, in regard to quotes.

Also keep in mind that line breaks (\n) will have a similar effect and should be escaped the same way (replacing \n with \\n).

Last updated