> For the complete documentation index, see [llms.txt](https://docs.documint.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.documint.me/integrations/hubspot/using-workflows-to-create-your-documents.md).

# 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="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2F3pspoPlm6NX43Y0o288M%2Fcontact%20based%20workflows.png?alt=media&amp;token=ff23baf8-e9ce-4a8d-94fe-5d7847378f6d" alt=""><figcaption></figcaption></figure>

Select a trigger.

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fd1MPfOVLgIjw1AmakPxY%2Fadd%20trigger.png?alt=media&amp;token=0342dff9-a97d-4598-8c01-da83e833693b" 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="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FODTAMeYo3vZbBhaEXqaD%2Fcustom%20workflow%20action.png?alt=media&amp;token=a5866212-e82e-4849-902d-8b6664ff9a09" 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="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fi1tKeubRdqygZYWsTz74%2Fre-authorization.png?alt=media&amp;token=072d8957-bb0f-4c8b-92fe-9f6a96adb9f2" alt=""><figcaption></figcaption></figure>

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


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
