Quick overview
This workflow receives a Calendly-style event via webhook, checks HubSpot for prior actions, uses OpenAI to extract a structured risk/recovery analysis, and then routes recommendations through Gmail approval before writing audit records to HubSpot and notifying the team in Slack.
How it works
- Receives an incoming webhook event containing meeting or follow-up signals.
- Normalizes the payload, creates a fingerprint for idempotency, and searches HubSpot to see if the same signal was already actioned.
- Uses OpenAI to extract a factual, structured analysis from the event text and applies deterministic scoring rules to assign a tier and policy-safe flag.
- If the action is policy-safe, prepares an action record and compiles a decision digest.
- Sends an approval email via Gmail (send-and-wait) and evaluates whether the approver accepted the recommended action.
- If approved, creates a record in HubSpot, posts the tier and summary to Slack, waits briefly, and then writes a completion audit record to HubSpot.
- If the approval is rejected or the process needs manual review, sends an escalation email via Gmail to the approver.
Setup
- Add credentials for HubSpot, OpenAI, Gmail OAuth2, and Slack OAuth2.
- Set the webhook path value (replace YOUR_TRIGGER_PATH) and configure the resulting webhook URL in Calendly or your source system.
- Replace YOUR_APPROVER_EMAIL and YOUR_CHANNEL_OR_RECIPIENT with your approver email and target Slack channel/user.
- Review the HubSpot search query and record create configuration to match the object type and properties you want to use for state tracking and audits.
- Run a test webhook event end-to-end to confirm approvals, HubSpot writes, and Slack notifications before activating the workflow.