Skip to content

Commit b019595

Browse files
Various Connect docs updates
1 parent 7b80e0b commit b019595

File tree

6 files changed

+46
-109
lines changed

6 files changed

+46
-109
lines changed

docs-v2/pages/connect/_meta.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
"title": "Use cases",
77
},
88
"quickstart": {
9-
"title": "Quickstart",
9+
"title": "Managed auth",
1010
},
1111
"workflows": {
1212
"title": "Running workflows",
@@ -32,12 +32,12 @@ export default {
3232
"connect-link": {
3333
"title": "Connect Link",
3434
},
35-
"troubleshooting": {
36-
"title": "Troubleshooting",
37-
},
3835
"customize-your-app": {
3936
"title": "Customize your app",
4037
},
38+
"troubleshooting": {
39+
"title": "Troubleshooting",
40+
},
4141
"migrating-from-project-keys-to-oauth": {
4242
"display": "hidden",
4343
},

docs-v2/pages/connect/components.mdx

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,35 @@
11
import { Steps, Tabs } from 'nextra/components'
2-
import ArcadeEmbed from '@/components/ArcadeEmbed'
32
import Callout from '@/components/Callout'
4-
import Image from 'next/image'
53

64
# Running components for your end users
75

8-
Pipedream Connect provides you with the ability to pre-configure, deploy and
9-
invoke [components](/components) **on behalf of [your end
10-
users](/connect/api#external-users)**.
6+
Pipedream Connect provides APIs to embed [pre-built components](/components) directly in your application
7+
or AI agent, unlocking access to thousands of pre-built API operations. Enable [your end users](/connect/api#external-users) to
8+
configure, deploy, and invoke Pipedream triggers and actions for more than {process.env.PUBLIC_APPS} APIs.
119

1210
## What are components?
1311

14-
In the context of Pipedream Connect, components are self-contained executable
15-
units of code. They are usually provided with some arbitrary input and produce a
16-
result that's exported as output. These components are developed by the
17-
Pipedream community and their source code is available in our [public Github
18-
repository](https://github.com/PipedreamHQ/pipedream/tree/master/components).
19-
20-
To learn more about components in detail, please visit our [Components
21-
guide](/components).
12+
In Pipedream, [components](/components) are self-contained executable units of code. Your end users configure the inputs and the components produce a
13+
result that's exported as output. These components are developed and maintained by Pipedream
14+
and our community and their source code is available in our [public Github repo](https://github.com/PipedreamHQ/pipedream/tree/master/components).
2215

2316
<Callout type="info">
2417
Running components for your end users via Pipedream Connect is in **beta**, and we're looking for feedback. Please [let us know](https://pipedream.com/support) how you're using it, what's not working, and what else you'd like to see.
2518
</Callout>
2619

27-
## How to run components for your end users
20+
## Getting stated
2821

2922
<Callout type="info">
3023
Refer to the [Connect API docs](/connect/api) for the full API reference. Below is a quickstart with a few specific examples.
24+
25+
You can skip steps 1 and 2 if you already know the component you want to use or if you'd prefer to [pass a natural language prompt to Pipedream's component search API](/rest-api#search-for-registry-components).
3126
</Callout>
3227

3328
<Steps>
3429

3530
### Find the app you want to use
3631

37-
<Callout type="info">
38-
You can also skip steps 1 and 2 if you already know the component you want to use or if you'd prefer to [pass a natural language prompt to Pipedream's component search API](/rest-api#search-for-registry-components).
39-
</Callout>
40-
41-
In order to find the right trigger or action to configure and run, you first need to find the app. For this example, we'll search for `gitlab`.
32+
In order to find the right trigger or action to configure and run, you first need to find the app. In this example, we'll search for `gitlab`.
4233

4334
```text
4435
GET /v1/connect/apps?q=gitlab
@@ -145,7 +136,7 @@ Here's the response:
145136
```
146137
### Retrieve the component's definition
147138

148-
In order to run a component for your end users, you need to understand
139+
To configure and run a component for your end users, you need to understand
149140
the component's definition. Now that you have the component's key from the previous step,
150141
you can retrieve its structure from the Pipedream API. See the [component
151142
structure](/components/api#component-structure) section in our docs for more
@@ -158,11 +149,10 @@ Commits** action for Gitlab:
158149
GET /v1/connect/components/gitlab-list-commits
159150
```
160151

161-
The response will contain the component's structure, including its
162-
(human-understandable) name, version, and most importantly, the configuration
163-
options that the component accepts (also known as [props](/components/api#props)
164-
or "properties"). Here's an example of the response for the component in the
165-
example above:
152+
The response will contain the component's structure, including its user-friendly name,
153+
version, and most importantly, the configuration options the component accepts
154+
(also known as [props](/components/api#props) or "properties").
155+
Here's an example of the response for the component in the example above:
166156

167157
```json
168158
{
@@ -213,9 +203,8 @@ Component execution on behalf of your end users requires a few preliminary
213203
steps, focused on getting the right input parameters (aka
214204
[props](/workflows/using-props)) to the component.
215205

216-
Configuring each prop for a component usually involves an API call to our
217-
backend to retrieve the possible values, unless the values that a prop can take
218-
are static/free-form. The endpoint is accessible at:
206+
Configuring each prop for a component often involves an API call to retrieve the possible values,
207+
unless the values that a prop can take are static or free-form. The endpoint is accessible at:
219208

220209
```text
221210
POST /v1/connect/components/configure
@@ -224,7 +213,7 @@ POST /v1/connect/components/configure
224213
Typically, the options for a prop are linked to a specific user's account. Each
225214
of these props implements an `options` method that retrieves the necessary
226215
options from the third-party API, formats them, and sends them back in the
227-
response for the end user to select.
216+
response for the end user to select. Examples are listing Slack channels, Google Sheets, etc.
228217

229218
The payload for the configuration API call must contain the following fields:
230219

@@ -235,7 +224,7 @@ The payload for the configuration API call must contain the following fields:
235224
configured. The initial configuration call must contain the ID of the account
236225
(aka `authProvisionId`) that your user has connected to the target app (see
237226
[this section](workflows#configure-accounts-to-use-your-end-users-auth) for
238-
more details on how to create these accounts)
227+
more details on how to create these accounts).
239228

240229
We'll use the [**List Commits** component for
241230
Gitlab](https://github.com/PipedreamHQ/pipedream/blob/master/components/gitlab/actions/list-commits/list-commits.mjs#L4)
@@ -344,7 +333,7 @@ For example, to retrieve the configuration options for the `refName` prop:
344333

345334
### Configure dynamic props (optional)
346335

347-
The set of props that a component can accept might not be static, and can change
336+
The set of props that a component can accept might not be static, and may change
348337
depending on the values of prior props. Props that behave this way are called
349338
[dynamic props](/components/api#dynamic-props), and they need to be configured
350339
in a different way. Props that are dynamic will have a `reloadProps` attribute
@@ -361,7 +350,7 @@ The payload is similar to the one used for the configuration API, but it
361350
excludes the `prop_name` field since the goal of this call is to reload and
362351
retrieve the new set of props, not to configure a specific one.
363352

364-
Using the **Add Single Row** component for Google Sheets as an example, the
353+
Using the [Add Single Row action for Google Sheets](https://pipedream.com/apps/google-sheets/actions/add-single-row) as an example, the
365354
request payload would look like this:
366355

367356
```json
@@ -455,7 +444,8 @@ Actions are components that perform a task by taking an input either during
455444
produce a result. Sources are very similar, but the difference is that they are
456445
not invoked directly by Pipedream users, but rather by events that happen on a
457446
third-party service. For example, the "New File" source for Google Drive will be
458-
triggered every time a new file is created in a specific folder in Google Drive.
447+
triggered every time a new file is created in a specific folder in Google Drive,
448+
then will emit an event for you to consume.
459449

460450
All this means is that actions can be invoked manually on demand, while sources
461451
are instead deployed and run automatically when the event they are listening for
@@ -545,7 +535,7 @@ look something like this:
545535

546536
```json
547537
{
548-
"external_user_id": "jverce",
538+
"external_user_id": "demo-20a1b80e-23a5-4d4d-a8ef-c91cdbd0dad9",
549539
"id": "gitlab-new-issue",
550540
"prop_name": "http",
551541
"configured_props": {
@@ -608,7 +598,7 @@ this:
608598
"type": "$.service.db"
609599
},
610600
"http": {
611-
"endpoint_url": "https://39643dc2c8ff98a019f3fdc9078d6db9.m.pipedream.net"
601+
"endpoint_url": "https://xxxxxxxxxx.m.pipedream.net"
612602
},
613603
"projectId": 45672541
614604
},
@@ -625,7 +615,7 @@ In the example above, the source ID is `dc_dAuGmW7`, which can be used to delete
625615
the source in the future:
626616

627617
```text
628-
DELETE /v1/connect/deployed-triggers/dc_dAuGmW7?external_user_id=jverce
618+
DELETE /v1/connect/deployed-triggers/dc_dAuGmW7?external_user_id=demo-20a1b80e-23a5-4d4d-a8ef-c91cdbd0dad9
629619
```
630620

631621
</Steps>

docs-v2/pages/connect/environments.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Pipedream customers on any plan can use all of the Connect features in `developm
1010
</Callout>
1111

1212

13-
## How to specify environment
13+
## How to specify the environment
1414

1515
You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. When users succesfully connect their account, Pipedream saves the account credentials (API key, access token, etc) for that `external_user_id` in the specified environment.
1616

@@ -41,7 +41,7 @@ curl -X POST https://api.pipedream.com/v1/connect/{project_id}/tokens \
4141
```
4242

4343
<Callout type="warning">
44-
When connecting an account in `development`, make sure you're signed in to pipedream.com in the same browser where you're connecting your account. This is only a requirement for the `development` environment. **You should only use the `development` environment with your own accounts when testing and developing, and not with your end users.**
44+
When connecting an account in `development`, make sure you're signed in to pipedream.com in the same browser where you're connecting your account. This is only a requirement for the `development` environment. **You should only use `development` with your own accounts when testing and developing, and not with your end users.**
4545
</Callout>
4646

4747
<br />

docs-v2/pages/connect/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Connect lets you:
1313

1414
1. Handle authorization or accept API keys on behalf of your users, for any of Pipedream's [{process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps). Use the [Client SDK](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk) or [Connect Link](/connect/quickstart#use-connect-link) to accept auth in minutes.
1515
2. Securely retrieve OAuth access tokens, API keys, and other credentials for your end users with Pipedream's [REST API](/connect/api)
16-
3. Run workflows for your end users with Pipedream's [workflow builder](/workflows), [serverless runtime](/), and thousands of no-code [triggers](/workflows/triggers) and [actions](/workflows/actions). Build complex integrations in minutes, writing code when you need it and using no-code components when you don't. Pipedream workflows are easy to modify, debug, and scale.
17-
4. Run [any Pipedream action](https://pipedream.com/explore) or [deploy any Pipedream trigger](https://pipedream.com/explore) on behalf of your users, directly from within your application.
16+
3. [Run workflows](/connect/workflows) for your end users with Pipedream's [workflow builder](/workflows), [serverless runtime](/), and thousands of no-code [triggers](/workflows/triggers) and [actions](/workflows/actions). Build complex integrations in minutes, writing code when you need it and using no-code components when you don't. Pipedream workflows are easy to modify, debug, and scale.
17+
4. [Embed any Pipedream action or trigger](/connect/components) to run on behalf of your users, directly from within your application.
1818

1919
<br />
2020

@@ -61,7 +61,7 @@ So if user `abc-123` in your application connects their Slack account in `produc
6161

6262
## Plans and pricing
6363

64-
**Connect is free to use for up to 1,000 connected accounts for any workspace**.
64+
**Managed authentication with Connect is free to use for up to 1,000 connected accounts for any workspace**. Check out our [pricing page](https://pipedream.com/pricing?plan=Enterprise) for details on running workflows and embedding components in your app.
6565

6666
## Security
6767

docs-v2/pages/connect/quickstart.mdx

Lines changed: 10 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Steps, Tabs } from 'nextra/components'
33
import Image from 'next/image'
44
import VideoPlayer from "@/components/VideoPlayer";
55

6-
# Quickstart
6+
# Managed Auth Quickstart
77

88
Pipedream Connect is the easiest way for your users to connect to [over {process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps), **right in your product**. You can build in-app messaging, CRM syncs, AI agents, [and much more](/connect/use-cases), all in a few minutes.
99

@@ -94,7 +94,7 @@ Once you have a token, return it to your frontend to start the account connectio
9494
Refer to the API docs for [full set of parameters you can pass](/connect/api#create-a-new-token) in the `ConnectTokenCreate` call.
9595
</Callout>
9696

97-
### Connect a user's account
97+
### Connect your user's account
9898

9999
To connect a third-party account for a user, you have two options:
100100

@@ -144,7 +144,7 @@ export default function Home() {
144144

145145
Press that button to connect an account for the app you configured.
146146

147-
#### Use Connect Link
147+
#### Or use Connect Link
148148

149149
Use this option when you can't execute JavaScript or open an iFrame in your environment (e.g. mobile apps), or when you want to offload the account connection flow to Pipedream and avoid frontend work. You can also send these links via email or SMS.
150150

@@ -160,70 +160,17 @@ https://pipedream.com/_static/connect.html?token={token}&connectLink=true&app={a
160160

161161
4. Redirect your users to this URL, or send it to them via email, SMS, and more.
162162

163-
### Retrieve the credentials from the backend
163+
### Make authenticated requests
164164

165-
Once your user connects an account, you can retrieve their credentials from your backend.
165+
Now that your users have connected an account, you can use their auth in one of a few ways:
166166

167-
This example shows you how to fetch credentials by your end user's `external_user_id`. You can also fetch all connected accounts for a specific app, or a specific user — see the [Connect API reference](/connect/api).
168-
169-
<Tabs items={['TypeScript', 'Node.js']}>
170-
<Tabs.Tab>
171-
```typescript
172-
import {
173-
createBackendClient,
174-
} from "@pipedream/sdk/server";
175-
176-
const pd = createBackendClient({
177-
environment: "development", // change to production if running for a test production account, or in production
178-
credentials: {
179-
clientId: "{oauth_client_id}",
180-
clientSecret: "{oauth_client_secret}",
181-
},
182-
projectId: "{your_project_id}"
183-
});
184-
185-
async function getUserAccounts(external_user_id: string, include_credentials: boolean = false) {
186-
await pd.getAccounts({
187-
external_user_id,
188-
include_credentials, // set to true to include credentials
189-
})
190-
191-
// Parse and return the data you need. These may contain credentials,
192-
// which you should never return to the client
193-
}
194-
```
195-
</Tabs.Tab>
196-
<Tabs.Tab>
197-
```javascript
198-
import {
199-
createBackendClient,
200-
} from "@pipedream/sdk/server";
201-
202-
const pd = createBackendClient({
203-
environment: "development", // change to production if running for a test production account, or in production
204-
credentials: {
205-
clientId: "{oauth_client_id}",
206-
clientSecret: "{oauth_client_secret}",
207-
},
208-
projectId: "{your_project_id}"
209-
});
210-
211-
async function getUserAccounts(external_user_id, include_credentials = false) {
212-
await pd.getAccounts({
213-
external_user_id,
214-
include_credentials, // set to true to include credentials
215-
})
216-
217-
// Parse and return the data you need. These may contain credentials,
218-
// which you should never return to the client
219-
}
220-
```
221-
</Tabs.Tab>
222-
</Tabs>
167+
1. [Retrieve their credentials from the REST API](/connect/api#accounts) to use in your backend application
168+
2. [Use Pipedream's visual workflow builder](/connect/workflows) to define complex logic to run on behalf of your users
169+
3. [Embed Pipedream components directly in your app](/connect/components) to run actions and triggers on their behalf
223170

224171
### Deploy your app to production
225172

226-
- Now that you've successfully connected an account and retrieved the credentials, you're almost done!
227-
- Learn about [development environments](/connect/environments) and [using OAuth clients](/connect/oauth-clients) to deploy your app to production.
173+
- Test end to end in [development](/connect/environments)
174+
- Ship to production!
228175

229176
</Steps>

docs-v2/pages/connect/workflows.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Workflows also have built-in:
3030

3131
Read [the quickstart](/quickstart/) to learn more.
3232

33-
## How to run workflows for your end users
33+
## Getting started
3434

3535
<Steps>
3636

0 commit comments

Comments
 (0)