picked 0.0.111-next.2 → 0.0.111-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/docs/explanation/app-authentication.md +178 -0
  3. package/docs/explanation/apps.md +169 -0
  4. package/docs/explanation/conditions-and-the-logic-engine.md +12 -2
  5. package/docs/explanation/feature-flag-allocation.md +5 -3
  6. package/docs/how-to/apps/add-a-page-to-the-dashboard.md +257 -0
  7. package/docs/how-to/apps/add-a-workflow-tool.md +199 -0
  8. package/docs/how-to/apps/add-an-mcp-server-to-an-app.md +210 -0
  9. package/docs/how-to/apps/connect-a-third-party-service-with-oauth.md +307 -0
  10. package/docs/how-to/apps/create-an-app-in-the-dashboard.md +162 -0
  11. package/docs/how-to/apps/deploy-an-app.md +201 -0
  12. package/docs/how-to/apps/develop-an-app-locally.md +152 -0
  13. package/docs/how-to/apps/host-an-app-on-vercel.md +226 -0
  14. package/docs/how-to/apps/install-an-app.md +116 -0
  15. package/docs/how-to/apps/link-to-an-installation-from-your-site.md +134 -0
  16. package/docs/how-to/apps/read-project-data-from-an-app.md +225 -0
  17. package/docs/how-to/apps/rotate-an-app-key.md +130 -0
  18. package/docs/how-to/apps/run-code-when-a-workspace-publishes.md +148 -0
  19. package/docs/how-to/apps/store-data-for-an-installation.md +230 -0
  20. package/docs/how-to/apps/test-an-app.md +359 -0
  21. package/docs/how-to/apps/upgrade-or-uninstall-an-app.md +97 -0
  22. package/docs/how-to/apps/use-an-app-tool-in-a-workflow.md +112 -0
  23. package/docs/index.md +6 -3
  24. package/docs/reference/apps/app-kit.md +811 -0
  25. package/docs/reference/apps/environment.md +116 -0
  26. package/docs/reference/apps/manifest.md +311 -0
  27. package/docs/reference/apps/protocol.md +497 -0
  28. package/docs/reference/dashboard/apps.md +504 -0
  29. package/docs/reference/dashboard/external-apis.md +5 -0
  30. package/docs/reference/dashboard/features.mdx +5 -5
  31. package/docs/reference/dashboard/labels.md +25 -8
  32. package/docs/reference/dashboard/lead-search.md +6 -6
  33. package/docs/reference/dashboard/reports.mdx +13 -5
  34. package/docs/reference/dashboard/workflow-tools.md +14 -0
  35. package/docs/reference/glossary.md +153 -140
  36. package/docs/reference/management-api/authentication.md +36 -27
  37. package/docs/reference/management-api/authorization-and-scopes.md +73 -21
  38. package/docs/reference/management-api/schema/api-key.md +10 -10
  39. package/docs/reference/management-api/schema/app.md +726 -0
  40. package/docs/reference/management-api/schema/auth.md +7 -7
  41. package/docs/reference/management-api/schema/common.md +54 -35
  42. package/docs/reference/management-api/schema/feature.md +1 -1
  43. package/docs/reference/management-api/schema/feedback.md +1 -1
  44. package/docs/reference/management-api/schema/index.md +35 -20
  45. package/docs/reference/management-api/schema/label.md +31 -8
  46. package/docs/reference/management-api/schema/organization.md +66 -66
  47. package/docs/reference/management-api/schema/project.md +5 -5
  48. package/docs/reference/management-api/schema/report.md +1 -1
  49. package/docs/reference/management-api/schema/shopify.md +19 -19
  50. package/docs/reference/management-api/schema/tenant-branding.md +16 -0
  51. package/docs/reference/management-api/schema/workflow.md +6 -1
  52. package/docs/reference/management-api/schema/workspace.md +2 -2
  53. package/docs/reference/sdk/analytics-events.md +42 -36
  54. package/docs/reference/sdk/conditions.md +3 -3
  55. package/docs/reference/sdk/fields.md +5 -4
  56. package/docs/reference/sdk/index.md +4 -4
  57. package/docs/reference/sdk/plugins/create-experience.md +11 -9
  58. package/docs/reference/sdk/plugins/hotjar.md +2 -2
  59. package/docs/reference/sdk/plugins/sentry.md +2 -2
  60. package/docs/reference/sdk/plugins/shopify.md +2 -2
  61. package/docs/reference/sdk/predicates.md +5 -5
  62. package/docs/reference/sdk/ssr/index.md +4 -3
  63. package/docs/reference/sdk/ssr/rendering-and-hydration.md +30 -0
  64. package/docs/reference/sdk/type-generation.md +24 -19
  65. package/docs/reference/tools/admin-api-client.md +15 -0
  66. package/docs/reference/tools/cli.md +192 -41
  67. package/docs/reference/tools/mcp.md +30 -9
  68. package/docs/tutorials/first-app.md +308 -0
  69. package/package.json +4 -4
  70. package/docs/explanation/how-pickedql-works.md +0 -76
  71. package/docs/how-to/analytics/index.md +0 -324
  72. package/docs/reference/management-api/schema/analytics.md +0 -75
  73. package/docs/reference/pickedql/data-sources.md +0 -174
  74. package/docs/reference/pickedql/dimensions.md +0 -103
  75. package/docs/reference/pickedql/filtering.md +0 -64
  76. package/docs/reference/pickedql/index.md +0 -18
  77. package/docs/reference/pickedql/schema.md +0 -172
  78. package/docs/reference/pickedql/virtual-functions.md +0 -248
@@ -0,0 +1,112 @@
1
+ ---
2
+ type: how-to
3
+ layout: docs
4
+ ---
5
+
6
+ # How to use an app tool in a workflow
7
+
8
+ This guide shows you how to run a tool of an installed app in a workflow. It also shows you
9
+ how to use the output of the tool in a later node. Before you start, an app with workflow
10
+ tools must be installed on the project. Refer to
11
+ [How to install an app](/how-to/apps/install-an-app).
12
+
13
+ ## 1. Find the name of the tool
14
+
15
+ 1. In the project switcher, choose **Apps**.
16
+ 2. Find the app on the tab **Installed**.
17
+ 3. Read `Workflow tools: <names>` below the name of the app.
18
+
19
+ Each tool has the name `app.<slug>.<tool>`, such as `app.zoho-crm.create_lead`. The slug is
20
+ the slug of the installation in this project. Refer to
21
+ [Tools in a project](/reference/apps/manifest#tools-in-a-project).
22
+
23
+ ## 2. Add a tool node
24
+
25
+ 1. Open the workflow.
26
+ 2. Choose **Add node**.
27
+ 3. Choose **Add tool**.
28
+ 4. Choose the tool of the app.
29
+
30
+ In the editor, the name of a tool starts with the name of the app. For example, the editor
31
+ shows `create_lead` as **Zoho CRM: Create Zoho lead**.
32
+
33
+ ## 3. Set the arguments
34
+
35
+ The inspector shows one field for each argument of the tool, with the label from the app.
36
+
37
+ 1. Enter a value in each required argument. The editor shows an error on a required
38
+ argument that has no value.
39
+ 2. For an argument with a list of options, choose one of the options.
40
+ 3. Enter a value in each other argument that you need.
41
+
42
+ A value can be a template that reads the trigger or an earlier node. For example, set
43
+ **Last name** to `{{ trigger.action.responses.lastName }}`. Refer to
44
+ [Workflow templates](/reference/dashboard/workflow-templates).
45
+
46
+ ## 4. Use the output
47
+
48
+ A later node reads each output field of the tool as `{{ nodes.<node-id>.<field> }}`. For
49
+ example, `{{ nodes.zoho.zohoLeadId }}` is the ID of the Zoho lead that the node `zoho` made.
50
+
51
+ The reference page of each app gives the output fields of its tools.
52
+
53
+ ## 5. Continue after a failure
54
+
55
+ The node fails when Picked cannot get to the app. It also fails when the app answers with an
56
+ error status, or with no `output` object. To continue the run after a failure:
57
+
58
+ 1. Connect the error exit of the node to a condition node.
59
+ 2. Test `{{ nodes.<node-id>.error.retryable }}` in the condition.
60
+ 3. Connect the `false` exit of the condition to the nodes that record the failure.
61
+
62
+ The error of the node has these fields:
63
+
64
+ | Field | Value |
65
+ | ----------- | -------------------------------------------------------------------------------------------- |
66
+ | `code` | `app_unreachable` when Picked cannot get to the app. `app_tool_failed` when the app answers. |
67
+ | `message` | The node, the tool and the reason, such as `the app answered 502`. |
68
+ | `retryable` | `true` when Picked cannot get to the app, or the app answers with a status of 500 or more. |
69
+ | `status` | The HTTP status of the answer from the app. Only with `app_tool_failed`. |
70
+ | `reason` | `app_error` when the answer from the app has an `error.message`. |
71
+
72
+ The error of the node does not show the error message from the app. To send the call again,
73
+ refer to [How to retry a failed call with a loop](/how-to/retry-a-failed-call-with-a-loop).
74
+
75
+ These failures stop the run at the node, also when the error exit has an edge:
76
+
77
+ - The output from the app does not have the type of each output field of the tool.
78
+ - The app is not installed on the project now. The node names a tool that Picked does not
79
+ know.
80
+
81
+ ## 6. Test the workflow
82
+
83
+ 1. Open the **Test** tab of the workflow.
84
+ 2. Start a test run.
85
+
86
+ A tool with the effect `write`, such as **Create Zoho lead**, runs in a test run only when
87
+ **Execute writes** is on. A tool with the effect `read` always runs. When a tool of an app
88
+ runs in a test run, Picked tells the app that the call is a test. For example,
89
+ **Create Zoho lead** then makes no lead in Zoho. Refer to the
90
+ [workflow test runs reference](/reference/dashboard/workflow-test-runs).
91
+
92
+ ## API and MCP
93
+
94
+ You can also do this task with the [Management API](/reference/management-api/schema), the [MCP server](/reference/tools/mcp), or code that you send to [`picked_run`](/reference/tools/mcp-run).
95
+
96
+ | Task | GraphQL | MCP tool | Run |
97
+ | --- | --- | --- | --- |
98
+ | Find the name of the tool | [`workflowTools`](/reference/management-api/schema/workflow#workflowtools) | None | None |
99
+ | Add a tool node | [`workflowGraphUpdate`](/reference/management-api/schema/workflow#workflowgraphupdate) | [`update_workflow_graph`](/reference/tools/mcp#update_workflow_graph) | `tools.update_workflow_graph({ workflow_id, create_nodes, create_edges })` |
100
+ | Test the workflow | [`workflowTestRun`](/reference/management-api/schema/workflow#workflowtestrun) | [`test_run_workflow`](/reference/tools/mcp#test_run_workflow) | `tools.test_run_workflow({ workflow_id })` |
101
+
102
+ Give `workflowTools` the `projectId` of the project to get the tools of its apps. The MCP
103
+ tool `list_workflow_tools` does not give the tools of apps.
104
+
105
+ ## Related
106
+
107
+ - [Workflow tools](/reference/dashboard/workflow-tools) — the tools of Picked.
108
+ - [Workflow runs](/reference/dashboard/workflow-runs) — the status of a run, and the failures
109
+ that stop it.
110
+ - [How to upgrade or uninstall an app](/how-to/apps/upgrade-or-uninstall-an-app) — what
111
+ happens to the tools when you remove an app.
112
+ - [About apps](/explanation/apps) — how apps add tools to a project.
package/docs/index.md CHANGED
@@ -28,7 +28,9 @@ Then:
28
28
  - **[Content](/how-to/define-a-page-layout)** — Models, Blocks, entries, pages, and assets.
29
29
  - **[Publish](/how-to/publish-a-workspace)** — preview, publish, and roll back.
30
30
  - **[Administer and measure](/how-to/invite-and-remove-members)** — members, API keys,
31
- analytics, and the tools that connect Picked to Google Tag Manager and to an AI tool.
31
+ and the tools that connect Picked to Google Tag Manager and to an AI tool.
32
+ - **[Apps](/how-to/apps/install-an-app)** — install an app on a project, and use its
33
+ tools in a workflow.
32
34
  - **[Dashboard reference](/reference/dashboard/projects)** — every dashboard screen and
33
35
  every option, plus the [glossary](/reference/glossary).
34
36
  - **[How Picked works](/explanation/how-picked-works)** — what happens when you publish.
@@ -53,7 +55,8 @@ Then:
53
55
  - **[Server-side rendering](/how-to/server-render-a-page)** — a page that a search engine
54
56
  can read.
55
57
  - **[Authenticate](/how-to/authenticate-with-a-password)** — the management API.
56
- - **[SDK reference](/reference/sdk)**, **[Delivery API](/reference/delivery-api)**,
57
- **[PickedQL](/reference/pickedql)**.
58
+ - **[Build your first app](/tutorials/first-app)** — an app that adds a page to the
59
+ dashboard and a tool to workflows.
60
+ - **[SDK reference](/reference/sdk)** and **[Delivery API](/reference/delivery-api)**.
58
61
  - **[Why it works this way](/explanation/why-server-side-rendering)** — the design
59
62
  behind the SDK.