Skip to content

Commit b920895

Browse files
Connect docs
- More info on workflow invokes - Clarifying development environment usage
1 parent c19369e commit b920895

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

docs-v2/pages/connect/environments.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Pipedream Connect projects support two environments: `development` and `producti
99
2. In `development`, you can use the official Pipedream OAuth clients, so you can test integrations without creating your own OAuth client, and you can also use features that are typically only available on higher paid tiers, like [running workflows on behalf of your end users](/connect/workflows).
1010

1111
<Callout type="warning">
12-
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.
12+
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.**
1313
</Callout>
1414

1515
<br />

docs-v2/pages/connect/workflows.mdx

+44-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ Read [the quickstart](/quickstart/) to learn more.
3434

3535
<Steps>
3636

37+
### Enable the feature flag
38+
39+
Go to [https://pipedream.com/settings/alpha](https://pipedream.com/settings/alpha) and click the checkbox, **Allow use Connect in builder**.
40+
3741
### Create an OAuth client
3842

39-
**This step is optional but strongly recommended.** To securely run workflows for end users, you'll need to first [create a Pipedream OAuth client](/rest-api/auth#creating-an-oauth-client). Pipedream uses OAuth to authenticate requests to the Pipedream API and workflows.
43+
**This step is optional but strongly recommended.** To securely run workflows for end users, you should [create a Pipedream OAuth client](/rest-api/auth#creating-an-oauth-client). Pipedream uses OAuth to authenticate requests to the Pipedream API and workflows.
4044

4145

4246
### Create a workflow
@@ -110,7 +114,7 @@ npm i @pipedream/sdk
110114

111115
To invoke workflows, you'll need:
112116

113-
1. The OAuth client ID and secret from your [workspace settings](rest-api/auth#oauth)
117+
1. The OAuth client ID and secret from your OAuth client in **[step 2](#create-an-oauth-client)**
114118
2. Your [Project ID](/projects#finding-your-projects-id)
115119
3. Your workflow's HTTP endpoint URL
116120
4. The [external user ID](/connect/api#external-users) of the user you'd like to run the workflow for
@@ -198,6 +202,44 @@ curl -X POST https://{your-endpoint-url} \
198202
</Tabs>
199203
</Steps>
200204

205+
## Step configuration
206+
207+
When configuring a workflow that's using your end user's auth instead of your own, you'll need to define most configuration fields manually in each step.
208+
209+
For example, normally when you connect your own Google Sheets account directly in the builder, you can dynamically list all of the available sheets from a dropdown.
210+
211+
<div className="mt-4">
212+
<img width="550px" src="https://res.cloudinary.com/pipedreamin/image/upload/v1732752732/async-options_iq7dtw.png" />
213+
</div>
214+
215+
However, when running workflows on behalf of your end users, that UI configuration doesn't work, since the Google Sheets account to use is determined at the time of workflow execution. So instead, you'll need to configure these fields manually.
216+
217+
- Either make sure to pass all required configuration data when invoking the workflow, or add a step to your workflow that retrieve it from your database, etc. For example:
218+
219+
```bash
220+
curl -X POST https://{your-endpoint-url} \
221+
-H "Content-Type: application/json" \
222+
-H "Authorization: Bearer {access_token}" \
223+
-H 'X-PD-External-User-ID: {your_external_user_id}' \
224+
-H 'X-PD-Environment: development' \ # 'development' or 'production'
225+
-d '{
226+
"slackChannel": "#general",
227+
"messageText": "Hello, world!",
228+
"gitRepo": "AcmeOrg/acme-repo",
229+
"issueTitle": "Test Issue"
230+
}' \
231+
```
232+
233+
- Then in the Slack and GitHub steps, you'd reference those fields directly:
234+
235+
<div className="mt-4">
236+
<img width="650px" src="https://res.cloudinary.com/pipedreamin/image/upload/v1732754036/step-refs_lhwhrj.png" />
237+
</div>
238+
239+
<Callout type="info">
240+
We plan to improve this interface in the future, and potentially allow developers to store end user metadata and configuration data alongside the connected account for your end users, so you won't need to pass the data at runtime.
241+
</Callout>
242+
201243
## Errors
202244

203245
#### No external user ID passed, but one or more steps require it

0 commit comments

Comments
 (0)