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

# Send File via SignNow by File ID

# Apex action: Send File via SignNow by File ID

> 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 ID** action allows users to send a specific attachment for signature based on Salesforce events.

For example, let’s configure the file to be sent once the Contact’s last 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 **Contact**.
- 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 `Last name`, the condition operator is `Is Changed`.
- Select how often the flow should run.

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

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

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

Select **Send File via SignNow by File ID** 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 file ID, record ID, and SignNow document flow ID.
    - Enter the ID of the file that will be sent for signature.
    
    > To find the file ID, go to the record where the file is attached. Click **Notes and Attachments,** then click the dropdown arrow next to the file you want to send. Select **View File Details**. Retrieve the file ID from the URL.
    
    - Enter the record ID which will trigger the action. For our example, it is **Triggering Contact > Contact 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. Otherwise, you may encounter this error:

```json
No recipients were provided, or there is a mismatch between the recipient role and document flow role, or the recipient email is incorrect. Please check the file/template, or document flow settings.
```

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

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

## Result 

Each time the Contact name changes, the selected file 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-id*
