In this guide, we'll show you how you can use Flow Builder to set up image recognition for WhatsApp. This will allow you to categorize inbound images from customers, based on Google's Vision AI IR algorithm.
We'll be looking at an example of a conversational flow that automatically categorizes images in messages that are sent on WhatsApp.
Step one: Sign up to MessageBird and WhatsApp Business
Before we build the flow, you'll need to complete the following steps. If you've already completed these, you can skip ahead to step two.
Step two: Set up Google Cloud Platform
Once you've signed up for both MessageBird and WhatsApp Business, follow these steps to set up Google Cloud Platform.
- Go to Google Cloud Platform and sign up for a free account
- Create a new Google Cloud Platform project
- Create an API key in GCP
- Enable the Cloud Vision API
Step three: Connect everything in the MessageBird Dashboard
Once you've set up Google Cloud Platform, follow these steps to connect everything together.
- Download this Vision AI flow
- Log in to the MessageBird Dashboard
- Navigate to Flow Builder
- Click on Import Flow and upload the Vision AI flow
- The first step of your flow is the Omni-channel step. Click on this step, go to the step setting and check the box next to your WhatsApp Business channel to select it
- Click on the second step, which is named Replace 1 of 1 - GCP API Key, and add the Google Cloud Platform API key into the Value field
- To trigger the flow, initiate a message with the WhatsApp channel. You'll receive a WhatsApp message asking you to reply with an image
- Reply with an image. Once you've done this, Flow Builder will make a call to Vision AI's API endpoint, with the image as the payload. The uploaded image will be processed and, based on probability, the top two category types will be returned within the conversation. That's it, you're done!