# Using Workflows to Create Your Documents

If you have the appropriate HubSpot subscription you can use the Documint custom[ workflow action](https://knowledge.hubspot.com/workflows/choose-your-workflow-actions) to create your documents automatically using the [**Workflows** ](https://knowledge.hubspot.com/workflows/create-workflows)feature in HubSpot.&#x20;

{% hint style="info" %}
The Documint custom workflow action does not currently apply to custom objects.
{% endhint %}

You will need a **Sales, Service, Marketing or Operations Hub Professional** HubSpot account subscription to use the **Workflows** feature. You will also need to have the automations scope enabled for your app.

#### Setting up your workflow

Go to the HubSpot workflow area and create a workflow that is either contact, company, deal, or ticket based.

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

Select a trigger.

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

When you add an action, you will see the Documint custom workflow action. In the action you will select the template you want to use as well as the properties you want to send to populate the document (e.g. 'firstname', 'email', 'domain', etc.).

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

Review and publish your new workflow.

Now your documents will be generated automatically in the background and saved to your record in the **Notes** area.

#### Updating scopes for the Documint app

If your workflow is not saving documents to your record, a likely cause is that the Documint app does not include the required "automation" scope.

You can fix this by re-authorizing the app. From the HubSpot dashboard, go to settings > Integrations > Connected apps > Documint > Actions > Go to settings > Authorize. This will open a frame requiring you to authorize the Documint app.&#x20;

<figure><img src="/files/1awtBVAO9XWsMfai2ZDg" alt=""><figcaption></figcaption></figure>

If this does not fix the issue, please contact Documint support.


---

# Agent Instructions: 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:

```
GET https://docs.documint.me/integrations/hubspot/using-workflows-to-create-your-documents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
