Using App Events to Trigger HubSpot Workflows
Every screening run by sanctions.io for HubSpot logs a HubSpot App Event to the Contact or Company record's activity timeline when it completes. These App Events are not just a record-keeping feature - they are native HubSpot triggers that can be used to launch downstream workflows automatically.
This means you can build automations that respond in real time to the outcome of a screening: notifying your compliance team when a match is found, alerting an admin when a screening fails, creating tasks for review, or updating deal stages.
Topics Covered
→ How to Use an App Event as a Workflow Trigger
→ 5 Workflow Examples Using App Events
→ Combining App Events with Other Triggers
The Two App Events
sanctions.io for HubSpot produces two types of App Event:
|
App Event |
When It Fires |
What It Contains |
|
Screening event completed |
Every time a screening finishes successfully |
The number of matches found (including zero if no matches) |
|
Error event |
When a screening fails to complete |
The error type (e.g., expired API token, API error) |
Both events are logged to the activity timeline of the Contact or Company that was screened. Both can be used as workflow enrollment triggers in HubSpot.
How to Use an App Event as a Workflow Trigger
- In HubSpot, go to Automation → Workflows → Create workflow
- Choose Contact-based or Company-based workflow (matching the object being screened)
- Set the enrolment trigger to App Event
- Select the relevant sanctions.io App Event from the list - either "Screening event completed" or "Error event"
- Add any additional filter conditions (see examples below)
- Build your workflow actions as normal
Requires: HubSpot Professional or Enterprise (any Hub) for workflow automation.
5 Workflow Examples Using App Events
Example 1 - Notify the Compliance Team When a Match Is Found
Trigger: App Event - "Screening event completed"
Filter: Sanctions Pending is greater than 0
Actions:
- Send an internal email notification to your compliance manager
- Or: Create a task assigned to the compliance team
- Or: Send a Slack/Teams notification via a connected integration
Why the Sanctions Pending filter matters: The "Screening event completed" App Event fires for every screening, including clean ones with no matches. Without the Sanctions Pending filter, your compliance team will receive a notification for every contact screened, regardless of outcome. Adding Sanctions Pending > 0 ensures the notification only fires when there are actual unresolved results that need attention.
Example 2 - Send a Higher-Priority Alert for a Confirmed Positive Match
Trigger: App Event - "Screening event completed"
Filter: Sanctions Status is equal to Blacklisted
Actions:
- Send an urgent internal email or SMS notification to the senior compliance officer
- Create a high-priority task with a short due date
- Optionally: Update a deal stage or property to flag the relationship as blocked
This workflow catches the most serious outcome - a contact confirmed as a direct sanctions match - and escalates it separately from general match notifications.
Example 3 - Alert Admin When a Screening Fails
Trigger: App Event - "Error event"
Actions:
- Send an internal email notification to the HubSpot admin or IT owner
- Create a task to investigate the error
Why this matters: Screening errors - typically caused by an expired or invalid API token - are silent by default. Without this workflow, a broken API connection could go unnoticed while your automated screening workflows continue to fail. An error event notification ensures your team knows immediately when something goes wrong, so it can be resolved before results fall out of date.
Example 4 - Notify the Contact Owner When Their Contact Has Results Pending
Trigger: App Event - "Screening event completed"
Filter: Sanctions Pending is greater than 0
Actions:
- Send an internal email notification to the Contact owner (not a central compliance team)
This is a lighter-touch alternative to central compliance queue management, distributing responsibility to the individual who owns the relationship. It is most useful for smaller teams or organizations where compliance review is handled by the account manager rather than a dedicated compliance function.
Example 5 - Post-Close Monitoring Alert
Trigger: App Event - "Screening event completed" (on a contact re-screened after a deal is closed)
Filter: Sanctions Pending is greater than 0, AND associated deal stage is Closed/Won
Actions:
- Notify the compliance manager that a previously cleared contact now has a new result
- Create a task to review the result and confirm whether the relationship can continue
This workflow supports ongoing monitoring after onboarding, ensuring that contacts who were cleared at the start of a relationship are flagged if their status changes on subsequent re-screenings.
Combining App Events with Other Triggers
App Events work best as part of a layered workflow architecture:
- Screening workflow (triggered on contact creation or deal stage change) - runs the screening - fires the App Event
- Notification workflow (triggered by the App Event) - alerts the right person based on the outcome
- Re-screening workflow (triggered on a schedule) - re-screens contacts - fires App Events - notification workflow responds
This separation keeps each workflow simple and single-purpose, making them easier to maintain, test, and adjust as your compliance process evolves.
App Event Timing: What to Expect
App Events fire asynchronously - the screening is submitted, the API processes it, and the App Event is logged once results are returned. In practice, this typically takes seconds, but it means there is a short delay between a screening being triggered and the App Event workflow firing. For time-sensitive compliance processes, this is usually negligible, but it is worth keeping in mind when designing workflows that require immediate sequencing.
We're here to help!
If you have any questions or require further assistance, please don't hesitate to reach out to our support team.
- Chat: Available directly on the Help Center page
- Email: help@sanctions.io