> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dfns.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Notify approvers with Zapier

> Automate notifications to policy approvers using Zapier or other automation tools to send emails, Slack messages, or webhook events on approvals.

DFNS offers webhooks to notify your systems when events occur on your wallets. The `policy.approval.pending` event fires when an approval is requested. This guide uses it to trigger a Zapier (or similar) automation that emails the approver.

> [!TIP]
>
> A video walkthrough of the first steps is available at the end of this page.

**1. Create the base automation**

On Zapier, configure the trigger: "Webhooks by Zapier: Catch Hook"

&#x20;Get the **webhook url** from that first block: in "Test" and copy the address. It should be an `https://`  address.

![](https://mintcdn.com/dfns-6d8c7466/aH8Z4RyoX4Vg4edY/images/spaces_2FtnSPOZGQ2hBmgoVWX5H6_2Fuploads_2FbgZIGYkhH5TnxbNttGw3_2FCapture_20d_E2_80_99e_CC_81cran_202025-08-18_20a_CC_80_2013.26.22.png?fit=max\&auto=format\&n=aH8Z4RyoX4Vg4edY\&q=85\&s=68beef3f8caa250ced9f4f829b25970d)

**2. Create a Webhook on your DFNS organization**

On the DFNS dashboard, navigate to Settings > Webhooks (direct link: [https://app.dfns.io/settings/webhooks](https://app.dfns.io/settings/webhooks)) and click  **New Webhook**.

Copy your Zapier webhook URL into the "url" field, give a description and select "Specific Events" with only "**policy.approval.pending**", then save. You will have to 🔑 sign the creation with your passkey.

![DFNS webhook creation form with Specific Events and policy.approval.pending selected](https://mintcdn.com/dfns-6d8c7466/KRgJdtZh7R28b6JK/images/auto/creating-a-webhook-1.png?fit=max\&auto=format\&n=KRgJdtZh7R28b6JK\&q=85\&s=1689a55f74050e1ba4cc10f638b09419)

> [!TIP]
>
> The basic architecture is in place. Now configure the actions.

**3. Create a policy to request approval**

Make sure you have a policy to trigger. For example a policy that always trigger on transfer requests.

You can follow the following tutorial to create it: [Create policies](https://docs.dfns.co/guides/create-policies.md)

Trigger the policy (for example by requesting a transfer) so that Zapier receives the information and can help you use the data to write an email.

**4. Send an email from your automation**

Add an action "Email by Zapier: Send Outbound Email" connected to your Webhook trigger.

![](https://mintcdn.com/dfns-6d8c7466/aH8Z4RyoX4Vg4edY/images/spaces_2FtnSPOZGQ2hBmgoVWX5H6_2Fuploads_2FBZIUC55rBb8RokmIPBSm_2FCapture_20d_E2_80_99e_CC_81cran_202025-08-18_20a_CC_80_2013.47.45.png?fit=max\&auto=format\&n=aH8Z4RyoX4Vg4edY\&q=85\&s=d5a1c387c34b7c69570dcab320ce4cf8)

Configure the email by entering the list of recipients, a topic, and a message.

Example of message:

```
Hello! 

Please review and approve the following transfer request:
[1. Kind] transfer of [1. Asset Symbol] to the wallet [1. To] on [1. Network]. 

Transfer id is: [1. TransferRequest Id]

Please login to https://app.dfns.io/policies/approvals to accept or refuse. 
```

Save, Publish and trigger a transfer to test the automation!

> [!TIP]
>
> You're now sending an email each time an approval is requested.

**5. Going further: display the amount properly**

DFNS displays asset amounts with the network maximum precision, and provides a description of the number of decimals. So in order to display the amount properly, you need to divide $amount$  by $10^{decimals}$. In the example below: `1000000000` for `7` decimals so $1000 000 00 / 10^7 = 100$ units!

In Zapier, insert a block "Formatter by Zapier: Numbers" before the email block.

Configure the fields:

* Transform: Perform Math Operation
* Operation: Divide
* Input:
  * \[1. Amount]
  * 10^\[1. Asset Decimals]

![](https://mintcdn.com/dfns-6d8c7466/2kpqVE6bPN0ElHJ8/images/spaces_2FtnSPOZGQ2hBmgoVWX5H6_2Fuploads_2FrgkBWMHzNyeDfwjCevbP_2FCapture_20d_E2_80_99e_CC_81cran_202025-08-18_20a_CC_80_2014.03.14.png?fit=max\&auto=format\&n=2kpqVE6bPN0ElHJ8\&q=85\&s=e564da736c253d97a6bb7ed93aa19dec)

You can now update the email body to display the output:

```
[1. Kind] transfer of [2. output] [1. Asset Symbol] to the wallet [1. To] on [1. Network]. 
```

Publish and trigger a policy to test again!

> [!TIP]
>
> The amount now displays in human-readable units.

**6. Going even further: query additional information about the request**

DFNS provides a wide-range catalog of APIs to refine your email.

For instance, the webhook sends the "Initiator Id" (`us-*****-*****-********`), which represents the user who triggered the policy. Let's get his information and include those in the email!

You need a token to access the API. The best way is to create a service account, follow the tutorial on the page: [DFNS API using a service account](https://docs.dfns.co/introduction/quickstart/6-non-custody-1-2-dfns-api-using-a-service-account.md) until you get a token. For rapid testing you can also copy your current session token from the dashboard (Settings > Personal Access Tokens > Copy the JWT token) but this token expires quickly so it's only good for temporary testing.

Copy your token

> [!WARNING]
>
> Keep your token secret (and disable it when you don't need it anymore)!

In Zapier, add a "Webhooks by Zapier: GET" after the formatter block, and configure the following fields:

* **URL:** `https://api.dfns.io/auth/users/[1. Requester User Id]`
* **Headers:** add one called Authorization, with value: "`Bearer <paste your token>`"

And finally, update the email body to use the new data you gathered. For example:

```
Please review and approve the following transfer request from [3. Name]:
```

Publish and trigger a policy to test again!

> [!TIP]
>
> The email now includes details fetched from the DFNS API.

You can now go as far as required to get more data about the event, refine the mail. Use our [API reference](https://docs.dfns.co/api-reference.md) to learn what you have access to!

### Video tutorial

[Loom video player](https://www.loom.com/embed/b2475c3aafb24ccb9000df59dc958d47)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.