A common struggle: you've searched way too many combinations of words to find the image you need and it's still not popping up. Keeping your content organized and searchable, especially as the number of assets grows over time, can require a lot of manual work. What if you could automatically add metadata and/or tags to any image or video you upload to Box and move it to the right folder with zero manual effort?
Giuliano Iacobelli from Stamplay put together a quick guide to show you how to use their low-code development platform to integrate Box with Clarifai, an image and video recognition API. Stamplay makes it easy to integrate multiple APIs, and Clarifai quickly analyzes images and returns tags to be used as metadata.
The following guide originally appeared on the Stamplay blog here.
1. Setup the workspace in your Box account
Start by creating two folders in your Box account that your application can use to organize your content. First, create a folder named "Stamplay DAM," and then create a folder within "Stamplay DAM" called "upload."
2. Get a Clarifai API Key
Next, you'll need to grab an API key from Clarifai. Clarifai is an image and video recognition API service that analyzes and automatically tags images and videos.
To get a free API key, create a Clarifai account here. Once you've created your account, click on "Applications" in the Clarifai developer console and click "Create a New Application." Copy the Client ID and Client Secret - you’re going to need both of these in a couple of minutes.
3. Configuring the Blueprint
This app is available as a Stamplay Blueprint, a pre-built template to help you get started. You can click here to initiate the Blueprint or click on the button below. You'll need to log in to your Stamplay account or create a new Stamplay account.
Pick a name for your project and click "Next." A configuration wizard will start. Stamplay will prompt you to connect your Box account and provide the Clarifai client ID and secret you copied in the previous step. Once you have connected the two services to Stamplay, click "Next."
Now, it’s time to configure the Stamplay workflow. First, you’ll be asked to select the folder where you’re going to upload your images. Use the "upload" folder we created in step 1 - start typing “upload” in the dropdown menu and select the folder once it appears. (It may take a few minutes to index the folder name.) Once the folder is selected and you see a green check below the dropdown you can move on.
Next, you'll need the ID of the main folder for this app, so you'll need to provide the ID of the folder “Stamplay DAM” that you created in step 1. You can find the folder ID in the URL of the Box web application when you're viewing that folder, seen below.
Paste the folder ID in the "Folder ID" field. The same ID needs to be pasted in the "Create Folder" step, as this is where your images will be organized and where this application will create subfolders to organize pictures. Paste the folder ID in the "Folder ID" field under "Create Folder".
Next, you'll need to enter an email address where you want to receive notifications in case your app encounters any issues while processing an image. Type your email address inside the "To:" field and a random email address in the "From:" field.
4. Add the Box Metadata Template
The last step is to initialize a Box Metadata template. You can do this by clicking on the link provided in the configuration wizard. Metadata allows you to organize content in Box using structured key:value pairs and is available on all Box Business Plus plans and above.
You’re good to go now! Try uploading images to the upload folder and you’ll start seeing your content organized. Upon upload, images will be analyzed by Clarifai and all tags will be applied to the image using Box's metadata capabilities. Now, you can filter or search for specific tags, helping you keep your content organized and searchable.
We’ve found Stamplay to be a great tool for automating processes like this and creating high-value integrations by tying together API services like Box Platform. If you need help to connect your apps or have an API that you want to make easy to connect with, tweet them at @stamplay and/or join their Slack organization.