Browse the docs

Agent setup guide

Deal-to-Contract Sender

When a HubSpot deal reaches your contract stage, prepares your DocuSign envelope and sends it once a person approves.

Coming soon — waiting for DocuSign approval About 20 min to set up

What it does

When a HubSpot deal reaches your contract stage, prepares your DocuSign envelope and sends it once a person approves.

  • Starts when a HubSpot deal moves into the stage you pick (e.g. “Contract”).
  • Lists the deal's HubSpot contacts; AI picks the signer using your rules, writes the envelope subject and flags anything missing (no email, several possible signers, no amount).
  • A person approves every envelope in Reviews and can correct the signer and subject first. Nothing is sent without that approval.
  • After approval, code checks there is exactly one valid signer email, a signer name and a subject with no placeholders; anything else is held.
  • Sends your existing DocuSign template to the approved signer and logs the envelope (deal, signer, envelope id, status Sent, date) in your Notion contracts database.

What it needs

  • A paid plan (agents run live on paid plans).
  • An AI provider key (Settings → AI Providers).
  • HubSpot, DocuSign and Notion, connected in Settings → Integrations.
  • A DocuSign template with a signer role, and a Notion contracts database with Envelope ID, Deal ID, Signer, Signer email, Status, Sent and Signed properties.

What it doesn't do

  • It doesn't write or change contract text and doesn't fill prices or terms into the document: those come from your DocuSign template.
  • It doesn't send signing reminders (DocuSign's own reminder settings do) or follow the envelope after sending (see Signed Contract Filing).
  • It sends to one signer; other parties (e.g. your countersigner) must be set up in the DocuSign template itself.

Availability and plans

Coming soon — waiting for DocuSign approval

The agent is built, but DocuSign is still waiting for the vendor's approval. It becomes available on its own once that app is live; until then it can't be bought or set up.

Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.

Before you start

  • A paid plan: agents run live, and the Free plan only runs Dry Runs.
  • An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
  • These apps, connected in Settings → Integrations: HubSpot, DocuSign and Notion.
  • The app it watches, connected in Settings → Integrations (the agent starts from an app event).
  • About 20 minutes.

Set it up step by step

Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.

1. Connect your AI provider

The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.

2. Connect HubSpot

Connect the HubSpot account your deals live in (Settings → Integrations → HubSpot).

3. Connect DocuSign

Connect DocuSign (Settings → Integrations → DocuSign) and pick your data center.

4. Connect Notion

Connect Notion (Settings → Integrations → Notion) and share your contracts database with it.

5. Pick the contract stage

Open the trigger and pick your HubSpot account, the pipeline and the stage that means “send the contract”.

SettingWhat to enterIn step
HubSpot account (deal trigger)The HubSpot account whose deals start the agent. Pick your connected HubSpot account.“Deal reached your contract stage”
Deal pipelineThe HubSpot pipeline your deals move through.“Deal reached your contract stage”
Contract stageThe stage that means “send the contract”, e.g. Contract or Contract sent.“Deal reached your contract stage”

6. Describe who signs

Open “Find the deal's contacts” and pick your HubSpot account, then replace the placeholder in “Prepare the envelope” with your contract rules.

SettingWhat to enterIn step
HubSpot account (contacts)The same HubSpot account, to read the deal's contacts. Pick your connected HubSpot account.“Find the deal's contacts”
Your contract rulesReplace the placeholder in “Prepare the envelope” with who signs your contracts (e.g. the contact whose title includes CEO or Director), your subject format and anything that must be true before sending. It starts as “[WHO SIGNS YOUR CONTRACTS, YOUR EMAIL SUBJECT FORMAT AND WHAT MUST BE TRUE BEFORE ONE IS SENT]” until you replace it.“Prepare the envelope”

7. Pick your DocuSign template

Open “Send the DocuSign envelope” and pick your account, the template and the signer role name exactly as in the template.

SettingWhat to enterIn step
DocuSign accountThe DocuSign account the template is sent from. Pick your connected DocuSign account.“Send the DocuSign envelope”
DocuSign templatePick the DocuSign template to send (e.g. your services agreement).“Send the DocuSign envelope”
Signer role nameThe role name exactly as it appears in the template (e.g. Signer or Client).“Send the DocuSign envelope”

8. Pick your contracts database

Open “Log it in Notion” and pick your account and contracts database. It needs: Name (title), Envelope ID (text), Deal ID (text), Signer (text), Signer email (email), Status (select with the options Sent and Signed), Sent (date), Signed (date).

SettingWhat to enterIn step
Notion accountThe Notion workspace with your contracts database. Pick your connected Notion account.“Log it in Notion”
Contracts databasePick your Notion contracts database (share it with Fluxo Flow first). It needs: Name (title), Envelope ID (text), Deal ID (text), Signer (text), Signer email (email), Status (select with the options Sent and Signed), Sent (date), Signed (date).“Log it in Notion”

9. Test it with Dry Run

Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.

10. Switch the trigger on

Open the trigger and click “Activate app trigger”: deals that move into the contract stage from now on start the agent.

How it works

The agent is a normal workflow with 10 steps (1 AI step, with a person approving in Reviews). You can open, edit and monitor it like any other workflow.

  • Deal reached your contract stage — Starts on “Deal entered a stage” in HubSpot (an app event). Starts when a HubSpot deal moves into the stage you pick (e.g. “Contract”), with the deal's name, amount and close date.
  • Find the deal's contacts — HubSpot: Find records. Lists the HubSpot contacts linked to the deal: name, email, job title and company.
  • Prepare the envelope — AI step (runs on your AI provider key). AI picks the signer from the deal's contacts using your rules, writes the envelope's email subject and lists anything missing or doubtful for the reviewer.
  • Approve the envelope — A person approves or rejects it in Reviews (the run waits). A person checks the signer, their email and the subject in Reviews, corrects them if needed and approves sending. Nothing goes to DocuSign without this approval.
  • Check before sending — Step. Branch: Approved. In code, after approval: exactly one valid signer email, a signer name and a subject with no placeholders left. Anything that fails is held, with the reason in the run history — nothing goes to DocuSign.
  • Send it? — Decision: picks the branch to follow. Envelopes that pass the checks go to DocuSign; the rest are held for a person.
  • Held — Kept in the run history. Branch: Held. The approved envelope failed a check (signer email, name or subject); nothing was sent. The reason is in the run history.
  • Send the DocuSign envelope — DocuSign: Send an envelope from a template. Branch: Passes. Sends your DocuSign template to the approved signer, in the template's signer role, with the approved subject.
  • Log it in Notion — Notion: Create a page in a database. Adds a row to your Notion contracts database: the deal, the envelope id, the signer, status Sent and the date.
  • Not sent — Kept in the run history. Branch: Rejected. When the reviewer rejects, nothing is sent; the run history keeps the deal and the reason.

Test it with Dry Run

Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live. The sample has the same shape as a real event from the app.

Sample data fields

id, dealname, amount, pipeline, dealstage, closedate, owner_id, createdate, properties.

  • Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
  • Approval steps use the Dry Run decision you pick in the step's settings (approved, rejected or timeout), so you can try each branch.

Go live

  • Open the trigger and click “Activate app trigger”: deals that move into the contract stage from now on start the agent.
  • Activating the app trigger needs the trigger's connected account. The first check only remembers what's already there, so older items don't start runs; the same item never starts two runs.
  • The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
  • When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.

Questions

Does it write the contract?

No. It sends your own DocuSign template; the agent only fills in who signs and the email subject.

Are prices or terms filled into the document?

No. DocuSign fills the signer's name and email; anything else in the document comes from the template as you set it up in DocuSign.

What does the Notion contracts database need?

These properties: Name (title), Envelope ID (text), Deal ID (text), Signer (text), Signer email (email), Status (select with the options Sent and Signed), Sent (date), Signed (date). Signed Contract Filing uses the same database to find the deal when the envelope is signed.

Who reminds the signer?

DocuSign does, using the reminder settings on your template or account.

Troubleshooting

  • “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
  • A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
  • An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
  • No runs start: activate the app trigger with a connected account. Only items created after activation start runs.
  • A run shows as paused: it's waiting for someone in Reviews to approve or reject it.
  • A step failed: open the run in History and check that step in the Trace tab for the error and what it received.

Generated from the agent's own workflow, so it always matches what the agent does. Last updated .