@pipedream/freshdesk
Version:
Pipedream Freshdesk Components
27 lines (25 loc) • 640 B
JavaScript
import freshdesk from "../../freshdesk.app.mjs";
export default {
key: "freshdesk-get-contact",
name: "Get Contact",
description: "Get a contact from Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#view_contact)",
version: "0.0.1",
type: "action",
props: {
freshdesk,
contactId: {
propDefinition: [
freshdesk,
"contactId",
],
},
},
async run({ $ }) {
const contact = await this.freshdesk.getContact({
$,
contactId: this.contactId,
});
$.export("$summary", `Successfully fetched contact: ${contact.name}`);
return contact;
},
};