with Plain and Formatting?
Get the duration between two dates in days, hours, minutes, and seconds along with checking if they are the same.
Format a date string to another date string. For more examples on formatting, see the Sugar Date Format documentation.
Format a number to a new style. Does not perform any rounding or padding of the number.
Find a match for a regular expression pattern. Returns all matched groups with start and end position.
Find an email address out of a text field. Finds the first email address only.
Creates or updates customer with customer details. See the documentation
Find a number out of a text field. Finds the first number only.
Find a complete phone number out of a text field. Finds the first number only.
Find a web URL out of a text field. Finds the first URL only.
Replace all instances of any character, word or phrase in the text with another character, word or phrase.
Split the text on a character or word and return one or all segments
The Plain API provides functionality for automating customer support tasks, such as managing conversations, customers, and team inboxes. Within Pipedream, you can leverage these features to create custom workflows that respond to events from your app or external services, triggering actions in Plain. By integrating the Plain API with Pipedream, you can enhance customer support efficiency, streamline communication, and keep customer data synchronized across platforms.
import { axios } from "@pipedream/platform" export default defineComponent({ props: { plain: { type: "app", app: "plain", } }, async run({steps, $}) { const data = { "query": `query Workspace { workspace(workspaceId: "${this.plain.$auth.workspace_id}") { id publicName } }`, } return await axios($, { method: "post", url: `https://core-api.uk.plain.com/graphql/v1`, headers: { Authorization: `Bearer ${this.plain.$auth.api_key}`, "Content-Type": `application/json`, }, data, }) }, })
export default defineComponent({ async run({ steps, $ }) { const text = ' Hello world! '; return text.trim() }, })