-
Notifications
You must be signed in to change notification settings - Fork 13
templates command
Provides a push and pull workflow for your email templates. This lets you store your templates in version control and push to Postmark via a CI/CD pipeline.
Download templates from a Postmark server to your local file system.
$ postmark templates pull ~/Desktop/my_templates
# Options
--overwrite, -o Overwrite templates if they already exist
[boolean] [default: false]
Here’s an example of the directory structure that is downloaded:
my_templates
├── password_reset
│ ├── content.html
│ ├── content.txt
│ └── meta.json
└── welcome
├── content.html
└── meta.json
Each template is stored in its own subdirectory with the HTML and text content, and metadata. The metadata contains the template’s name, subject, and alias.
NOTE: If you update the template alias in meta.json
, be sure to rename the template’s directory so it matches. This prevents conflicts down the line when pulling templates.
Pushes templates from the local file system to a Postmark server.
$ postmark templates push ~/Desktop/my_templates
# Options
--force, -f Disable confirmation before pushing templates [boolean]
By default, you will be asked to confirm your changes before pushing your templates.

You can force push templates which disables the confirmation by including the -f
flag.
$ postmark templates push ~/Desktop/my_templates -f
Postmark CLI - manage templates, send email and more