What is the Procedure to Add a New, Unsupported Action, such as Commenting on a Zendesk Ticket?

This topic was automatically generated from Slack. You can find the original thread here.

what is the process for adding a new action that is not supported by a vendor? for example, I want to add an action for adding a comment to a Zendesk ticket.

To add a new action in Pipedream that’s not currently supported by a vendor (like “Add Comment to Zendesk Ticket”), you have two main options: — ## 1. Build a Custom Action Using a Code Step You can write your own Node.js code step in Pipedream to call the Zendesk API directly. Here’s how you’d approach adding a comment to a Zendesk ticket: - Add a Node.js code step to your workflow. - Connect your Zendesk account as an app prop (see the example below). - Use the Zendesk API endpoint for adding a comment to a ticket (usually a PUT or POST to /api/v2/tickets/{ticket_id}.json with the comment in the payload). Example Pipedream component: ```
import { axios } from “@pipedream/platform”; export default defineComponent({ props: { zendesk: { type: “app”, app: “zendesk”, }, ticketId: { type: “string”, label: “Ticket ID”, description: “The ID of the Zendesk ticket”, }, comment: { type: “string”, label: “Comment”, description: “The comment to add to the ticket”, }, }, async run({ steps, $ }) { const url = https://${this.zendesk.$auth.subdomain}.[zendesk.com/api/v2/tickets/${this.ticketId}.json;](http://zendesk.com/api/v2/tickets/${this.ticketId}.json`;) const data = { ticket: { comment: { body: this.comment, }, }, }; return await axios($, { method: “PUT”, url, headers: { Authorization: Bearer ${this.zendesk.$auth.oauth_access_token}, “Content-Type”: “application/json”, }, data, }); }, });

can I build actions for use in managed auth only, and not in a workflow?

No, you cannot build actions for use in “managed auth only” outside of a workflow in Pipedream. Explanation: - Pipedream actions and triggers are always used within workflows. Managed authentication (like the Zendesk OAuth connection) is available to you when you build custom actions/components, but these are designed to run as steps in a workflow. - There is currently no way to create an action that is only available as a “managed auth” utility outside of a workflow context. All custom actions/components must be run as part of a workflow, even if that workflow is just a single step. - If you want to use managed auth to make API calls (for example, to Zendesk) without a workflow, that’s not supported. The managed auth is only available inside workflow steps (custom code or custom components). Summary: You must use managed auth (like Zendesk OAuth) within a workflow step (either a prebuilt action or a custom code/component step). There is no way to use managed auth outside of a workflow context in Pipedream. If you have a specific use case or need, please let me know! If you need more support, visit Support - Pipedream.

Hey , check out this doc: Connect API Proxy - Pipedream