Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.
Extracts text from the provided image using Azure AI Vision OCR. See the documentation
Send a simple or structured message (using embeds) to a Discord channel
The Discord API interacts seamlessly with Pipedream, empowering you to craft customized automations and workflows for your Discord server. With this powerful integration, you can automate tasks like message posting, user management, and notifications, based on a myriad of triggers and actions from different apps. These automations can enhance the Discord experience for community moderators and members, by synchronizing with external tools, organizing community engagement, and streamlining notifications.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
discord: {
type: "app",
app: "discord",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://discord.com/api/users/@me`,
headers: {
Authorization: `Bearer ${this.discord.$auth.oauth_access_token}`,
"accept": `application/json`,
},
})
},
})
The Azure AI Vision API provides powerful image analysis capabilities, enabling you to extract information and insights from your visual data. With this API, you can perform tasks like image classification, object detection, and OCR (Optical Character Recognition) to recognize text within images. Leveraging Pipedream, you can integrate these AI-powered insights into your workflows to create dynamic and automated processes.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
azure_ai_vision: {
type: "app",
app: "azure_ai_vision",
}
},
async run({steps, $}) {
const data = {
"url": `https://images.unsplash.com/photo-1528459199957-0ff28496a7f6`, //e.g. https://images.unsplash.com/photo-1528459199957-0ff28496a7f6
}
return await axios($, {
method: "POST",
url: `${this.azure_ai_vision.$auth.endpoint}computervision/imageanalysis:analyze`,
params: {
"api-version": `2023-02-01-preview`,
features: `read`, //e.g. read
},
headers: {
"Ocp-Apim-Subscription-Key": `${auths.azure_ai_vision.subscription_key}`,
},
data,
})
},
})