> For the complete documentation index, see [llms.txt](https://docs.copperx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.copperx.io/integrations/zapier.md).

# Zapier

This documentation explains the steps to create a Zap that will trigger an email to be sent to your customers as soon as their payment is completed using Copperx as the payment gateway.

To create Zapier Automation:

1. Login to your [Zapier](https://zapier.com/) account and click on the **Create Zap** button from the Sidebar.

   <figure><img src="https://60990970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7qZmedrOAKP6cOGNSa8%2Fuploads%2FH838RdrLFmje86KKBEFS%2Fcreate.png?alt=media&amp;token=93508e92-bf10-4e5a-a448-14d05e412600" alt=""><figcaption></figcaption></figure>

2. Now in the **Trigger**, search for the "Copperx" app and select **Checkout Session Completed** as the event and click **Continue**.

   <br>

   <figure><img src="https://60990970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7qZmedrOAKP6cOGNSa8%2Fuploads%2FDk7aEk626WwPH4MBDNWm%2Fstep-2.png?alt=media&amp;token=579c0238-6eae-4619-95a5-1d6cc03708e4" alt=""><figcaption></figcaption></figure>

3. Next is to test the trigger, for that you need to copy the **webhook URL** and add it to the Copperx [webhooks settings](https://dashboard.copperx.io/developer/webhooks) as new webhook endpoint. (**Note :** you can test trigger by switching to Testnet and adding the copied URL to webhooks settings, but be sure to remove the URL from Testnet after the successful payment test.)

   <br>

   <figure><img src="https://60990970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7qZmedrOAKP6cOGNSa8%2Fuploads%2FX0BNqKQunBj2kXYy8orD%2Fcopperx-webhook.png?alt=media&amp;token=eff618f2-c3d1-4653-8b3d-41d7122b61ae" alt=""><figcaption></figcaption></figure>

4. Next, select the email app you want to use as the **Action** app. For example, you could choose Gmail, Outlook, or any other email service and select "Send Email" as the event. Now, click **Continue** and log in to your email service.

   <figure><img src="https://60990970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7qZmedrOAKP6cOGNSa8%2Fuploads%2FzVWkB6I6uqJWsACXJ8Kk%2Fgmail.png?alt=media&amp;token=ac082cbf-5115-49a5-b8ce-125c2c28ce8d" alt=""><figcaption></figcaption></figure>

5. Now, you need to fill the **Email** **To** field as the "Customer Email" from the given option data and fill other relevant fields such as email subject and body as per your business needs.

   <br>

   <figure><img src="https://60990970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7qZmedrOAKP6cOGNSa8%2Fuploads%2FY3tKReeXd0sL4V2nqYpR%2Fsend.png?alt=media&amp;token=3ebc3b62-af25-46e6-b1f4-1f66e22475d0" alt=""><figcaption></figcaption></figure>

6. At this stage, you can test your Zap and **Publish** it.<br>

   <figure><img src="https://60990970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7qZmedrOAKP6cOGNSa8%2Fuploads%2FPCJhaVgv7tOO1TBzr7vT%2Fcopperx-gmail.png?alt=media&amp;token=490f1ccd-5166-46bc-91fd-f570043d8fd6" alt=""><figcaption></figcaption></figure>

Once you've completed these steps, you're ready to send customized emails to your customers through this automation.
