> ## Documentation Index
> Fetch the complete documentation index at: https://signatureapi-daf4ee54.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Filter SignatureAPI Webhook Notifications Using Microsoft Power Automate

> Route webhook notifications to specific departments by filtering on envelope topics in Power Automate

## Overview

This tutorial shows you how to filter SignatureAPI webhook notifications in Microsoft Power Automate so that only the right department receives alerts for relevant signing events. By using envelope topics as labels, you can route completed documents (such as signed contracts or financial agreements) to the correct team automatically, without writing custom code or building complex conditional logic.

### What You'll Learn

* How to configure a SignatureAPI trigger in Power Automate to listen for specific events.
* How envelope topics work as a labeling system for routing notifications.
* How to filter webhook notifications so only matching envelopes trigger your flow.
* How to retrieve a signed deliverable from SignatureAPI.
* How to send a targeted email notification with the signed document attached.
* How to test and verify the end-to-end filtering workflow.

### The Problem

Organizations that process many signature requests often face challenges when all webhook notifications flow into a single channel. Common pain points include:

* **Notification overload** - every department receives alerts for every completed envelope, creating noise and causing important documents to get buried.
* **Manual sorting** - team members spend time reviewing notifications to determine which ones are relevant to their department.
* **Delayed responses** - when the right people are not notified promptly, follow-up actions (filing, countersigning, client communication) are delayed.

### How Automation Helps

Automation simplifies notification routing by:

* Filtering webhook events at the trigger level using envelope topics, so irrelevant envelopes never start the flow.
* Delivering signed documents directly to the responsible department's inbox without manual intervention.
* Eliminating the need for shared inboxes or manual forwarding between teams.
* Scaling effortlessly as you add new departments or document types, since each topic can have its own dedicated flow.

## Requirements

Before starting, make sure you have:

* **Power Automate** - To build the automated workflow.
* **SignatureAPI account** - For electronic signatures and webhook triggers.
* **Microsoft Outlook account** - To send email notifications to the target department.

This tutorial also assumes you have an existing Power Automate flow (or another process) that creates and starts envelopes with SignatureAPI. That flow must include a topic in the envelope body using the **Envelope Topics** field under Advanced parameters. In this example, the topic is `sales-department`.

<img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/envelope-topics.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=e1ea72704a8a7ea6259df863c42ce135" alt="Envelope topics configuration showing &#x22;sales-department&#x22; as the topic value" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/envelope-topics.png" />

**Important:** Topics act as labels on envelopes. When you assign a topic during envelope creation, you can later use that same topic in a trigger to ensure only matching envelopes activate your flow.

## Flow Overview

The automation process follows these steps:

1. **Trigger:** A SignatureAPI webhook fires when a deliverable is generated (a signed document becomes available).
2. **Filter:** The trigger's topic filter ensures the flow only runs for envelopes tagged with the matching topic (for example, `sales-department`).
3. **Retrieve:** The flow fetches the signed deliverable from SignatureAPI.
4. **Notify:** An email with the signed document attached is sent to the designated department.

Here's what your final Power Automate flow will look like:

<img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/complete-flow.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=253328c36b754da2f31e1dd428691caa" alt="Complete Power Automate flow showing the trigger, get deliverable action, and send email action" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/complete-flow.png" />

## Step-by-Step Tutorial

Follow these steps to build a Power Automate flow that filters SignatureAPI webhook notifications by topic and sends targeted email alerts to the appropriate department.

### Step 1: Create the Flow and Configure the Trigger

Start by creating a new automated flow with a SignatureAPI trigger that listens for deliverable generation events.

#### 1.1 Create the Flow

1. Go to **Power Automate** and select **Automated Cloud Flow**.
2. Give your flow a descriptive name (for example, "Sales Department - Signed Document Notification").
3. Choose the trigger **When a deliverable is generated** from the SignatureAPI connector.

   <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/trigger.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=8cccc42609de1a3bd7b8e2cb89ce0ecf" alt="SignatureAPI trigger selection showing &#x22;When a deliverable is generated&#x22;" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/trigger.png" />

#### 1.2 Add a Topic Filter to the Trigger

The topic filter is what makes this flow department-specific. By setting a topic on the trigger, you ensure that only envelopes created with the same topic will activate this flow.

1. In the trigger configuration, locate the **Topics** field.
2. Enter the topic value that matches the one used during envelope creation. In this example, enter `sales-department`.

   This means the trigger will only fire when a deliverable is generated for an envelope that was created with the `sales-department` topic. Envelopes with different topics (or no topic at all) will not activate this flow.

   <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/add-topics.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=599670c053c3de281287cac75acdd548" alt="Trigger configuration with &#x22;sales-department&#x22; entered in the Topics field" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/add-topics.png" />

**Important:** The topic value in the trigger must exactly match the topic assigned to the envelope during creation. Topics are case-sensitive, so `sales-department` and `Sales-Department` are treated as different values.

### Step 2: Retrieve the Signed Document

Once the trigger fires, you need to fetch the actual signed document so you can attach it to the notification email.

1. Add a new action and select **Get a Deliverable** from the SignatureAPI connector.
2. In the **Deliverable ID** field, use dynamic content to select the deliverable ID provided by the trigger.

   This action downloads the signed PDF so it can be used in subsequent steps.

   <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/get-deliverable.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=89123cc50ff7f703de7452d30159f545" alt="Get a Deliverable action with Deliverable ID populated from dynamic content" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/get-deliverable.png" />

### Step 3: Send the Email Notification

Now configure the email that will deliver the signed document to the target department.

1. Add the action **Send an email (V2)** from the Microsoft Outlook connector.
2. In the **To** field, enter the email address of the department or team that should receive the notification (for example, `sales-team@yourcompany.com`).
3. Fill in the **Subject** and **Body** fields with a clear message indicating a signed document is ready for review.
4. In the **Attachments** section, use dynamic content to attach the file:

   * Set **Attachments Name** to a descriptive filename ending in `.pdf` (for example, `signed-contract.pdf`).
   * Set **Attachments Content** to the **File Content** value from the **Get a Deliverable** action.

   <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/send-email.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=4f83f6c306fbc34e573d181b8a47347b" alt="Send an email action configured with recipient, subject, body, and the signed document attached" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/send-email.png" />

### Step 4: Test Your Automation

With the flow saved, run an end-to-end test to confirm everything works correctly.

1. Save your Power Automate flow and make sure it is turned on.
2. Using your envelope creation flow (or the SignatureAPI dashboard), create a new envelope with the topic `sales-department`.
3. Complete the signing process for that envelope.
4. Verify the following:
   * The flow run appears in Power Automate's run history with a **Succeeded** status.
   * The target department receives an email with the signed PDF attached.
   * Envelopes created without the `sales-department` topic do **not** trigger this flow.

*Use the following checklist:*

* [ ] Flow run shows as **Succeeded** in Power Automate.
* [ ] Email notification arrives at the correct department inbox.
* [ ] The signed PDF is attached and can be opened.
* [ ] Envelopes with different (or no) topics do not trigger the flow.

## Troubleshooting & FAQ

### Common Issues:

* **Flow does not trigger:** Confirm that the topic on the envelope matches the topic in the trigger exactly, including case sensitivity. Also verify that the SignatureAPI connection in Power Automate is authenticated and active.
* **API key or connection errors:** Open the SignatureAPI connection in Power Automate and re-authenticate if needed. Make sure you are using a valid API key for the correct environment (test or live).
* **Email not received:** Check the recipient address for typos, review the Outlook connector's run output for errors, and look in the recipient's spam or junk folder.

### Frequently Asked Questions:

* **Can I filter by multiple topics in a single flow?**
  Each trigger supports one topic value. If you need to route notifications for multiple topics into the same flow, create a trigger for each topic or use a condition action after the trigger to check the topic value.

* **How do I set up filtering for additional departments?**
  Duplicate this flow and change the topic in the trigger to match the new department's topic (for example, `legal-department` or `hr-department`). Then update the recipient email address accordingly.

* **Can I send notifications to Slack or Teams instead of email?**
  Yes. Replace the Outlook **Send an email** action with a Slack or Microsoft Teams action. The rest of the flow (trigger, topic filter, and deliverable retrieval) remains the same.

## Best Practices & Security

* Store your SignatureAPI API key securely using Power Automate's connection management. Never hard-code keys directly in flow expressions.
* Monitor your flow runs regularly in Power Automate to catch failures early, especially after making changes to envelope topics or connector settings.
* Document each department's topic value and corresponding flow in a shared location so your team can onboard new departments or update routing without confusion.

## Additional Resources

* [SignatureAPI Documentation](https://signatureapi.com/docs)
* [Microsoft Outlook Documentation](https://support.microsoft.com/outlook)
* [Power Automate Community](https://powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity)

## Conclusion

You have successfully built a Power Automate flow that filters SignatureAPI webhook notifications by envelope topic and routes signed documents to the appropriate department via email. This approach keeps each team focused on the documents that matter to them, without manual sorting or shared inboxes.

**Happy Automating!**
