The Google Cloud Vision API allows you to analyze images in the cloud, harnessing Google's machine learning technology. You can detect and classify multiple objects, face and landmark detection, handwriting recognition, and image attributes. Combining this with Pipedream's serverless platform catalyzes the creation of automated workflows to process images, trigger actions, and integrate with other services seamlessly.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
google_cloud_vision_api: {
type: "app",
app: "google_cloud_vision_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.googleapis.com/oauth2/v1/userinfo`,
headers: {
Authorization: `Bearer ${this.google_cloud_vision_api.$auth.oauth_access_token}`,
},
})
},
})
Content Moderation System: Use Google Cloud Vision API to detect explicit content in images uploaded to a cloud storage service like Dropbox or Google Drive. Once an image is flagged, Pipedream can automate notifications, remove the image, or log the event in a database for review.
Label-based Image Organization: Employ the API to tag images with labels and then use Pipedream to sort and store them in relevant folders in services such as Google Photos or Amazon S3. This can be useful for digital asset management, making it easier to search and retrieve images based on their content.
Automated Data Extraction from Scanned Documents: Leverage the API's OCR capabilities to extract text from scanned documents or images. Pipedream can take this data, format it, and then input it into a spreadsheet on Google Sheets or a record in Airtable, streamlining data entry and archival processes.
Performs feature detection on a local or remote image file. See the documentation.
Detects logos within a local or remote image file. See the documentation.
Detects text in a local image or remote image. See the documentation.
Google Cloud Vision uses OAuth authentication. When you connect your Google Cloud Vision account, Pipedream will open a popup window where you can sign into Google Cloud Vision and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Google Cloud Vision API.
Pipedream requests the following authorization scopes when you connect your account:
email
profile
https://www.googleapis.com/auth/cloud-platform.read-only
https://www.googleapis.com/auth/cloud-vision
GET
https://accounts.google.com/o/oauth2/v2/auth
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
access_type=offline
&
prompt=consent
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}