> 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/sdocs/automation-and-document-lifecycle/automate-with-flow.md).

# Automate with Flow

Use this section when you need S-Docs actions inside **Salesforce Flow**.

Use Flow to generate, combine, refresh, email, and edit documents.

This section covers both background actions and screen-based experiences.

{% hint style="info" %}
Use **Screen Flow** when users need to review email or edit a document.

Use Flow actions when the work should run in the background.
{% endhint %}

### Start with the path that fits your goal

If users must enter values before generation, start with the input guide.

If the Flow should run document work automatically, use the action guides.

If users must review email or edit an existing file, use the screen guides.

<table data-column-title-hidden data-view="cards"><thead><tr><th>Title</th><th>Description</th><th data-card-target data-type="content-ref">Target</th></tr></thead><tbody><tr><td><strong>Generate documents from Flow</strong></td><td>PDF generation through Salesforce Flows</td><td><a href="/spaces/v7v0UNK83URKB2C83QVU/pages/40ZEQeEi8GoxAsw5IHt1">/spaces/v7v0UNK83URKB2C83QVU/pages/40ZEQeEi8GoxAsw5IHt1</a></td></tr><tr><td><strong>Email workflows in Flow</strong></td><td>Let users review the email on screen, or send it directly from an action.</td><td><a href="/spaces/WKNnJmhJBQwhdk5WBFsi/pages/bPEkZjlvkft8WQ2raJHY">/spaces/WKNnJmhJBQwhdk5WBFsi/pages/bPEkZjlvkft8WQ2raJHY</a></td></tr><tr><td><strong>Live Edit in Flow</strong></td><td>Let users choose an existing generated S-Doc and open it in Live Edit.</td><td><a href="/spaces/WKNnJmhJBQwhdk5WBFsi/pages/ZtOzVAburpQRWagCt83G">/spaces/WKNnJmhJBQwhdk5WBFsi/pages/ZtOzVAburpQRWagCt83G</a></td></tr></tbody></table>

### What you can do with S-Docs in Flow

Use S-Docs with Flow when you want to:

* collect user input before PDF generation
* generate documents for many records in one run
* combine or refresh generated S-Docs from Flow
* open the email editor or send email directly
* guide users into Live Edit in Experience Cloud

### Browse by topic

#### Generate and manage documents

* [Pass Screen Flow Inputs into Generated PDFs](/sdocs/automation-and-document-lifecycle/automate-with-flow/pass-screen-flow-inputs-into-pdfs.md)
* [Generate Documents in Batch with Flow](/sdocs/automation-and-document-lifecycle/automate-with-flow/generate-documents-in-batch-with-flow.md)
* [Combine Generated Documents with Flow](/sdocs/automation-and-document-lifecycle/automate-with-flow/combine-generated-documents-with-flow.md)
* [Refresh Data In Generated Documents with Flow](/sdocs/automation-and-document-lifecycle/automate-with-flow/refresh-generated-documents-with-flow.md)

#### Email workflows

* [Send Email from Flow](/sdocs/automation-and-document-lifecycle/automate-with-flow/send-email-from-flow.md)
* [Open Email Editor in Screen Flow](/sdocs/automation-and-document-lifecycle/automate-with-flow/open-the-email-editor-in-screen-flow.md)

#### Guided editing

* [Open Generated S-Docs in Live Edit from Screen Flow](/sdocs/automation-and-document-lifecycle/automate-with-flow/open-generated-s-docs-in-live-edit-from-screen-flow.md)

### Related note

Flow and record page components solve different problems.

Use [Generate S-Docs on Record Pages](/sdocs/automation-and-document-lifecycle/workflows.md) when actions should live directly on the Lightning record page.

Use [Using Salesforce Flows with S-Docs in Experience Cloud](/sdocs/automation-and-document-lifecycle/experience-cloud-site-setup-for-community-users-with-s-docs/using-salesforce-flows-with-s-docs-in-experience-cloud.md) when site users need guided Flow access.


---

# 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/sdocs/automation-and-document-lifecycle/automate-with-flow.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.
