You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-v2/pages/connect/workflows.mdx
+117-7Lines changed: 117 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,14 +38,16 @@ Read [the quickstart](/quickstart/) to learn more.
38
38
39
39
[Create a new workflow](/workflows#how-do-i-create-a-new-workflow) or open an existing one.
40
40
41
-
### Add an HTTP trigger, configure OAuth
41
+
### Add an HTTP trigger
42
42
43
-
1. Add an [HTTP trigger](/workflows/triggers#http) to your workflow.
44
-
2.[Configure **OAuth** authorization](/workflows/triggers#oauth) on the trigger.
43
+
To get started building workflows for your end users:
45
44
46
-
<Callouttype="info">
47
-
To securely run workflows for end users, **configuring OAuth authorization on the trigger is optional but strongly recommended.**[Create a Pipedream OAuth client](/rest-api/auth#creating-an-oauth-client) to authenticate requests to the Pipedream API and workflows.
48
-
</Callout>
45
+
1. Add an [HTTP trigger](/workflows/triggers#http) to your workflow
46
+
2. Generate a test event with the required headers:
47
+
-`x-pd-environment: development`
48
+
-`x-pd-external-user-id: {your_external_user_id}`
49
+
50
+
See the [Triggering your workflow](#triggering-your-workflow) section below for details on securing your workflow with OAuth and deploying triggers on behalf of your end users.
49
51
50
52
### Configure accounts to use your end users' auth
51
53
@@ -235,7 +237,7 @@ curl -X POST https://{your-endpoint-url} \
235
237
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. [Let us know](https://pipedream.com/support) if that's a feature you'd like to see.
236
238
</Callout>
237
239
238
-
## Testing workflow steps
240
+
## Testing
239
241
240
242
To test a step using the connected account of one of your end users in the builder, you'll need a few things to be configured so that your workflow knows which account to use.
241
243
@@ -252,6 +254,114 @@ To test a step using the connected account of one of your end users in the build
You have two options for triggering workflows that run on behalf of your end users:
260
+
261
+
1.[Invoke via HTTP webhook](#http-webhook)
262
+
2.[Deploy an event source](#deploy-an-event-source) (Slack, Gmail, etc.)
263
+
264
+
### HTTP Webhook
265
+
266
+
The most common way to trigger workflows is via HTTP webhook. We strongly recommend [creating a Pipedream OAuth client](/rest-api/auth#creating-an-oauth-client) and authenticating inbound requests to your workflows.
267
+
268
+
To get started, you'll need:
269
+
270
+
-[OAuth client ID and secret](/rest-api/auth#creating-an-oauth-client) (optional but recommended)
271
+
- Your [project ID](/projects#finding-your-projects-id)
272
+
- Your workflow's HTTP endpoint URL
273
+
- The [external user ID](/connect/api#external-users) of your end user
274
+
- The [Connect environment](/connect/environments)
-H 'X-PD-Environment: development'\ # 'development' or 'production'
348
+
-d '{
349
+
"message": "Hello, world"
350
+
}'
351
+
```
352
+
</Tabs.Tab>
353
+
</Tabs>
354
+
355
+
### Deploy an event source
356
+
357
+
You can [programmatically deploy triggers via the API](/connect/api#deploy-a-trigger) to have events from integrated apps (like [new Slack messages](/apps/slack/triggers/new-message-in-channels) or [new emails in Gmail](/apps/gmail/triggers/new-email-received)) trigger your workflow. This allows you to:
358
+
359
+
- Deploy triggers for specific users from your application
360
+
- Configure trigger parameters per-user
361
+
- Manage deployed triggers via the API
362
+
363
+
See the [API documentation](/connect/api#deploy-a-trigger) for detailed examples of deploying and managing triggers.
364
+
255
365
## Troubleshooting
256
366
257
367
For help debugging issues with your workflow, you can return verbose error messages to the caller by configuring the HTTP trigger to **Return a custom response from your workflow**.
0 commit comments