Automations are a set of Triggers and Actions, which can be applied to Forms, Modules, and WebApps.
For example:
Trigger - When a WebApp item is edited in Admin
Action - Send an email to the content approval team
Triggers
Admin item create - Modules (excluding eCommerce Orders), WebApps
Admin item update - Modules, WebApps
Admin item delete - Forms, Modules, WebApps
Front-end item create - Forms, WebApps
Front-end item update - WebApps
Front-end item delete - WebApps
Actions
API Call (limited to 1 per trigger)
Custom (limited to 1 per trigger)
Email Templates work very similarly to Page Templates, see:
They can be useful in emails to add re-usable branding including headers and footers and email-friendly HTML, like an over-arching table.
You can create Email Templates in Site Manager in the Siteglide Admin.
We strongly recommend that you authorize Sendgrid to send emails from your domain to avoid them going to spam filters, or being rejected from sending by your DMARC policy.
Once you've read how our introduction to Automations, you're ready to start creating your own. Siteglide Automations can send transactional Emails powered by Sendgrid. By transactional emails, we mean an email sent to, or c.c.ed to one or a few relevant people when a trigger occurs. Below is an example of an email in Automations.
This example will send an email to 'site-admin@siteglide.com' with a link to the newly created item.
Note, for forms, use the form variable for submitted data, for webapps and modules, use the data.data variable. See Reference
This example will create a customer in Stripe, where the email address is WebApp field 'webapp_field_1_1':\
This example will log data if the WebApp item's name contains 'Hello'.
Once you've read how our , you're ready to start creating your own. Below is an example of an API call in Automations.
Once you've read how our , you're ready to start creating your own. Below is an example of a custom action in Automations. A custom action is a great place to run a if you want to modify something in the site's database.
Learn more about the Log liquid tag here: - one caveat, to read logs you won't usually be able to use pos-cli with a Siteglide site, use siteglide-cli instead:
We recommend for now creating Automations in the Siteglide Admin so that the triggers are correctly attached to the Form.
After this, you can pull with Siteglide CLI and modify the files, for convenience, should you wish.
Each automation Email body has an important section of YAML settings at the top. You can make any of these Liquid multiline if you want to use Liquid logic to determine them dynamically.
Use to, bcc, cc, reply_to and from for setting which email addresses should be used for each of these.
Subject does what you'd expect
Layout sets which Email Templates you want to use
Trigger condition of true
will allow the Email to send, false
will disable it.
Check how the to
line is made multiline to allow Liquid Logic- the two spaces indent is important. When you pull, you may find the syntax changes to a default.
When using CLI, make sure email templates are given the file_type, id and type metadata settings:
The ID must match the file name and be unique in your codebase.