> ## Documentation Index
> Fetch the complete documentation index at: https://wordsmithai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Make

> Hand legal work to Wordsmith from a Make scenario, and start a scenario when Wordsmith work changes.

The Wordsmith app for Make lets a scenario ask agents, review, draft and edit documents, manage tasks and files, build reports and repositories, and search legal sources. A scenario can also start the moment something happens in Wordsmith: a task is created, assigned, completed or commented on, a review or a job finishes, an agent waits for a person, or documents reach a repository.

> [!NOTE]
>
> The app is not yet in Make's app directory: Make is reviewing it. Until then, you install it from an invitation link. See [Install the app](#install-the-app).

## Install the app

1. Ask [support@wordsmith.ai](mailto:support@wordsmith.ai) for the Make invitation link.
2. Sign in to Make as someone who can install apps in your organisation, open the link, and click **Install**.
3. In a scenario, add a module and search for **Wordsmith**. The app shows as a custom app, and every scenario builder in your Make organisation can use it.

## Connect

1. In Make, add a Wordsmith module and click **Create a connection**, or **Add** next to **Connection** if you already have one.
2. Choose the **Connection type**:
   * **Wordsmith** (recommended): click **Save**, sign in to Wordsmith, and approve the access Make asks for. The connection acts with your access, so a scenario can do only what you can do. You can disconnect it in Wordsmith under **Settings → App access**.
   * **Wordsmith (API key)**: in Wordsmith, open **Settings → API keys**, create a key, and paste it. The connection acts with the access of the person who created the key. Make checks the key when you save.
3. Leave **API host**, which you see after turning on **Advanced settings**, as it is: it comes filled in with `api.wordsmith.ai`. Change it only if Wordsmith asks you to, for example to `api.us.wordsmith.ai` to call the US region directly. Your data stays in its region either way, because the main host forwards each request to your organisation's region.

To have tasks start an agent, open each agent in Wordsmith and add **API** as an intake on its configuration page.

A sign-in connection keeps working while Make uses it. You sign in again if you or an admin disconnect Make, if Make does not use the connection for 90 days (365 days for a connection behind an instant trigger, counted from its last event), or if your organisation requires apps to reconnect after a set time. Until then, modules and polling triggers stop with a connection error. An instant trigger shows no error: it stops receiving events, and Wordsmith notifies the person who connected it. After signing in again, recreate the trigger. An API key does not expire this way, so use one for scenarios that must run unattended for a long time. An instant trigger can still stop: if every delivery to its webhook endpoint fails for 2 days, Wordsmith stops sending to it and notifies its owner. See [Delivery](https://wordsmithai.mintlify.site/webhook-endpoints.md#delivery).

When an app update adds modules that need more access than your connection has, those modules stop with a `403` that names what is missing. Open the connection in Make, click **Reauthorize** and approve again. For an API key limited to some scopes, use a key with the access the `403` names.

## Modules

| Group | Modules |
| - | - |
| Agents | **Ask an agent** asks an agent, with optional files, and waits up to 30 seconds for the answer. **Get an answer** gets it later. **Find an agent**, **Find a conversation** |
| Documents | **Review a document** against a playbook, your instructions, or the other side's edits. **Draft a document** from instructions or a blueprint. **Redline a document**, **Compare two documents**, **Convert a document**, **Translate a document**, **Redact a document**, **Accept all tracked changes**, **Merge documents into one PDF**, **Find a review**, **Find a blueprint** |
| Jobs | **Wait for a job**, **Get a job**, **Cancel a job** |
| Tasks | **Create a task**, **Update a task**, **Add a comment to a task**, **Attach files to a task**, **Find a task**, **Get a task's files**, **List a task's comments**, **Reply to the person who sent a task** |
| Reviews | **List a review's findings**, **Create a redline from a review**, **Find a playbook** |
| Repositories | **Create a repository**, **Add documents to a repository**, **Find a repository**, **List a repository's documents**, **Search your documents** |
| Reports | **Create a report**, **Add documents to a report**, **Run a report**, **Export a report**, **Find a report**, **Get a report's answers** |
| Research | **Search legal sources** |
| Files | **Upload a file** (up to 1 GB), **Import a file from a link** (up to 100 MB), **Create a document from text**, **Get a file**, **Get a file's text** |
| Other | **Find a user**, and **Make an API call** for any other [Wordsmith API](https://wordsmithai.mintlify.site/introduction.md) route |

Modules that take a document take its **File ID**. Upload it with **Upload a file** first, or use a File ID from another Wordsmith module or trigger.

**Reply to the person who sent a task** replies through the channel the task came from, such as email. A reply into a personal mailbox is saved as a draft for its owner to send, and **Delivered** is false.

## Work that takes a while

A Make module stops after 40 seconds, so reviews, drafts and document actions return a **job** instead of the finished result. Finish it one of two ways:

* **Long work, such as a review or a draft:** build a second scenario that starts with **Watch finished jobs**. It runs when the job finishes, however long that takes, and carries the job's result, such as the review ID or the new file's ID. Then use **Find a review**, **List a review's findings** or **Get a file**. It also starts when a job fails or is cancelled, so add a filter on the job's **Status** equal to `succeeded` before the modules that use the result.
* **Quick work, such as a conversion:** add **Wait for a job** after the module that started it. It waits about 30 seconds. If the job is still running, it stops with an error that names the job; check the job later with **Get a job**. Running the scenario again starts a new job.

To keep longer work in one scenario, as in the [example](#example-check-each-new-nda-and-comment-the-findings), put Make's **Sleep** module (up to 300 seconds) before **Wait for a job**. Sleep can't know how long the work takes, so also give **Wait for a job** a **Break** error handler: Make then stores the run and retries the module, as many times and as far apart as you set. Turn on **Allow storing of incomplete executions** in the scenario settings for it.

**Ask an agent** waits up to 30 seconds. If the agent is still working, **Status** is `in_progress`: use **Get an answer** later, or **Watch finished jobs** with the answer's **Job ID**. An agent that declines answers with **Status** `filtered` and a **Decline reason**.

A failed or cancelled job fails **Wait for a job** with the reason. To try again, run the module that started the job again.

## Triggers

Instant triggers start a scenario within seconds.

| Trigger | Starts when |
| - | - |
| **New task** | A task you can see is created. |
| **Task assigned** | A task is created already assigned, or gets a new assignee, team or agent. Turn on **Only tasks assigned to me** to skip the rest. |
| **Task status changed** | A task's status changes. **New status** is Completed by default; leave it empty for every change. |
| **New task comment** | Someone comments on a task you can see. Gives the task and the comment. |
| **Review completed** | A review finishes, wherever it was started: the web app, Word or the API. |
| **Agent waiting for input** | An agent stops to wait for a person, such as an approval. |
| **Agent input answered** | A person answers an agent's request, or the request is cancelled. |
| **Documents added to a repository** | Documents are added to a repository you can see. |
| **Repository indexing finished** | A repository you can see finishes indexing its new documents. |
| **Report run finished** | A run of a report you can see finishes. |
| **Watch finished jobs** | A review, draft, document action or other job you started finishes. |
| **Any Wordsmith event** | Any event of the types you choose. It gives the event as Wordsmith sends it, with IDs only. |

Adding an instant trigger to a scenario creates a [webhook endpoint](https://wordsmithai.mintlify.site/webhook-endpoints.md) in Wordsmith, and deleting the trigger's webhook in Make deletes it. You'll see it in **Settings → Configurations → Webhooks**, marked as created by Make. A user can hold 100 of these, and your organisation 1,000. Each trigger has its own endpoint, so one event starts every scenario that listens for it.

A trigger reads the task, review, repository or report its event names, so the scenario gets the whole record. If an event arrives but that item can no longer be read, because it was deleted or your access changed, the run fails with that reason. If you lose access to an item, Wordsmith sends no more events for it, so the scenario doesn't run at all. If instant triggers are not on for your organisation, adding one fails with `Instant triggers aren't on for your organisation yet`. Ask your Wordsmith contact. Meanwhile, **New task**, **Task status changed** (for completed tasks) and **Review completed** have the polling versions below. The other instant triggers have none: instead of **Watch finished jobs**, use **Wait for a job** or **Get a job**.

Three polling triggers check Wordsmith on the scenario's schedule instead:

* **New task (polling)** gives new open tasks you are involved in: you created them, are assigned, or they are shared with you. Each run reads all your open tasks and returns up to **Limit** new ones, 10 by default. Set **Limit** above the number of tasks you expect between runs. It goes by when a task was created, so it skips a task created earlier and assigned or shared with you later, and a task completed between checks. Use **New task** or **Task assigned** for those.
* **Task completed (polling)** gives completed tasks, newest first. A completed task that is edited later can start the scenario again.
* **Review completed (polling)** reads the 50 most recently started completed reviews, so a review is missed if 50 newer ones complete before the next check.

## Known issues

* **Task assigned**: the help text of **Only tasks assigned to me** says "me" is the person who created the connection's API key. On a sign-in connection, it is the person who connected.
* The webhook Make creates for **Watch finished jobs** is named "Background job finished".
* **Cancel a job** can't stop every job. Questions from **Ask an agent**, **Add documents to a repository**, **Export a report** and playbook generation run to the end: cancelling one fails with "This operation cannot be stopped once started. It will finish on its own."

## Example: check each new NDA and comment the findings

1. **Wordsmith → New task**. Add a filter so only tasks with "NDA" in the title continue.
2. **Wordsmith → Review a document**: **Review type** *Against instructions*, your checklist in **Instructions**, and **Documents** mapped to `map(1.task.input_files; "id")`.
3. **Tools → Sleep** for 150 seconds, then **Wordsmith → Wait for a job** with the review's **Job ID**. Give **Wait for a job** a **Break** error handler, so Make retries it if the review takes longer. Or split the scenario in two, with **Watch finished jobs** starting the second.
4. **Wordsmith → List a review's findings** with the job's **Resource ID** and **Status** *issue*, then **Tools → Text aggregator** to join each finding's **Check** and **Explanation**.
5. **Wordsmith → Add a comment to a task** with the trigger's **Task ID** and the aggregated text, so the assigned lawyer sees the findings on the task.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.