Brief new HubSpot companies with country macro context
When a new company is added to HubSpot, attach a short briefing on its country's market size, growth, and inflation so the account owner walks in informed.
Build me an agent workflow that runs every time a new company is created in HubSpot. The goal is to give the account owner instant country-level macro context before their first call.
Trigger: a HubSpot webhook fired on company creation (object type company, creation event).
When the webhook fires, the agent should:
1. Use HubSpot's Get Company to load the new company by ID. Pull the name and country properties at minimum.
2. If the country property is missing or empty, stop and do nothing. Do not create a note.
3. Use World Bank's List Countries to resolve the company's country value to a World Bank country ID. HubSpot's country property is free text and can arrive as a full name, an ISO alpha-2 code, or an ISO alpha-3 code, so be flexible. If the country cannot be resolved to a valid World Bank country, stop and do nothing.
4. Use World Bank's Get Indicator Data to pull the most recent values for a small set of indicators that frame a B2B sales conversation. Good defaults: GDP current US$ (NY.GDP.MKTP.CD), GDP per capita current US$ (NY.GDP.PCAP.CD), total population (SP.POP.TOTL), inflation consumer prices annual % (FP.CPI.TOTL.ZG), and GDP growth annual % (NY.GDP.MKTP.KD.ZG). Use mrnev=1 or filter out null years so you always work with the most recent non-empty value per indicator. Per the World Bank docs, JSON responses are a two-element array [meta, rows] and many years are null.
5. Pick the 4 or 5 indicators that best frame the market and write a 3 to 5 sentence plain-language briefing the account owner can read in 15 seconds. Cover market size, growth trajectory, currency or inflation backdrop, and flag anything notable (very high inflation, a recent contraction, an unusually small or large addressable market). Weave numbers into prose. Round sensibly, for example '$540B GDP' instead of '541,238,910,000'. Do not dump raw indicator tables.
6. Use HubSpot's Create Note to attach the briefing to the company, with an association back to the company so the note appears on the record. Use a note title like 'Country context: <country name>'.
Constraints: skip silently when the country is missing or unresolvable. The HubSpot note is the only output, do not post anywhere else. Keep the tone neutral and informational, not pitchy.
Additional information
What does this prompt do?
- Watches HubSpot for newly created companies and reads the country on the record.
- Pulls the latest World Bank development data for that country, including market size, growth, inflation, and similar signals.
- Writes a 3 to 5 sentence plain-language briefing that flags anything a seller should know going in, like high inflation or a recent contraction.
- Pins the briefing as a note on the company in HubSpot so the account owner sees it before the first call.
What do I need to use this?
- A HubSpot account where new companies are created with a country field filled in.
- Permission in HubSpot to read companies and create notes.
- Nothing for World Bank. The data feed is public and free, no account needed.
How can I customize it?
- Swap in different indicators, like internet penetration, labor force size, or trade balance, if your team sells into a specific category.
- Limit the workflow to certain regions, or only run it on companies above a revenue or employee-count threshold.
- Change the tone or length of the briefing, for example a tight three-sentence summary versus a longer paragraph with bullet points.
Frequently asked questions
What happens if the company's country field is empty?
Does the World Bank data cost anything?
How recent is the data?
Will this run on companies that already exist in HubSpot?
Can I send the briefing somewhere besides HubSpot, like Slack or email?
Walk into the first call already briefed.
Connect HubSpot once, and every new company gets a country snapshot pinned to its record before the AE picks up the phone.