Starter workflow for creating self-signed PDF agreements. If you’re working on becoming GDPR compliant, we wrote a quick guide on how you can get prepared.
PactMaker spins up a website with a form that lets your customers self-sign PDF agreements. After each agreement is signed, it sends an email with a copy of the PDF using Postmark. PactMaker is built with node.js, express, and EJS templating.
Create an environment variable file(.env
) in the project root with the following variables:
POSTMARK_SERVER_TOKEN=''
POSTMARK_FROM_ADDRESS=''
INTERNAL_EMAIL_RECIPIENTS=''
INTERNAL_EMAIL_SUBJECT=''
SIGNEE_EMAIL_SUBJECT=''
TITLE=''
Server tokens can be found under the credentials tab on your Postmark server.
The email address you want to send the email from. You must verify your domain or create a valid Sender Signature on Postmark.
Comma-separated list of email address you want to send the PDF agreement to.
The subject line of the email that gets sent to your team. Available variables: <%= company %>
, <%= name %>
, <%= role %>
, and <%= email %>
.
The subject line of the email that gets sent to the person who just signed the agreement. Available variables: <%= company %>
, <%= name %>
, <%= role %>
, and <%= email %>
.
The name of your company or app. This will appear on the page header and footer.
Before you get started, make sure you have an environment variable file(see above) and that Node.js and npm is installed.
- In terminal, run
npm install
- Run
npm start
orheroku local
to run the project locally - By default,
npm start
uses port 3000 andheroku local
uses port 5000.
The email content for the signee and internal email can be found under /emails
. Templates are rendered using EJS. Available variables: <%= company %>
, <%= name %>
, <%= role %>
, and <%= email %>
.
The agreement PDF template can be found at /views/agreement.ejs
. PactMaker comes with basic styles for presenting different signatures.
It’s important to let your customers preview the agreement before signing it. PactMaker automatically generates an example agreement at the root URL so that you can link to it. Example values can be found in examples.json.