> ## 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 Triggers by Envelope Topic

> Limit Power Automate flow triggers to specific envelopes using topic filters

## Overview

Sometimes you only want to trigger a flow for specific envelopes, not all envelopes in your SignatureAPI account.

In this example, we’ll trigger a flow only for envelopes created by the Sales Department. These envelopes use the topic `sales_department`.

This guide shows how to filter envelopes that trigger a flow in Power Automate. You’ll learn how to set up a trigger that fires only for envelopes with a specific topic.

## Creating the Envelope

This guide assumes you already have a Power Automate flow that creates and starts envelopes using the **"Create an envelope"** action from the SignatureAPI connector.

Make sure that flow includes a topic in the **"Envelope Topics"** field under Advanced parameters. In this case, use the topic `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" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/envelope-topics.png" />

## Trigger a Flow for Selected Envelopes

Let’s create an automated flow in Power Automate that starts when a deliverable is generated.

1. Go to **Power Automate** and select **Automated Cloud Flow**.
2. Name your flow and choose the trigger **"When a deliverable is generated"** from the SignatureAPI connector.

<Frame>
  <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="Trigger" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/trigger.png" />
</Frame>

3. In the **"Topics"** field of the trigger, enter `sales_department`. This filters the trigger to only fire for envelopes with this topic.

This works like a labeling system. Only envelopes tagged with a matching topic will trigger the flow. This let you route envelopes to different flows based on their topics.

<Frame>
  <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="Filter" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/add-topics.png" />
</Frame>

## Continue the Flow

Now add the actions that follow the trigger.

1. Add the **"Get a Deliverable"** action.
2. Use dynamic content to select the correct **Deliverable ID** from the trigger.

<Frame>
  <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 deliverable" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/get-deliverable.png" />
</Frame>

Next, send an email to the correct department.

1. Add the **"Send an email"** action from the Microsoft Outlook connector.
2. In the **"To"** field, enter the department’s email address.
3. Attach the signed contract file using the **"File Content"** from the **"Get a Deliverable"** action. In this example we used the envelope ID as the file name, but you can use anything you want, just include the `.pdf` extension.

<Frame>
  <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 email" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/filter-webhooks-flow/send-email.png" />
</Frame>

## Result

This flow will run only when a deliverable is generated for envelopes with the topic `sales_department`. It will get the signed document as a PDF file and send it by email to the correct department.

## Test Your Automation

Test the full workflow:

1. Save your Power Automate flow.
2. Create a new envelope with the topic `sales_department`.
3. Sign the document.
4. Check that the correct email is received with the signed PDF attached.

## Keep Learning

* Learn more about [Topics and Filters](/docs/integrations/power-automate/envelopes/topics)
* Read about the [When the deliverable is generated](/docs/integrations/power-automate/triggers/deliverable-generated) trigger
