r/hubspot • • 4h ago

Make It Monday: Show us what you're building with HubSpot and AI

2 Upvotes

Building something with HubSpot and AI? Share it here in the thread, finished or still a work in progress is fine.

Workflows, agents, prompts, apps, whatever you've got. Self promo is okay in this thread, so drop your link and tell us what it does.


r/hubspot • • 16h ago

Tips & Tricks Solved: last invoice date + amount on companies with a custom code action (and the gotchas I hit)

Post image
2 Upvotes

A while back I asked here how to show each company's last invoice date and amount from QuickBooks-synced invoices. Thanks to everyone who replied. Here's what I ended up building, in case it helps someone.
Why the native options didn't work:

  • Rollups can return the latest invoice date, but conditions don't support date fields (so no "dated today or earlier"), and there's no "amount of the latest record" rollup.
  • Invoice-based workflows don't offer Edit record or Copy property value, so they can't write to the associated company.
  • Copying from "most recently created" invoice ≠ latest invoice date (backfills and future-dated invoices break it).

What worked: a daily company-based workflow (enrolls only companies with at least one invoice) with a custom code step:

  1. Get the company's associated invoice IDs (v4 associations, paginated)
  2. Batch-read invoice date, status, amount billed, number and create date
  3. Filter: date ≤ today in the portal's time zone, not draft/voided, not on a small exclusion list
  4. Pick the latest date (ties → most recently created)
  5. Return found / date / amount / number → branch → Edit record

Running it daily means it recalculates from all invoices every time, so the first run backfills everything (no import needed), and future-dated invoices get picked up when their date arrives.
Gotchas:

  • Private apps are now "legacy." You create a service key instead (read-only scopes for invoices and companies) and store it as a secret.
  • The new code template returns { outputFields }; my older callback version threw "callback is not a function."
  • The workflow Test button didn't write anything for me. The custom code action's own Test action is what showed real outputs and errors.
  • Branch on an explicit "no" to clear fields, not "None met," or an error run will wipe good values.
  • Log the raw date. Invoice dates came through as T04:00:00Z (midnight US Eastern), which looked a day off until I printed it.

Also: the minimap panel in the workflow editor makes checking a branchy workflow way easier, if you haven't used it.
Happy to share the code structure if anyone's doing something similar.


r/hubspot • • 4h ago

Feedback What makes you stick to Hubspot & Salesforce?

Thumbnail reddit.com
0 Upvotes

r/hubspot • • 6h ago

Question HubSpot/RevOps folks: how did you find your first direct freelance clients?

0 Upvotes

I've been working as a RevOps and HubSpot specialist with a US-based consultancy, mostly on HubSpot audits, ticket pipeline builds, customer health scores and workflow automation.
From January my work there is moving from a fixed retainer to project-based, so I want to start finding a few direct clients of my own. The problem is that almost all my work so far has come through the agency, so I've never really had to find clients myself.
For those of you who freelance in HubSpot or RevOps:

  • Where did your first few clients come from? (LinkedIn, referrals, HubSpot community, Upwork, something else?)
  • Is it better to position yourself as a HubSpot specialist, or as a broader RevOps/CRM person?
  • I'm also learning Claude (AI automation), Notion and Salesforce. Is combining these with HubSpot actually useful for clients, or is it better to stay focused on one tool?

Would really appreciate any advice from people who've made this jump!