With Coralogix, you can create [alerting](https://coralogix.com/docs/user-guides/alerting/create-an-alert/logs/threshold-alerts/index.md) email templates using our [custom alert webhooks](https://coralogix.com/docs/user-guides/alerting/outbound-webhooks/generic-outbound-webhooks-alert-webhooks/index.md). These templates allow you to embed details from a log, metric, trace, or security event that triggered an event into your email subject or body, resulting in easier and more informative email notifications.

## Overview

This tutorial provides step-by-step instructions on how to set up an alerting email template with Coralogix, using [Zapier](https://zapier.com/) as a use case. It walks you through the process of setting up a Zapier account, creating a Zap with a trigger and an action, and configuring the webhook as a trigger. It then demonstrates how to catch a webhook from Coralogix and send an email as a response.

## Set up an alerting email template

### Create a Zap

1.

Set up a [Zapier](https://zapier.com/) Premium account.

2.

From your Zapier dashboard, click **+** **Create a Zap** in the upper right-hand corner.

You will be asked to configure your **Trigger** and **Action**.

### Configure the trigger

1.

Configure the Coralogix webhook as a **Trigger**.

- Click Trigger.
- Select Webhook in the bottom right-hand corner.
- Choose an event. Select **Catch Hook** from the drop-down menu.
- Click **Continue**.

2.

Click **Test** to test the trigger.

3.

You will be presented with a custom webhook URL. Click **Copy** to copy it to your clipboard.

### Configure the custom webhook

1.

Access **Integrations**, then **Integrations**, then **Outbound Webhooks**, then **Generic Webhook**.

2.

In the upper right hand corner, click **+ ADD NEW.** In the dropdown menu, select **Webhook** (generic).

3.

Define the webhook settings. Paste the webhook URL in the URL field.

4.

Click **SAVE**.

### Configure the action

1.

Return to your Zapier account to define the **Action**. The action in this case is sending an email.

- Click **Action**.
- Select the **Action** of choice. In this example, the user has chosen Gmail.
- In the dropdown event menu, select **Send an Email**.
- Click **Continue**.

2.

Validate that the selected email is correct. Click **Continue**.

3.

Define the **Action** settings.

- In order for the Data fields to appear, revert back to your Coralogix webhook and click **TEST CONFIG**. Then, in your Zapier account, click **TEST TRIGGER**. Within seconds, you should receive confirmation of the webhook catch with all of the data from your customized alert.

- Click **Send Email in Gmail**. Fill in the fields.

  - **To**. Enter text or data. Use a parameter from the webhook or input a fixed addressee for the webhook.
  - **From**. Select the email that you are using in this configuration.
  - **Subject** (required). Input the parameters of your webhook. In the example below, service name has an alert with field keys, including team / application / subsystem / severity, etc. Note that you have the option of formatting the data.
  - **Body type**. Select **plain**.
  - **Body** (required). In the example below, error, trigger, alert URL, and service name are used. Text has been added as well.
  - **Attachment**. If relevant, attach a Runbook, for example.

- Click **Continue**.

4.

Click **Test Step**.

5.

Revert back to your saved Coralogix webhook. Click **TEST CONFIG**. Verify whether that webhook addressee has received an email.

## Next steps

Configure Google Chat alert notifications with [Alert webhook with GCP Chat](https://coralogix.com/docs/user-guides/alerting/outbound-webhooks/alert-webhook-with-gcp-chat/index.md).

## Support

Reach our customer success team 24/7 via the in-app chat or by email at [support@coralogix.com](mailto:support@coralogix.com).
