We built a Monday.com and HubSpot integration for a US solar energy company, and connected Intercom, Twilio and three web form providers to the same pipeline. Each new home energy report created the lead, messaged the homeowner and told the referral partner without anyone typing a status by hand. Two incidents along the way showed the jobs reporting success while doing the wrong thing. This case study covers both and the reliability work that followed.
The client
The client sold solar panels and cheaper electricity to homeowners. It used AI to find the households that would gain the most, and a field team of door knockers and sales reps to reach them. Each assessment produced a home energy report for the household.
The problem
The sales process ran across several tools that did not talk to each other. The company’s own application produced the reports. Leads lived in Monday.com, customer conversations in Intercom and deals in HubSpot. New enquiries arrived through web forms built on three form providers. People updated statuses and tracked leads by hand to keep these in step.
The field and sales teams needed the tools to do that work for them. When a report was ready, the system had to create or update the lead and notify the prospect. It also had to tell the referral partner and keep every system showing the same state.
What we built
We worked inside the client’s development team from February to November 2024.
CRM integration. Report events created and updated leads in Monday.com. Changes made in Monday.com flowed back into the application through webhooks. Onboarding a strategic partner created its referral partners, account executives and sales reps. The Monday.com SDK failed on fetch calls under Node.js 20, so we replaced it with direct GraphQL calls. The Monday.com API also guessed what a status value meant. It read a label made only of digits (such as “10” or “50”) as an option ID instead of its text. Since the label “10” had ID 1 and the label “50” had ID 2, the update picked the wrong option or failed. Labels with letters (such as “Approved” or “On Hold”) resolved by name. So for numeric labels we looked up the option ID on our side and sent the ID. A second version of the lead flow added new report stages.
Customer communication. Report events kept lead attributes in Intercom up to date and drove an email drip campaign behind feature flags. Twilio sent three-way group texts and picture messages, with a fallback messaging service behind them. Homeowners got scheduling links for a call. A daily job told referral partners about new reports.
Lead intake. Webflow, Heyflow and JotForm webhooks fed one pipeline behind a common form factory. It covered homeowners, homebuyers, contact requests, social campaigns and partner sign-ups. Direct customers and referral partners each had their own flow, and partners got shortlinks to share.
Deal tracking. Leads created deals and contacts in HubSpot. Each HubSpot record linked to its Monday.com item and back. An authorised webhook carried HubSpot updates into Monday.com. An archive action and a kill switch gave the team a way to stop the sync.
Report editing and savings calculations. We added admin flows for editing reports and a battery option. We fixed tariff and utility-provider switching, and moved the savings calculations into separate classes.
When “success” was wrong
Two incidents shared one trait: the system reported success while it did the wrong thing.
Failed jobs marked as successful
Report sync and partner onboarding ran as background jobs on Inngest. The job code returned failures as ordinary result objects. Inngest treats only a thrown exception as a failure, so it marked every run successful and never retried one. The problem was discovered after two weeks. The Inngest plan kept run history for three days, so most of the evidence was already gone.
We re-ran the partner onboarding sync from a command-line script. For reports, we added a sync status history. Each entry records the run, the report, success or failure and the response from the CRM.
Leads overwritten by a matching email
To avoid duplicates, the integration updated an existing lead when a new report carried the same email address. One owner with several properties therefore had each new report overwrite the previous lead. The sync status showed “completed” the whole time. The write itself succeeded, but it landed on the wrong record.
We stopped the overwrite first. A command-line tool then read the Monday.com activity log and restored the overwritten leads. Later we removed the same-email matching altogether.
Making the workflows reliable
After the incidents we rebuilt the background workflows so that failures show up and can be recovered:
- Large workers became small steps that Inngest retries on their own.
- The code throws errors instead of returning them. A
NonRetriableErrormarks the ones a retry cannot fix. - Failure handlers post a readable message on the lead in Monday.com and text the partner concerned.
- Error notifications are idempotent, so a retry does not send them twice.
- Daily report generation runs in batches inside database transactions.
- The app checks the signature on every incoming Twilio webhook.
Testing and observability came next. The project got its first automated test run in GitHub Actions. Mocked and recorded vendor APIs let us test the integrations without live accounts, and tRPC endpoints got their own tests. Command-line tools handled data sync and repair. Logging moved to one pino logger, and Sentry added error tracking with profiling. Database indexes went onto the busiest tables.
What we took from it
- Check the outcome in the destination system. The status of a run only says the code finished.
- Learn how long your job history is kept before you need it.
- Match records on a key that belongs to one record. One person can own several homes under the same email.
- Keep an audit trail (yours or the vendor’s) that lets you undo a bad write.
Outcome
Over nine months the integrations covered the path from first enquiry to tracked deal across five systems. They replaced manual status updates and lead tracking. The background workflows gained retries, failure reporting and tests. Development on the client’s side stopped in November 2024.
Connecting your sales tools?
We build integrations between CRMs, messaging services and web forms, with the retries and audit trail that make a bad sync recoverable. See our integration services, or read how we automated hotel data imports from Salesforce.
Frequently asked questions
Sales automation with Monday.com and HubSpot
How do you build a Monday.com and HubSpot integration?
Pick one event that starts the sync. In this project a new lead created a deal and a contact in HubSpot. Each HubSpot record links to its Monday.com item and back. An authorised webhook carries HubSpot changes into Monday.com. An archive action and a kill switch let the team archive records or stop the sync.
Why does Inngest mark a failed job as successful?
Inngest treats a run as failed only when the function throws. A function that returns an error object finishes without an exception, so Inngest marks it successful and never retries it. Throw the error instead. Throw a NonRetriableError for failures a retry cannot fix.
What replaced the Monday.com SDK in this project?
Direct calls to the Monday.com GraphQL API. The SDK failed on fetch calls under Node.js 20.
Why does the Monday.com API set the wrong status label?
In this 2024 project the Monday.com API read a status value made only of digits as an option ID, not as the label text. A label named 10 with option ID 1 then resolved to the wrong option, or the update failed. Labels with letters resolved by name. If you see the same, look up the option ID for numeric labels and send the ID.
How do you restore Monday.com items that an integration overwrote?
Stop the code that overwrites them first. Then read each item's activity log in Monday.com to find its earlier values. A command-line tool can write those values back.
How do you test Monday.com, Intercom and Twilio integrations without live accounts?
Mock the vendor APIs. This project used MSW handlers and recorded nock responses for Monday.com, Intercom and Twilio. The test suite ran in GitHub Actions.