Skip to content

Commit 6695d11

Browse files
Danny/connect docs misc (#16386)
* A few updates - cron timezones - featured weights in apps API - handling test events for deployed triggers * Update pnpm-lock.yaml * Update components.mdx
1 parent 545b143 commit 6695d11

File tree

4 files changed

+37
-8
lines changed

4 files changed

+37
-8
lines changed

docs-v2/pages/connect/api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ props that were configured so far. See the [Dynamic
16011601
Props](/connect/components/#configure-dynamic-props-optional) section for more information.
16021602

16031603
```text
1604-
GET /{component_type}/props
1604+
POST /{component_type}/props
16051605
```
16061606

16071607
##### Path parameters
@@ -2051,7 +2051,7 @@ The URL to which the trigger will send events.
20512051

20522052
---
20532053

2054-
`workflow_url` **string** (_optional_)
2054+
`workflow_id` **string** (_optional_)
20552055

20562056
The Pipedream workflow ID to which you want to emit events (ex, `p_1234567`).
20572057

docs-v2/pages/connect/components.mdx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ Here's the response:
122122
"custom_fields_json": "[{\"name\":\"base_api_url\",\"label\":\"Base API URL\",\"description\":\"The Base API URL defaults to `gitlab.com`. If you are using self-hosted Gitlab, enter your base url here, e.g. `gitlab.example.com`\",\"default\":\"gitlab.com\",\"optional\":null}]",
123123
"categories": [
124124
"Developer Tools"
125-
]
125+
],
126+
"featured_weight": 5000
126127
}
127128
]
128129
}
@@ -820,14 +821,21 @@ These are 2 categories of triggers you can deploy on behalf of your end users:
820821
- [Native triggers](#native-triggers)
821822

822823
<Callout type="info">
823-
Refer to the [full Connect API reference](/connect/api/#deploy-a-trigger) to list, retrieve, delete, and manage triggers for your user
824+
Refer to the [full Connect API reference](/connect/api/#deploy-a-trigger) to list, retrieve, delete, and manage triggers for your user.
824825
</Callout>
825826

826827
### App-based event sources
827828
- Listen for events that occur in other systems: for example, when [a new file is added to Google Drive](https://pipedream.com/apps/google-drive/triggers/new-files-instant) or when [a new contact is created in HubSpot](https://pipedream.com/apps/hubspot/triggers/new-or-updated-contact)
828829
- Deploying these triggers requires that your customers first connect their account using [Pipedream Connect Managed Auth](/managed-auth/quickstart), since the triggers are deployed on their behalf using account
829830
- Refer to the [quickstart above](#deploying-a-source) to get started
830831

832+
#### Handling test events
833+
- Many event sources attempt to retrieve a small set of historical events on deploy to provide visibility into the event shape for end users and developers
834+
- Exposing real test events make it easier to consume the event in downstream systems without requiring users to trigger real events ([more info](/components/contributing/guidelines/#surfacing-test-events))
835+
- However, this results in emitting those events to the listening webhook immediately, which may not always be ideal, depending on your use case
836+
- If you'd like to avoid emitting historical events, you can deploy a trigger without defining a `webhook_url`, then [update the listening webhooks for the deployed trigger](/connect/api/#update-the-webhooks-listening-to-a-deployed-trigger) after roughly a minute
837+
838+
831839
### Native triggers
832840
- You can also deploy native triggers, which don't require any authentication from your end users, so **you should skip the account connection process when configuring these triggers**
833841
- Because these triggers don't use a connected account from your end users, APIs to deploy and manage them are slightly different (see below)
@@ -885,6 +893,21 @@ curl -X POST https://api.pipedream.com/v1/connect/{project_id}/components/trigge
885893
#### Schedule
886894
Deploy a timer to act as a cron job that will emit an event on a custom schedule you or your users define.
887895

896+
##### Configured props
897+
898+
`cron` (**object**)
899+
900+
When defining schedules, you can pass one of the following:
901+
- `intervalSeconds`: Define the frequency in seconds
902+
- `cron`: Define a custom cron schedule and optionally define the `timezone`. For example:
903+
904+
```json
905+
"cron": {
906+
"cron": "0 * * * *",
907+
"timezone": "America/Los_Angeles" // optional, defaults to UTC
908+
}
909+
```
910+
888911
<Tabs items={['Node.js', 'HTTP (cURL)']}>
889912
<Tabs.Tab>
890913
```javascript

docs-v2/pages/rest-api/index.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,8 @@ curl https://api.pipedream.com/v1/apps
390390
"custom_fields_json": "[]",
391391
"categories": [
392392
"Communication"
393-
]
393+
],
394+
"featured_weight": 1000000001
394395
},
395396
{
396397
"id": "app_mWnheL",
@@ -402,12 +403,17 @@ curl https://api.pipedream.com/v1/apps
402403
"custom_fields_json": "[{\"name\":\"bot_token\",\"label\":\"Bot Token\",\"description\":null,\"default\":null,\"optional\":null,\"type\":\"password\"}]",
403404
"categories": [
404405
"Communication"
405-
]
406+
],
407+
"featured_weight": 4100
406408
}
407409
]
408410
}
409411
```
410412

413+
<Callout type="info">
414+
The `apps` API returns a `featured_weight` for integrated apps, which powers the sort order on [pipedream.com/apps](https://pipedream.com/apps). Note that this is roughly based on popularity from Pipedream users, but is manually defined by Pipedream and is subject to change.
415+
</Callout>
416+
411417
### Get an App
412418

413419
Retrieve metadata for a specific app.
@@ -449,6 +455,7 @@ curl https://api.pipedream.com/v1/apps/app_OkrhR1 \
449455
"categories": [
450456
"Communication"
451457
]
458+
"featured_weight": 1000000001
452459
}
453460
]
454461
```

pnpm-lock.yaml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)