Activities
latest
false
Classic Integrations Activities
Last updated Jul 17, 2024

Quickstart - Safe Search

Overview

The purpose of this guide is to help you create a working sample of the Safe Search activity. This working sample enables you to quickly verify the connection to your AWS account and get familiar with the activity's input/output datatypes.

By completing the steps in this guide, you'll have an automation sequence that does the following:

  1. Establishes a connection to your AWS account and Amazon Rekognition services via the Amazon Scope activity.
  2. Detects explicit nudity or suggestive content in an image and returns the result via the Detect Text activity.
  3. Tests the Safe Search input/output properties via properties via the If, For Each and Write Line activities.


Prerequisites

Before you begin:

  1. Complete the Amazon Rekognition Setup steps.
  2. Create a new automation project.
    1. Open UiPath Studio.
    2. Under New Project, click Process (this opens a New Blank Process window).
    3. Enter a project Name, Location, and Description.
    4. Click Create.


  3. Install the UiPath.Amazon.Scope.Activities and UiPath.Amazon.Rekognition.Activities packages.
    1. In the Design ribbon, click Manage Packages (this opens the Manage Packages window).
    2. Under All Packages, click Go!
    3. In the Search bar, enter Amazon.
    4. Click, install and accept the license for both the UiPath.Amazon.Scope.Activities and UiPath.Amazon.Rekognition.Activities.
      • For more information about Uipath Studio packages, see Managing Packages in the Studio Guide.


Steps

Build Your Project
  1. Add the Amazon Scope activity to your project.
  2. Add the Safe Search activity after the Amazon Scope activity.
  3. Enter the ImagePath or ImageURL of the image that contains the text you want to detect.
    • Recommendation: create a String variable for your image location so that you can reuse it in other activities (e.g., Identify Faces, Add Faces).
  4. Create and enter a UnsafeContent[] variable for the Result property (e.g., unsafeCategory).
    • When creating your variable, select the UiPath.Amazon.Rekognition.Models.UnsafeContent[] variable type.
  5. Create and enter a Boolean variable for the Suggestive property (e.g., suggestiveContent).


Test Your Project
  1. To test the Safe Search activity Compare Face**, add an If activity that includes a For Each with a Write Line activity according to the below:
  2. In the If activity Condition property, enter a value to check if the image has suggestive content by writing the following (using the `Boolean~ variable you created in step 2 above): _suggestiveContent.ToString.Equals("True").
  3. In the Then statement box, add the For Each with a Write Line activity.
    1. In the TypeArgument property, select UiPath.Amazon.Rekognition.Models.UnsafeContent.
    2. In the Values property, enter the UnsafeContent[] variable you created in step 4 above (e.g., unsafeCategory)..
    3. In the Text property, enter item.Explanation (this returns both the parent category and explanation).
  4. In the Else statement box, add a Write Line activity.
    1. In the Text property value enter "You're image is safe.".
  5. Click Run and verify the Output window includes the face detail values you entered in the Write Line activities.


You're done!

When you're ready, try the other Quickstart guides to get more familiar with the different Amazon Rekognition ativities.

To learn more about the other Amazon Rekognition activities, see the Activities page for a complete activity list and links to the activity detail pages.

  • Overview
  • Prerequisites
  • Steps

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.