Set up image recognition for WhatsApp

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.

  1. Sign up for a MessageBird account

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.

  1. Go to Google Cloud Platform and sign up for a free account

  2. Create an API key in GCP

  3. 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.

  1. Log in to the MessageBird Dashboard

  2. Navigate to Flow Builder

  3. Click on Import Flow and upload the Vision AI flow

  4. 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

  5. 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

  6. To trigger the flow, initiate a message with the WhatsApp channel. You'll receive a WhatsApp message asking you to reply with an image

  7. 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!

Last updated