[CRM integration]

Add postal mail actions to HubSpot workflows

Turn HubSpot deals, tickets, and lifecycle stages into approved postal mail, then write delivery proof, forwarded documents, and inbound mail photos back onto the right CRM record.

recommended shape
deal or ticket enters a stage
agent drafts from CRM properties
dry run returns exact cost
approval for certified or high-cost
timeline event with proof and tracking
Best for
Deal-stage mail such as formal offers, notices, renewal packets, or win-back letters.
Contact, company, or ticket timelines that should hold mailed proof and inbound physical responses together.
Support or operations teams that escalate from email sequences to physical mail when a record stalls.
Triggers
Deal enters a selected stage.
Contact has no response after a defined follow-up window.
Ticket needs a formal mailed notice or document packet.
[Workflow]
1

HubSpot workflow, webhook, custom code action, or agent reads CRM context.

2

Agent drafts a letter or packet and calls mailbox.bot with dry_run=true.

3

Human approves sensitive, certified, or high-cost mail.

4

mailbox.bot prints, stamps, mails, tracks, and emits lifecycle webhooks.

5

The integration writes delivery proof, tracking, status, and any forwarded inbound document or mail photo back to the HubSpot object.

Technical pattern
Trigger from a Workflow custom code action (Node or Python) or a workflow webhook; read the object's properties inside the action.
Write results back with the Timeline Events API or a Note engagement with the proof photo attached, plus custom properties for mail_status and tracking.
Keep object_type and object_id in metadata so a delivered event resolves to the right record without a lookup.
Use MCP when an agent decides whether paper is needed; call POST /api/v1/mail from the code action when the packet is already known.
Metadata to preserve
source=hubspot
object_type
object_id
deal_id
contact_id
company_id
ticket_id
workflow_id
POST/api/v1/maildry_run=true
curl -X POST https://mailbox.bot/api/v1/mail \
  -H "Authorization: Bearer sk_agent_test_..." \
  -H "X-Mailbox-MD-Version: <version>" \
  -H "X-Max-Cost-Cents: 2500" \
  -F "document=@deal-notice.pdf" \
  -F "recipient_name=<recipient>" \
  -F "recipient_line1=<street>" \
  -F "recipient_city=<city>" \
  -F "recipient_state=<state>" \
  -F "recipient_zip=<zip>" \
  -F "mail_class=certified" \
  -F "dry_run=true" \
  -F 'metadata[object_type]=<object_type>' \
  -F 'metadata[object_id]=<object_id>' \
  -F 'metadata[deal_id]=<deal_id>' \
  -F 'metadata[source]=hubspot'
Agent prompts
"When this HubSpot deal enters Contract Sent, draft a certified letter and create a mailbox.bot dry run."
"If this customer ignores three email follow-ups, prepare a first-class mailed notice and ask for approval."