Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(docs) Invoke workflows for external users #14589

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dylburger
Copy link
Contributor

@dylburger dylburger commented Nov 7, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a new "workflows" section in documentation to guide users on running workflows.
    • Added detailed instructions and examples for invoking workflows using cURL, TypeScript, and Node.js.
    • Added a "Troubleshooting" section to address common errors users may encounter.
  • Documentation Updates

    • Enhanced security by replacing sensitive information placeholders in API documentation.
    • Improved clarity in authentication, pagination, and error handling sections of the REST API documentation.
    • Added a new section on retrieving credentials securely in the quickstart guide.
    • Expanded documentation for workflow triggers, including a new cURL tab and detailed instructions on handling large payloads.
    • Updated the description of the development environment for better clarity and usability in Pipedream Connect projects.

Copy link

vercel bot commented Nov 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 9:28pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
pipedream-docs ⬜️ Ignored (Inspect) Nov 12, 2024 9:28pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Nov 12, 2024 9:28pm

Copy link
Contributor

coderabbitai bot commented Nov 7, 2024

Walkthrough

This pull request introduces enhancements to the documentation for the Pipedream Connect API and workflows. A new "workflows" section has been added to the JSON metadata, and multiple documentation files have been updated to improve clarity, security, and usability. Key changes include the introduction of placeholder values for sensitive information, the addition of new sections on workflows and credential management, and the expansion of existing documentation to cover new API endpoints and error handling practices.

Changes

File Path Change Summary
docs-v2/pages/connect/_meta.json Added a new section: "workflows": { "title": "Running workflows" } and "troubleshooting": { "title": "Troubleshooting" }.
docs-v2/pages/connect/api.mdx Replaced sensitive information placeholders in code examples with generic placeholders; added environment and projectId parameters.
docs-v2/pages/connect/quickstart.mdx Added section on retrieving credentials; updated client creation examples to include projectId and use placeholders for sensitive data.
docs-v2/pages/connect/workflows.mdx Introduced a comprehensive guide on running workflows, detailing steps, components, and code snippets for various programming languages.
docs-v2/pages/rest-api/index.mdx Enhanced authentication, parameters, pagination, error handling, and added new endpoints for workspace and webhook management.
docs-v2/pages/workflows/index.mdx Removed the word "linear" from the workflows description.
docs-v2/pages/workflows/triggers.mdx Added new cURL tab; updated OAuth examples; detailed payload handling and error management.
docs-v2/pages/connect/environments.mdx Enhanced the description of the development environment and added a new section on using development mode.
docs-v2/pages/connect/troubleshooting.mdx Added a new section titled "Troubleshooting" with common error messages.

Possibly related PRs

  • [Docs] Update Workflows Custom Error Handling #12948: This PR updates the documentation related to custom error handling within workflows, which may relate to the changes in the main PR regarding troubleshooting and workflows.
  • Invoke workflows via the SDK #14040: This PR introduces a new method invokeWorkflow in the SDK, which could be relevant to the changes in the main PR that involve adding new sections related to workflows and their management.
  • Initial commit of workflow SDK / OAuth docs #14053: This PR includes updates to the Connect API documentation, particularly around OAuth and workflow invocation, which aligns with the changes made in the main PR regarding the addition of new sections in the documentation.
  • cherry picked changes from new docs #14473: This PR introduces several new sections in the _meta.json file, which directly relates to the structural changes made in the main PR regarding the documentation organization.
  • Danny/docs connect app configuration #14611: This PR focuses on documentation updates for the Connect app configuration, which aligns with the changes made in the main PR that enhance the clarity and usability of the documentation.

Suggested labels

enhancement, User submitted

Suggested reviewers

  • michelle0927

🐰 "In the meadow, changes bloom,
Workflows dance, dispelling gloom.
With placeholders bright and guides so clear,
Pipedream Connect, we hold dear!
Hop along, let’s code and play,
Together we’ll find a better way!" 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (8)
docs-v2/pages/connect/workflows.mdx (3)

73-73: Fix grammatical error in the conditional statement.

There's a grammatical error in the sentence.

-If you've don't have a test account, create one:
+If you don't have a test account, create one:
🧰 Tools
🪛 LanguageTool

[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)


111-121: Improve TypeScript example formatting and add error handling.

The TypeScript example could be improved for better readability and robustness:

  1. Add missing comma after the user ID parameter
  2. Include error handling example
 await pd.invokeWorkflowForExternalUser(
   "{your_endpoint_url}", // pass the endpoint ID or full URL here
-  "{your_external_user_id}" // The end user's ID in your system
+  "{your_external_user_id}", // The end user's ID in your system
   {
     method: "POST",
     body: {
       message: "Hello World"
     }
   },
   HTTPAuthType.OAuth // Will automatically send the Authorization header with a fresh token
-)
+).catch(error => {
+  console.error('Workflow invocation failed:', error);
+  // Handle error appropriately
+});

101-109: Add security best practices note for credential handling.

While the code correctly uses placeholders for sensitive information, it would be helpful to add a note about secure credential storage best practices.

Add a comment block above the client initialization:

// SECURITY BEST PRACTICES:
// 1. Never hardcode credentials in your source code
// 2. Use environment variables or a secure secret management service
// 3. Rotate client secrets periodically
// 4. Use the minimum required permissions for your OAuth client
docs-v2/pages/connect/quickstart.mdx (2)

177-182: Consider enhancing environment configuration guidance.

While the environment comment is helpful, consider adding a callout or note section above the code example to emphasize the importance of environment configuration and provide guidance on determining the correct environment.

Add a note section before the code example:

+<Callout type="info">
+The `environment` parameter should match your deployment environment:
+- Use "development" when testing with development credentials
+- Use "production" when deploying to production or testing with production credentials
+
+Ensure you're using the correct environment to avoid authentication issues.
+</Callout>

Line range hint 187-195: Consider adding security best practices for credential handling.

While the code examples and flow are clear, consider adding more explicit guidance on secure credential handling, particularly for the include_credentials parameter.

Add security notes in the comments:

  // Parse and return the data you need. These may contain credentials, 
- // which you should never return to the client
+ // SECURITY: Never expose raw credentials to the client. Instead:
+ // 1. Store credentials securely (e.g., encrypted in your database)
+ // 2. Return only necessary metadata (e.g., account ID, user email)
+ // 3. Use environment variables or a secure secrets manager

Also applies to: 213-221

docs-v2/pages/connect/api.mdx (2)

193-198: Excellent improvements to security and consistency in client initialization examples.

The changes across all client initialization examples demonstrate several improvements:

  1. Added environment context for better clarity
  2. Standardized sensitive information placeholders for better security
  3. Consistent structure across all examples
  4. Added projectId parameter for proper scoping

Consider adding a note about the importance of securing these credentials in production environments, perhaps recommending environment variables or secure credential management systems.

Also applies to: 212-217, 301-306, 469-474, 490-495, 613-618, 631-636, 697-702, 715-720, 781-786, 799-804, 861-866, 879-884


Line range hint 1-924: Consider enhancing error response documentation.

While the documentation is comprehensive, it would be beneficial to include specific error response examples and status codes for each endpoint, helping developers handle error cases more effectively.

docs-v2/pages/workflows/triggers.mdx (1)

Line range hint 146-215: LGTM! Well-structured code examples for OAuth authentication.

The examples effectively demonstrate OAuth authentication across TypeScript, Node.js, and cURL. The progression from obtaining an access token to using it in requests is clear and helpful.

Consider adding a note about securely storing the OAuth credentials, perhaps referencing Pipedream's built-in secret management capabilities.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6a2bfd7 and b2b0c51.

📒 Files selected for processing (7)
  • docs-v2/pages/connect/_meta.json (1 hunks)
  • docs-v2/pages/connect/api.mdx (17 hunks)
  • docs-v2/pages/connect/quickstart.mdx (2 hunks)
  • docs-v2/pages/connect/workflows.mdx (1 hunks)
  • docs-v2/pages/rest-api/index.mdx (2 hunks)
  • docs-v2/pages/workflows/index.mdx (1 hunks)
  • docs-v2/pages/workflows/triggers.mdx (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs-v2/pages/workflows/index.mdx
🧰 Additional context used
🪛 LanguageTool
docs-v2/pages/connect/workflows.mdx

[uncategorized] ~57-~57: Possible missing article found.
Context: ...nt — you can select the option to Use end user's auth via Connect: <div classN...

(AI_HYDRA_LEO_MISSING_THE)


[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)

🔇 Additional comments (9)
docs-v2/pages/connect/_meta.json (1)

11-13: LGTM! The new section is well-positioned.

The addition of the "workflows" section follows a logical progression in the documentation structure, placed appropriately after the quickstart guide and before the API reference.

Let's verify that the corresponding documentation file exists:

✅ Verification successful

Workflows documentation file exists as expected

The verification confirms that docs-v2/pages/connect/workflows.mdx exists, which aligns with the navigation structure defined in _meta.json.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the workflows documentation file exists
# Expected: Should find the corresponding .mdx file

fd -e mdx workflows docs-v2/pages/connect/

Length of output: 80

docs-v2/pages/connect/workflows.mdx (2)

1-29: Well-structured introduction with clear explanations!

The introduction effectively explains workflows, their capabilities, and features while maintaining good readability with appropriate visual aids and links to detailed documentation.


1-176: Excellent documentation structure and content!

The documentation is well-organized, comprehensive, and provides clear instructions with appropriate examples. The use of visual aids, code examples, and step-by-step guides makes it very user-friendly.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~57-~57: Possible missing article found.
Context: ...nt — you can select the option to Use end user's auth via Connect: <div classN...

(AI_HYDRA_LEO_MISSING_THE)


[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)

docs-v2/pages/connect/quickstart.mdx (1)

203-208: LGTM!

The JavaScript implementation maintains consistency with the TypeScript example and follows the same secure practices for handling sensitive information.

docs-v2/pages/connect/api.mdx (2)

126-126: LGTM! Clear and well-structured documentation.

The new workflows section effectively directs users to the dedicated documentation while maintaining a clear and concise overview.


243-243: LGTM! Consistent placeholder usage in API examples.

The API endpoint examples maintain consistency with the new placeholder format, making the documentation more uniform and easier to follow.

Also applies to: 870-870, 888-888

docs-v2/pages/workflows/triggers.mdx (2)

154-155: LGTM! Consistent use of placeholders for sensitive information.

The placeholders for OAuth credentials follow a clear, consistent format that helps users understand what values to insert.

Also applies to: 178-179, 202-203


197-214: LGTM! Clear and comprehensive cURL example for OAuth flow.

The cURL example effectively demonstrates the complete OAuth flow, from token generation to API usage, with helpful comments guiding users through each step.

docs-v2/pages/rest-api/index.mdx (1)

Line range hint 687-700: LGTM! Clear and well-documented search example.

The example effectively demonstrates how to search for components using natural language queries, with a clear request and response format.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (5)
docs-v2/pages/connect/workflows.mdx (5)

11-13: Consider using versioned image URLs.

The current image URL contains what appears to be a timestamp (v1730935490). To ensure long-term reliability, consider using a versioned URL or storing images in the repository's assets directory.


73-73: Fix grammatical error.

The sentence "If you've don't have a test account" contains incorrect grammar.

-If you've don't have a test account, create one:
+If you don't have a test account, create one:
🧰 Tools
🪛 LanguageTool

[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)


103-104: Enhance environment selection guidance.

The environment selection comments could be more explicit about when to use each environment. Consider adding a note explaining that:

  • 'development' is for testing and development purposes
  • 'production' is for live/production deployments
-  environment: "development", // change to production if running for a test production account, or in production
+  environment: "development", // Use 'development' for testing, 'production' for live deployments

Also applies to: 130-131, 167-167


176-176: Complete the Errors section.

The "Errors" section appears to be incomplete. This section should include:

  • Common error scenarios
  • Error response formats
  • Troubleshooting guidance
  • Error handling best practices

Would you like me to help draft content for the Errors section?


101-102: Add security best practices section.

Consider adding security recommendations for handling client credentials and tokens:

  • Secure storage of OAuth credentials
  • Token rotation practices
  • Rate limiting considerations
  • Access control best practices

Would you like me to help draft a security best practices section?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b2b0c51 and 7c104c4.

📒 Files selected for processing (1)
  • docs-v2/pages/connect/workflows.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs-v2/pages/connect/workflows.mdx

[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
docs-v2/pages/connect/workflows.mdx (2)

73-73: Fix grammatical error in the test account section.

There's a grammatical error in the sentence.

-If you've don't have a test account, create one:
+If you don't have a test account, create one:
🧰 Tools
🪛 LanguageTool

[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)


101-109: Add security note about credential handling.

Consider adding a comment about secure credential storage best practices, particularly for production environments.

 // These secrets should be saved securely and passed to your environment
+// IMPORTANT: Never hardcode these values or commit them to version control
 const pd = createBackendClient({
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7c104c4 and b529c0a.

📒 Files selected for processing (1)
  • docs-v2/pages/connect/workflows.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs-v2/pages/connect/workflows.mdx

[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)

🔇 Additional comments (2)
docs-v2/pages/connect/workflows.mdx (2)

1-29: Well-structured introduction and overview section!

The introduction effectively explains workflows and their capabilities, with good use of visual aids and clear organization of information.


17-17: Verify environment variable configuration.

The documentation uses {process.env.PUBLIC_APPS} to display the number of integrated apps.

✅ Verification successful

Environment variable PUBLIC_APPS is properly configured

The environment variable is correctly configured in next.config.js with a value of "2,200" and is consistently used across multiple documentation files to display the number of integrated apps. This is a valid usage pattern for Next.js documentation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the environment variable usage in other documentation files
rg -l "PUBLIC_APPS" docs-v2/

Length of output: 504


Script:

#!/bin/bash
# Check how PUBLIC_APPS is configured in next.config.js
cat docs-v2/next.config.js

# Check a few examples of how it's used in documentation
echo "=== Usage in index.mdx ==="
rg "PUBLIC_APPS" docs-v2/pages/index.mdx -C 2

echo "=== Usage in connected-accounts/index.mdx ==="
rg "PUBLIC_APPS" docs-v2/pages/connected-accounts/index.mdx -C 2

Length of output: 3473

</Tabs>
</Steps>

## Errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Complete the Errors section.

The "Errors" section is currently empty. This section should include:

  • Common error scenarios
  • Error codes and their meanings
  • Troubleshooting steps
  • Example error responses

This information is crucial for users to handle errors properly in their implementations.

Would you like me to help draft the content for the Errors section?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (5)
docs-v2/pages/connect/environments.mdx (2)

8-8: Consider adding OAuth client usage details

While the explanation is good, it would be helpful to clarify:

  1. Which OAuth clients are available
  2. Any limitations on OAuth client usage
  3. Whether this applies to all integrations or specific ones

18-20: Enhance warning with security implications

While the warning is clear about usage, consider adding security implications:

  • Development mode might expose sensitive OAuth scopes
  • Test data could be mixed with production data if not careful
docs-v2/pages/connect/workflows.mdx (3)

73-73: Fix grammatical error.

There's a grammatical error in the sentence: "If you've don't have a test account".

Apply this correction:

-If you've don't have a test account, create one:
+If you don't have a test account, create one:
🧰 Tools
🪛 LanguageTool

[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)


102-104: Consider using environment constants.

The environment value is hardcoded as "development" with a comment to change it for production. Consider using a constant or configuration value to prevent potential errors from forgotten manual changes.

Consider refactoring to use an environment variable or configuration constant:

const environment = process.env.PIPEDREAM_ENVIRONMENT || "development";

const pd = createBackendClient({
  environment,
  // ... rest of the config
});

Also applies to: 130-131


187-187: Fix missing preposition in error description.

The sentence is missing the preposition "to" after "connected an account".

Apply this correction:

-but the user hasn't connected an account one or more of the apps
+but the user hasn't connected an account to one or more of the apps
🧰 Tools
🪛 LanguageTool

[uncategorized] ~187-~187: Possible missing preposition found.
Context: ...ut the user hasn't connected an account one or more of the apps that are configured...

(AI_HYDRA_LEO_MISSING_TO)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b529c0a and 2572abe.

📒 Files selected for processing (3)
  • docs-v2/pages/connect/_meta.json (2 hunks)
  • docs-v2/pages/connect/environments.mdx (1 hunks)
  • docs-v2/pages/connect/workflows.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs-v2/pages/connect/_meta.json
🧰 Additional context used
🪛 LanguageTool
docs-v2/pages/connect/workflows.mdx

[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)


[uncategorized] ~187-~187: Possible missing preposition found.
Context: ...ut the user hasn't connected an account one or more of the apps that are configured...

(AI_HYDRA_LEO_MISSING_TO)

🔇 Additional comments (2)
docs-v2/pages/connect/environments.mdx (1)

1-7: LGTM!

The import statement and introduction are clear and well-structured.

docs-v2/pages/connect/workflows.mdx (1)

17-17: Verify the environment variable interpolation.

The line references {process.env.PUBLIC_APPS} which needs verification to ensure it's properly configured in the build environment.

Let's check for the environment variable usage:

#!/bin/bash
# Search for PUBLIC_APPS environment variable definition
rg "PUBLIC_APPS.*=" --type-add config:*.{json,env,yaml,yml} --type config


## How to specify environment

You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. By default, the enviromment is set to `production`. When users succesfully connect their account, Pipedream saves it for that `external_user_id` in the specified `project_environment`.
You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. By default, the enviromment is set to `production`. When users succesfully connect their account, Pipedream saves it for that `external_user_id` in the specified `environment`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix typos in environment specification

There are two typos in this line:

  • "enviromment" should be "environment"
  • "succesfully" should be "successfully"
-You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. By default, the enviromment is set to `production`. When users succesfully connect their account, Pipedream saves it for that `external_user_id` in the specified `environment`.
+You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. By default, the environment is set to `production`. When users successfully connect their account, Pipedream saves it for that `external_user_id` in the specified `environment`.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. By default, the enviromment is set to `production`. When users succesfully connect their account, Pipedream saves it for that `external_user_id` in the specified `environment`.
You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. By default, the environment is set to `production`. When users successfully connect their account, Pipedream saves it for that `external_user_id` in the specified `environment`.

Comment on lines +1 to +20
import Callout from '@/components/Callout'

# Environments

Pipedream Connect projects support two environments: `development` and `production`.

1. Connected accounts and credentials stored in `development` remain separate from `production`.
2. In `development`, you can use the official Pipedream OAuth apps, so you can test integrations without creating your own OAuth client.
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).

## How to specify environment

You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. By default, the enviromment is set to `production`. When users succesfully connect their account, Pipedream saves it for that `external_user_id` in the specified `project_environment`.
You specify the environment when [creating a new Connect token](/connect/api/#create-a-new-token) with the Pipedream SDK or API. By default, the enviromment is set to `production`. When users succesfully connect their account, Pipedream saves it for that `external_user_id` in the specified `environment`.

## Using development mode

When connecting an account in `development` mode, the end user who is connecting their account must be signed in to pipedream.com.

<Callout type="warning">
`development` mode should only be used by you and your team for testing. When you're ready to test with real users, switch to `production`.
</Callout>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing referenced documentation file

  • The file docs-v2/pages/connect/api/.mdx referenced in /connect/api/#create-a-new-token does not exist.
🔗 Analysis chain

Verify documentation cross-references

Let's ensure all referenced documentation sections exist and are accessible.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that referenced documentation sections exist

# Check for referenced documentation files
echo "Checking for referenced documentation files..."
for path in "/connect/workflows" "/connect/api/#create-a-new-token"; do
  # Remove the hash part for file checking
  file_path="docs-v2/pages${path%#*}.mdx"
  if ! fd -t f "${file_path##*/}" | grep -q "$file_path"; then
    echo "Warning: Referenced file not found: $file_path"
  fi
done

Length of output: 602

Comment on lines +11 to +13
<div className="mt-4">
<img width="500px" src="https://res.cloudinary.com/pipedreamin/image/upload/v1730935490/docs/pCBdtm7Ca9CdPHTe76PwfzddY_qowz2v.avif" />
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Multiple Image URLs Contain Expiring Timestamps

Several image URLs in the documentation use timestamped Cloudinary URLs, which may lead to broken images in the future. Consider using permanent URL structures or implementing a stable versioning strategy.

🔗 Analysis chain

Consider using a more permanent image URL structure.

The current Cloudinary URL contains what appears to be a timestamp (v1730935490). To ensure long-term stability, consider using a more permanent URL structure or implementing a versioning strategy that doesn't rely on timestamps.

Let's verify if this image URL pattern is consistent across the documentation:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for similar Cloudinary URLs with timestamps
rg -l "cloudinary.*v[0-9]{10}" --type mdx

Length of output: 268


Script:

#!/bin/bash
# Display lines 11-13 of the specified MDX file
sed -n '11,13p' docs-v2/pages/connect/workflows.mdx

Length of output: 216


Script:

#!/bin/bash
# Search for Cloudinary URLs with a timestamp pattern in the specified MDX file
rg 'https://res\.cloudinary\.com/.*/v\d+/.+\.avif' docs-v2/pages/connect/workflows.mdx

Length of output: 223


Script:

#!/bin/bash
# Search for all Cloudinary URLs with a versioning timestamp in MDX files
rg 'https://res\.cloudinary\.com/.*/v\d+/.+\.(avif|png|jpg|jpeg|gif)' --type mdx

Length of output: 110


Script:

#!/bin/bash
# Search for all Cloudinary URLs with a versioning timestamp in MDX files
rg 'https://res\.cloudinary\.com/.*/v\d+/.+\.(avif|png|jpg|jpeg|gif)' -g '*.mdx'

Length of output: 32589

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
docs-v2/pages/connect/workflows.mdx (1)

73-73: Fix grammatical error

Change "If you've don't have" to "If you don't have"

-If you've don't have a test account, create one:
+If you don't have a test account, create one:
🧰 Tools
🪛 LanguageTool

[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2572abe and c9e6a0b.

📒 Files selected for processing (2)
  • docs-v2/pages/connect/troubleshooting.mdx (1 hunks)
  • docs-v2/pages/connect/workflows.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs-v2/pages/connect/troubleshooting.mdx
🧰 Additional context used
🪛 LanguageTool
docs-v2/pages/connect/workflows.mdx

[uncategorized] ~57-~57: Possible missing article found.
Context: ...nt — you can select the option to Use end user's auth via Connect: <div classN...

(AI_HYDRA_LEO_MISSING_THE)


[grammar] ~73-~73: The text is not correct, but LanguageTool has no suggestions about how to correct the text.
Context: ...he workflow](#invoke-the-workflow). If you've don't have a test account, create one: - If ...

(VE_DIDNT)

🔇 Additional comments (2)
docs-v2/pages/connect/workflows.mdx (2)

98-171: LGTM! Well-structured code examples

The code examples are well-organized, properly documented, and follow security best practices:

  • Consistent use of placeholders for sensitive information
  • Clear comments about secure credential handling
  • Comprehensive examples in multiple languages

176-192: LGTM! Comprehensive error documentation

The Errors section is now complete and well-structured, covering:

  • Common error scenarios
  • Clear explanations of causes
  • Actionable resolution steps
  • Links to relevant documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants