I want to build an AI agent that gets triggered once my MQL in HubSpot becomes an SQL. The AI agent gets fed with the contact and company data and the current email thread as context. The output should be the first email outreach draft.
Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!
I’m not too familiar with Hubspot but you can try the Hubspot Trigger node to listen for Contact Property Changed > Date entered ‘Sales Qualified Lead (Lifecycle Stage Pipeline)’ and connect that to Hubspot node to pull some additional company info and feed them into AI Agent. If you want to create an email draft within Hubspot, there’s no option to do this in the Hubspot node but you can always use the HTTP Request Tool to make custom API requests. Hope that will get you started!