UNPKG

@andrewcturing/google_dialogflow

Version:

Pipedream Google Dialogflow Components

26 lines (24 loc) 786 B
import googleDialogflow from "../../google_dialogflow.app.mjs"; export default { type: "action", key: "google_dialogflow-get-intent", version: "0.0.1", name: "Get Intent", description: "Retrieves an intent [See REST docs](https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.agent.intents/get) and [client API][https://googleapis.dev/nodejs/dialogflow/latest/google.cloud.dialogflow.v2beta1.Intents.html#getIntent2]", props: { googleDialogflow, intent: { propDefinition: [ googleDialogflow, "intent", ], }, }, async run({ $ }) { const response = await this.googleDialogflow.getIntent({ name: this.intent, }); $.export("$summary", "Intent has been retrieved."); return response[0]; }, };