There are hundreds of data integrations you can do between HubSpot and Slack. One of them is to send the number of HubSpot companies to a Slack channel.
With just a few steps and lines of code, you can easily create it!
- Click here to install the integration
- Create an account or login to Fusebit
You will be redirected to the Fusebit web editor with already most of the code you need.
Now, let’s fetch HubSpot companies, we can do this with one line of code:
const companies = await hubspotGetCompanies(ctx);
in line 16 (insideintegration.router.post
)Send the new message to Slack with
await slackSendMessage(ctx, 'You have ${companies.length} companies in HubSpot')
in line 19 (or any other message of your preference).In addition to sending the message directly within Slack you can also send it in the response body. Change what’s inside of the
ctx.body
to companies:companies.length
and that’s it!
Check out the full blog post here
Top comments (0)