> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/s-sign/automation-and-envelope-lifecycle/automate-e-signature-with-flow-builder/automate-e-signature-in-batch.md).

# Automate E-Signature in Batch

{% columns %}
{% column %}

<figure><img src="/files/0IAoycPJGoiJAfexxKV8" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="/files/OkerCbaPzTU6D212mURI" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Understanding the Overall Schema

Outlined above is the generalized process from start to finish users will take to generate an S-Sign Request using a Record Triggered Flow.

The process goes as follows:

1. **Collect Data** that will be used for document generation (S-Sign Enabled Template + Object Record)
2. **Generate the document** from the collected data
3. **Prepare the Envelope** the Generated Document will be stored in
4. **Seal the Envelope** in preparation to deliver the request
5. **Send** out the request for Electronic Signature

This use case is more unique, considering we couple the use of a **Screen Flow** to do the data collection and document generation in batch, then leverage a **record-triggered after save flow** to create, seal, and deliver the envelope.

***

<figure><img src="/files/ljBkOnA10rfVYw2FuFVN" alt="" width="375"><figcaption></figcaption></figure>

### Phase 1: Configure the Batch Generation

In large the screen flow is our standard document generation steps through flows. With batch generation, the key characteristic that needs to be focused on is the input variables. **The Base Record IDs and Template IDs inputs only accept Collection variables.** After we use the Get Records Invocable Actions to find the data we want to generate, we will use the assignment variable to assign both the templates and object records to collections. Then we feed the collections into the Generate in Batch Invocable Action.

***

### Phase 2: Construct the Record-Triggered Flow

1. Construct the Flow using the same process outlined in [Automate E-Signature with Record-Triggered Flows](broken://pages/Z16aTpy1ePskSAqviQKZ)
2. Ensure all Invokable Actions are added to the **Asynchronous Path**
3. Do not include any invokable actions that are included in **Phase 1**
4. Add the **Triggering S-Doc ID** to the collection, this will be provided to the **Attachments** option in the **Send Email** invocable action&#x20;

<figure><img src="/files/fegCiHbSH6CdDUSJY0g4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Record-Triggered Flows will batch all qualifying records into a single transaction. Restrict the number of S-Docs generated in Phase 1 to avoid encountering Salesforce Governor Limits.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.sdocs.com/s-sign/automation-and-envelope-lifecycle/automate-e-signature-with-flow-builder/automate-e-signature-in-batch.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
