From 486067e5ce5810294f111db1fbc626cd061930d4 Mon Sep 17 00:00:00 2001 From: Danny Roosevelt Date: Tue, 25 Feb 2025 13:44:29 -0800 Subject: [PATCH] Updating docs on users in Connect (#15740) * Updating docs on users in Connect * Update users.mdx * Update users.mdx --- docs-v2/pages/connect/managed-auth/users.mdx | 59 +++++++++++++++++++- docs-v2/pages/connect/workflows.mdx | 4 ++ pnpm-lock.yaml | 3 +- 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/docs-v2/pages/connect/managed-auth/users.mdx b/docs-v2/pages/connect/managed-auth/users.mdx index 810f2fcd2ce7d..39244519f7dc3 100644 --- a/docs-v2/pages/connect/managed-auth/users.mdx +++ b/docs-v2/pages/connect/managed-auth/users.mdx @@ -10,8 +10,63 @@ To view or delete your users' connected accounts: You'll see a list of all users, their connected accounts, and the option to delete any accounts from the UI. You can also retrieve and delete all your users via the API ([see the docs for reference](/connect/api/)). +## Connecting multiple accounts + +Users can connect multiple accounts for many different apps, or for the same app (e.g., I can connect my Notion and Gmail accounts, as well as accounts for multiple Slack workspaces). + +When retrieving account information [from the API](/connect/api/#accounts), you can filter by `external_user_id` and / or `app` to retrieve information for a specific user and / or app. + -Connect currently supports one connected account per user, app, environment combination. +When running workflows on behalf of an end user, right now you can only use a single account for a given app. If there are multiple connected accounts for that app, **Pipedream will use the most recently created account**. See more info on running workflows for your users [here](/connect/workflows). + + +## Deleting accounts + +You can delete an individual connected account or an entire user and all associated accounts and resources from the UI or via the API. + +### Deleting individual connected accounts + +If you need more granular control, you can delete specific connected accounts instead of removing the entire user. + +#### From the UI +1. Open the project in Pipedream +2. Navigate to the **Users** tab under **Connect** +3. Find the user whose accounts you want to manage +4. View all connected accounts for that user in the expanded section +5. Click the **Delete** button next to the specific account you want to remove + +This allows for more granular control over which integrated services remain accessible to your users. -So if user `abc-123` in your application connects their Slack account in `production`, then that same user connects a different Slack workspace (also in `production`), the first connected account will get overwritten in Pipedream and replaced by the second. +#### Via the API +You can delete specific connected accounts programmatically: + +```bash +curl -X DELETE "https://api.pipedream.com/v1/connect/{project_id}/accounts/{account_id}" \ + -H "Authorization: Bearer {access_token}" +``` + +For complete API details including TypeScript and Node.js examples, [refer to the API reference](/connect/api/#delete-connected-account). + +### Deleting users + +When you delete a user, all of their connected accounts and deployed resources (if any) are permanently removed from Pipedream. There are two ways to delete users: + +#### From the UI +1. Open the project in Pipedream +2. Navigate to the **Users** tab under **Connect** +3. Locate the user you wish to delete +4. Click the **Delete User** button from the overlow menu at the end of the row + + +Deleting a user is permanent and cannot be undone. All connected accounts for this user will be permanently removed. + +#### Via the API +You can delete a user programmatically using the Pipedream API: + +```bash +curl -X DELETE "https://api.pipedream.com/v1/connect/{project_id}/users/{external_user_id}" \ + -H "Authorization: Bearer {access_token}" +``` + +For complete API details including TypeScript and Node.js examples, see the [API reference](/connect/api/#delete-an-end-user). \ No newline at end of file diff --git a/docs-v2/pages/connect/workflows.mdx b/docs-v2/pages/connect/workflows.mdx index cdf7eff66b0a2..3023a5f9853c2 100644 --- a/docs-v2/pages/connect/workflows.mdx +++ b/docs-v2/pages/connect/workflows.mdx @@ -412,3 +412,7 @@ Pipedream Connect Error: Required account for hubspot not found for external use #### The external user ID to use during execution must be passed in the triggering event - You can't run a workflow on a timer for example, and look up the external user ID to use at runtime. - The external user ID must be passed in the triggering event, typically via [HTTP trigger](#invoke-the-workflow). + +#### Cannot use multiple accounts for the same app during a single execution +- If a user has multiple accounts for the same app (tied to a single external user), **Pipedream will use the most recently created account**. +- Learn about [managing connected accounts](/connect/managed-auth/users/) for your end users. \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4949a3b25dc09..cf88c0d8585ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8168,8 +8168,7 @@ importers: specifier: ^1.1.1 version: 1.6.6 - components/needle: - specifiers: {} + components/needle: {} components/neetoinvoice: dependencies: