with Plain and iAuditor by SafetyCulture?
Create a new inspection in iAuditor by SafetyCulture. See the documentation
Create a new user in iAuditor by SafetyCulture. See the documentation
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,
    })
  },
})
iAuditor by SafetyCulture API allows you to tap into a rich reservoir of safety and quality inspection data, enabling you to automate workflows around inspection management. With this API on Pipedream, you can create custom integrations to trigger actions based on audit completions, new issues, or updates in iAuditor. Streamline safety processes, connect with other tools, and manipulate inspection data to fit your needs.
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    iauditor_by_safetyculture: {
      type: "app",
      app: "iauditor_by_safetyculture",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://api.safetyculture.io/share/connections`,
      headers: {
        Authorization: `Bearer ${this.iauditor_by_safetyculture.$auth.api_token}`,
        "accept": `application/json`,
        "sc-integration-id": `sc-readme`,
      },
    })
  },
})