Shata Solutions
← Back to marketplace
Sales Automation

Invoice Generator

Create and send Stripe or PayPal invoices when deals close with line items synced from CRM.

Automation overview

What this automation does

This automation starts when hubSpot deal stage `Closed Won`. It webhooks creates, x (twitter) creates, stripe creates, gmail creates, and google docs creates, then hubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day t.

Trigger
HubSpot deal stage `Closed Won`
Main actions
Webhooks creates → X (Twitter) creates …
Final outcome
HubSpot deal `Closed Won` webhook reads line items, customer billing email, and …
Execution time
1–3 minutes
Apps used
6 integrations
AI-powered
No
Difficulty
Advanced
Advanced
Workflow diagram

End-to-end scenario flow

Read-only visualization of how data moves from trigger to final result.

Trigger
HubSpot
Event detected
Step 1
Webhooks
Creates
Step 2
X (Twitter)
Creates
Step 3
Stripe
Creates
Step 4
Gmail
Creates
Step 5
Google Docs
Creates
Result
Google Docs
Workflow complete
Step-by-step

How each step runs

  1. 1
    HubSpotTrigger
    Event detected

    HubSpot deal stage `Closed Won`

  2. 2
    Webhooks
    Creates

    HubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day t

  3. 3
    X (Twitter)
    Creates

    HubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day t

  4. 4
    Stripe
    Creates

    HubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day t

  5. 5
    Gmail
    Creates

    HubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day t

  6. 6
    Google Docs
    Creates

    HubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day t

  7. 7
    Google Docs
    Workflow complete

    HubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day t

Apps used

Connected applications

HubSpot

Creates

Webhooks

Creates

X (Twitter)

Creates

Stripe

Creates

Gmail

Creates

Google Docs

Creates

Summary

Automation summary

Trigger
HubSpot deal stage `Closed Won`
Inputs
HubSpot deal stage `Closed Won`, Business Name, Notification Email, Timezone
Outputs
HubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day t, Gmail creates, Google Docs creates
Business goal
Automate invoice generator end-to-end with accurate app routing.
Execution frequency
On demand with batch fallback
Estimated runtime
1–3 minutes
Error handling
Failed steps retry up to 3 times with exponential backoff; persistent failures notify your configured channel and log to the run history.
Dependencies
HubSpot, Webhooks, X (Twitter)
Benefits

Why use this automation?

Save ~8 hours/week

Remove repetitive steps from Invoice Generator so your team focuses on high-value work.

Reduce manual work

Connected apps sync data automatically instead of copy-paste between dashboards.

Prevent human errors

Standardized logic runs the same way every time, with retries on failure.

Requirements

What you need to get started

Required apps

  • HubSpot
  • Webhooks
  • X (Twitter)

Required accounts

  • Active HubSpot workspace with API access
  • Active Webhooks workspace with API access
  • Active X (Twitter) workspace with API access
  • Shata Automation workspace (free tier supported)

Required API keys

  • OAuth tokens for each connected integration

Permissions

  • Read access on trigger sources (forms, sheets, webhooks, or CRM objects)
  • Write access on destination apps (email, chat, CRM, or storage)

Estimated setup time

  • 15 min including app authorization and test run
  • Difficulty: Advanced

Optional apps

  • Stripe (optional)
  • Gmail (optional)
  • Google Docs (optional)

Automation runtime

Activate this template

PreviewSome steps run in preview until their integrations go live.

Connect required apps via OAuth or API keys. Credentials are encrypted server-side. Dev test runs mock external actions when connections are missing.

Draft
0%
Activation readiness

Est. setup time: ~14 min

Required connections

  • HubSpot(required)
    PreviewHubSpot: workflow actions run in preview
    Missing
  • webhooks(required)
    Previewwebhooks: workflow actions run in preview
    Missing
  • x(required)
    Previewx: workflow actions run in preview
    Missing
  • stripe(required)
    Previewstripe: workflow actions run in preview
    Missing
  • Missing connection: HubSpot
  • Missing connection: webhooks
  • Missing connection: x
  • Missing connection: stripe
Manage all connections →View all installations →

Workflow summary

Trigger
HubSpot deal stage `Closed Won`
Steps
7 nodes
Required apps
4
Optional apps
2

Trigger

Manual trigger

Run workflows on demand via Test run or Live test. Activate to enable scheduled/webhook triggers on other templates.

Run history

No runs yet. Install the template and run a test, or activate to receive webhook/schedule runs.

FreeAdvancedPreview15 min setup4.38.0k installs · 463 reviews
Customize for My Business
Analytics

Template performance

50.0k
Views
8.0k
Installs
366
Favorites
4.3
Avg rating
15.9%
Conversion
15 min
Setup time
98%
Success rate
59
Trending score
Most used integrations
HubSpotWebhooksX (Twitter)

HubSpot deal `Closed Won` webhook reads line items, customer billing email, and tax ID from custom fields, creates Stripe Invoice with payment link and 30-day terms, CCs finance Gmail, posts PDF to Google Drive `Invoices` folder organized by month, and sets HubSpot property `invoice_id` for reconciliation tracking.

Some steps run in preview until their integrations go live.

Required apps
HubSpotPreviewWebhooksPreviewX (Twitter)PreviewStripePreview
Optional apps
GmailLiveGoogle DriveTest-only
All integrations
HubSpotWebhooksX (Twitter)StripeGmailGoogle Drive
Workflow preview

How Invoice Generator runs

1
Trigger
Map line item sync
2
Process
Rule engine
3
Action
hubspot
4
Notify
Alert & log
HubspotWebhooksXStripeGmailGoogle Drive
Setup steps

Get started in 5 steps

  1. 1
    Connect billing and CRM

    HubSpot, Stripe Invoicing, Gmail, Google Drive.

  2. 2
    Map line item sync

    Deal products → Stripe invoice lines with quantity and unit price.

  3. 3
    Configure tax and VAT

    Stripe Tax or manual tax rate from deal country field.

  4. 4
    Set payment terms

    Net 30 default; Net 15 for enterprise tier from deal segment field.

  5. 5
    Test closed-won flow

    Sandbox deal → Stripe test invoice → Drive PDF → HubSpot ID populated.

Variables

Configurable settings

VariableTypeDefaultRequired
Business NametextYour BusinessYes
Notification EmailemailYes
TimezoneselectYes
Gmail Search Querytextis:unreadNo
FAQ

Frequently asked questions

Partial payments?

Stripe webhook on payment updates HubSpot `amount_paid` custom field.

PayPal instead?

Swap Stripe connector for PayPal invoicing API with same CRM trigger.

Multi-currency invoices?

Deal currency sets Stripe invoice currency; FX handled at quote stage.

Credit notes?

Separate workflow on deal `Refund` stage creates Stripe credit note.

Get started

Customize Invoice Generator for your business

Our team can adapt this template to your exact workflow, apps, and brand requirements.