Quick overview
This workflow listens for new HubSpot deal webhooks, verifies the request, then creates an Asana project from a template and a Google Drive folder structure for the deal, writes the links back to HubSpot, and emails the deal owner.
How it works
- Receives a HubSpot deal-creation webhook and verifies the request using the HubSpot signature header and your HubSpot app client secret.
- Loads the new deal details from HubSpot and retrieves the deal owner’s information.
- Checks whether the deal has an associated HubSpot company, and emails the owner a notice if no company is linked.
- Fetches the associated company from HubSpot and checks whether it already has a saved Google Drive folder ID.
- If no company folder exists, creates a company folder and then a deal folder in Google Drive; otherwise, creates only the deal folder under the existing company folder.
- Creates a new Asana project by instantiating your Asana project template and retrieves the project permalink.
- Saves the Asana project and Google Drive folder links/IDs back onto the HubSpot deal (and the company folder link/ID onto the company when newly created), then emails the deal owner the workspace links.
Setup
- Create and connect credentials for HubSpot OAuth2, Google Drive OAuth2, Asana OAuth2, and Gmail OAuth2.
- In the configuration values, set your HubSpot app client secret, Google Shared Drive ID, the parent folder ID where company folders should be created, and your Asana project template GID.
- In HubSpot, create the custom properties this workflow updates (for example: asana_project, asana_project_id, google_drive_folder, and google_drive_folder_id on deals, plus google_drive_folder and google_drive_folder_id on companies).
- Add the workflow’s production webhook URL to a HubSpot deal-creation webhook subscription so HubSpot sends deal events to this workflow.