The Clerk API lets you manage user authentication and create secure, delightful user experiences in your apps. Within Pipedream's serverless platform, you can harness this API to automate workflows that trigger on user events, sync user data across apps, and maintain robust user management without the heavy lifting of building authentication infrastructure from scratch.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
clerk: {
type: "app",
app: "clerk",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.clerk.com/v1/users`,
headers: {
Authorization: `Bearer ${this.clerk.$auth.secret_key}`,
},
})
},
})
Automate User Onboarding: When a new user signs up via Clerk, trigger a Pipedream workflow that sends a personalized welcome email using the SendGrid app, adds the user to a CRM like HubSpot for future outreach, and logs the activity in a Google Sheets spreadsheet.
Sync Profile Updates Across Platforms: Establish a workflow that listens for profile updates in Clerk. When a user changes their info, Pipedream can propagate these changes to other platforms, such as updating their Slack profile, sending a notification to a Discord channel, and updating their record in an Airtable base.
Manage Access with Webhooks: Use Clerk's webhooks to trigger a Pipedream workflow that revokes or grants access to features or content in your app. For instance, when a subscription status changes in Stripe, use Pipedream to call Clerk's API to update the user's session or permissions accordingly, ensuring consistent access control.
Creates a new user. Your user management settings determine how you should setup your user model. See the documentation
Creates a new invitation for the given email address and sends the invitation email. Keep in mind that you cannot create an invitation if there is already one for the given email address. Also, trying to create an invitation for an email address that already exists in your application will result to an error. See the documentation
Retrieve a list of the user's organization memberships. See the documentation
Clerk uses API keys for authentication. When you connect your Clerk account, Pipedream securely stores the keys so you can easily authenticate to Clerk APIs in both code and no-code steps.