Run an email alert or webhook after an approval

Run an email alert or webhook after an approval

Send an email, or call another system with a webhook, as soon as a specific approval workflow approves a record. This guide covers the approval-specific parts. For the general steps, see Create an email automation.

Availability: if this option is greyed out or missing, contact your Vizmo account manager.

Before you start

  • Set up the approval workflow first, in the same location and for the same module as the automation. For example, see Set up multi-level approvals for desk, room and parking bookings.
  • You need access to view workflows and permission to create them. To edit an automation you need update permission.
  • The Automation menu is not shown to employees or receptionists.
  • You can choose these modules: Visitors, Invites, Desks and Rooms (when those products are active), and Digital Registers (when active and your role can view registers). Parking bookings cannot trigger automations yet.

Set the approval trigger

  1. Go to Automation > Workflows and click Create.
  2. On the Details tab, enter a Workflow Name, choose the Module the approval uses, and choose Email Notification or Webhook as the Type.
  3. Choose the Created event.
  4. Click Add Condition and, under Select Field, pick your approval workflow by its name. Keep the operator as Is and choose Approved. Approvals offer only the Approved value. You can add more conditions if the automation should apply only to certain records.

    New Automation Details tab with approval condition

If you chose Email Notification

  1. Under Run Email Alert, choose Immediately to send the email once the record is approved. To send it later, choose At a relative time and set Date to schedule from, When, Amount and Unit.
  2. Click Next. On the Edit Email Alert tab, choose the Email Recipients, enter the Subject and write the content. Use Insert Placeholder to add details from the record.
  3. Click Save. The automation appears in the Workflows list.

If you chose Webhook

  1. Click Next to open the Edit Webhook tab.
  2. Enter the receiver's URL. Add URL Parameters or Request Headers if the receiver needs them.
  3. Choose the Body format: Default Payload, Form Data, x-www-form-urlencoded or Raw (Text, JSON or XML). Agree the format with whoever runs the receiving system.
  4. (Optional) Tick I want to secure this webhook and enter a Secret. Vizmo then adds a signature to each request in the X-Vizmo-Signature header, so the receiver can check that the request came from Vizmo.

    Edit Webhook tab with URL, Body and Secret

  5. Click Save. The automation appears in the Workflows list.

When it runs

  • It runs once, when the approval changes to Approved.
  • Later edits to a record that is already approved do not run it again.
  • For a delayed email that uses After record is created, the delay starts from the moment of approval. If the send time has already passed when the approval happens, the email is skipped.
  • Delayed emails for recurring invites and bookings are skipped.
  • Saving the automation does not send anything by itself.

Review or change it

Open the automation from the Workflows list. You can replace or remove the approval condition. If you delete the approval workflow it refers to, Vizmo removes that condition from the automation but does not delete the automation. Check the remaining conditions still match the records you want.

To see what happened after a matching approval, open the automation's Executions tab. See Check Automation executions and scheduled email results.

Troubleshooting

  • The approval is missing from Select Field. Check that the approval and the automation use the same module.
  • Nothing runs after an update. Check that the approval has only just changed to Approved, and that your other conditions match.
  • A scheduled email was skipped. Check its send time, and whether the record is recurring.
  • Saving fails with "Automation workflow feature is disabled". Automation is not available for your company. Contact your Vizmo account manager.
  • The email or webhook did not arrive. Open Executions to see whether it ran. If it ran, check the recipient's spam folder or the receiving system's logs.