Leverage Our Logic, Search, and Function Blocks To Build an AI-Enhanced Slack Channel Using Zapier

Leverage Our Logic, Search, and Function Blocks To Build an AI-Enhanced Slack Channel Using Zapier

Use Case

The goal

While working with a strategy or product team, we are often collecting links, screenshots, and basic information about the competition in our industry. It can be a bit of a pain to keep up with the latest, so I brainstormed an AI assistant that could help do the legwork and fill in the details regarding other companies and their product offerings, pricing, and more.

and now with the magic of MindStudio, I can present to you… drumroll

CompetitorScan, an AI-powered Slack marketing research assistant!

Read on to learn how I built this AI tool for the team, the way I tackled a couple of issues that arose, and some info on how you can remix and expand upon this project!

Getting set up

The first step to getting this all set up was to figure out how to trigger the workflow via Slack.  I decided the easiest way to do this would be with Zapier, and it couldn’t be easier following this official tutorial!

After connecting our Slack to Zapier, I was able to set up a trigger event on a new ‘Competitors’ channel I created for every time a message is sent.

On the MindStudio side, I quickly linked my Slack account and dropped in a “Slack - Post to Channel” block to test out the full connection between the three apps. Upon sending a test Zap, I saw the successful workflow message almost immediately!

Building out the functionality

Now that things are connected, we can start building out the actual functionality of our AI worker.
The first step is to map the contents of the Slack message to a variable, so that we can pass that into our MindStudio workflow.  I did this by targeting the ‘Text’ field in the Slack message sent to Zapier, and assigning it the launch variable {{url}} in MindStudio.

I pass that {{url}} variable on to the ‘Scrape URL’ block, which looks for pertinent info on the company’s website to answer the questions on topics I have prepared for the report.  Using ‘Generate Text’ blocks, I can ask the LLM for various details about the company, and then assign those values to new variables for presentation in the final report message to the Slack channel.

Using a ‘Post to Channel’ block, I can then begin formatting how the automated slack message should return each of the details that it had prepared in the earlier steps.

Some snags along the way…

After saving the Zap and publishing the AI worker - it worked off the cuff, but the quality of the content needed some fine tuning.  By extending the ‘URL Crawl’ block out to scan a few additional pages, I could give the AI worker additional context to work with.  I also experimented with some different LLM’s using our Profiler feature- a great way to quickly compare and contrast the strengths and weaknesses of each model available.

Another issue I noticed from the Slack side was that the way links are automatically turned into hyperlinks was causing issues with how the {{url}} variable was being parsed and passed- I knew I would have to do a bit of cleanup.

Problems solved.

By switching the target text object in Zapier (RawText instead of Text), and adding some additional magic via our Logic blocks - the AI worker can now detect if the text in the Slack message is a company name or a URL, and can now either search for the URL or clean up the link depending on how it came through.

Your turn!

Click here for the public project file, which you can then remix to your own workspace. Take a look at how it works, configure it so that it works on your own Slack channel, then try experimenting with some of the next steps listed below:

-Add an onboarding data about your own company and industry, so that research provided in the report can be more comparative to what your company does well/needs to improve.

-Add an ‘Image Analysis’ block to look at the screenshot of the homepage generated by the ‘Crawl URL’ block and generate additional design notes from an LLM with vision capabilities.

-Expand research to include summaries of customer sentiment via reviews on Google, Reddit or our via community ‘G2 SaaS Review’ function block.

-Package into a slack app for 1-click install; learn how to do this in a future tutorial!