---
title: "Send File via SignNow by File Name"
url: "https://docs.signnow.com/docs/apex-send-file-name"
type: "page"
section: "Integrations"
slug: "apex-send-file-name"
---

# Send File via SignNow by File Name

# Apex action: Send File via SignNow by File Name

> Before configuring this Apex action, review the [prerequisites](/docs/salesforce-apex-actions#prerequisites) for SignNow Apex actions and complete the required setup steps.

The **Send File via SignNow by File Name** action allows users to send a record attachment for signature based on the file name and Salesforce actions. 

For example, let’s configure the file to be sent once the Opportunity name is changed.

## Prerequisites

Prepare a file with tags.

Refer to the [Send a PDF attachment with tags from a Salesforce record](/docs/salesforce-send-attachment-with-tags#step-1-generate-a-pdf-purchase-agreement) guide for instructions on adding text tags and assigning them to roles.

## Step 1. Configure the flow trigger

We will start with configuring the flow trigger.

- Select the object which record triggers the flow. For our example, it is **Opportunity**.
- Select when the flow should be triggered. For our example, `A record is updated`.
- Set entry conditions (condition requirements, record field, operator, and value). For our example, the condition field is `Name`, and the condition operator is `Is Changed`.
- Select how often the flow should run.

![apex_file_name_trigger.png](/reference-assets/images/SignNow_Salesforce/apex_actions/apex_file_name_trigger.png)

When the trigger settings are ready, click the **+** icon to add the SignNow action to the flow. 

## Step 2. Configure the Send File via SignNow by File Name action

Select **Send File via SignNow by File Name** in the list of actions.

Now, let’s configure the SignNow action.

- Enter an action label and brief description to locate the flow.
- Specify the input values for the SignNow action. In our example, these are the match option, file name, record ID, and SignNow document flow ID.
    - Set the match option for the file name that will be sent for signature. In our example, `Exact Match` is set to `true`, which means the file name must exactly match the value in the file name field.
    
    > If `Exact Match` is set to false, the search may return multiple files that contain the file name. In this case, these files will be merged into a single document group.
    
    - Enter the name of the file that should be sent for signature.
    - Enter the record ID which will trigger the action. In our example, it is **Triggering Opportunity > Opportunity ID**.
    - Add the SignNow Document Flow ID to send the file based on the pre-set scenario.

   > Copy the SignNow flow ID on the **SignNow Admin Tools** > **Document Flows** page.

🔴 Ensure that the recipient role's name in the document flow corresponds to the file role's name.

![apex_file_name_action_settings.png](/reference-assets/images/SignNow_Salesforce/apex_actions/apex_file_name_action_settings.png)

Once the configuration is ready, click **Save** and activate the flow.

## Result

Each time the Opportunity name changes, the file with the matching name will be sent for signature to recipients configured in the SignNow document flow.

---

View the full list of [SignNow Apex actions](/docs/salesforce-apex-actions).


---
*Full page: https://docs.signnow.com/docs/apex-send-file-name*
