options
method that retrieves the necessary options from the third-party API, formats them, and sends them back in the response for the end user to select. Examples are listing Slack channels, Google Sheets, etc.
The payload for the configuration API call must contain the following fields:
external_user_id
: the ID of your user on your endid
: the component’s unique ID (aka key)prop_name
: the name of the prop you want to configureconfigured_props
: an object containing the props that have already been configured. The initial configuration call must contain the ID of the account (aka authProvisionId
) that your user has connected to the target app (see this section for more details on how to create these accounts).projectId
prop of that component:
configured_props
are written in camel case since they refer to the names of props as they appear in the component’s code, they are not attributes that the API itself consumes.prop_name
configured_props
object. Keep this object in your app’s local state, add a prop once you or the end user selects a value, and pass it to the configured_props
API param.refName
prop:
reloadProps
attribute set to true
in the component’s definition.
After configuring a dynamic prop, the set of subsequent props must be recomputed (or reloaded), which is possible using the following API call:
prop_name
field since the goal of this call is to reload and retrieve the new set of props, not to configure a specific one.
Using the Add Single Row action for Google Sheets as an example, the request payload would look like this:
sheetId
prop is dynamic, and so after configuring it, the set of props must be reloaded. The response will contain the new set of props and their definition, similar to when the component information was first retrieved. The response will also contain an ID that can be used to reference the new set of props in subsequent configuration calls. If this is ID is not provided, the set of props will be based on the definition of the component that was retrieved initially.
To illustrate, the response for the request above would look like this:
prop_name
attribute (because we’re not configuring any props at this point):
exports
: all the named exports produced by the action, like when calling $.export
in a Node.js component.os
: a list of observations produced by the action (e.g. logs, errors, etc).ret
: the return value of the action, if any.stash
property with file information.sql
prop is a specialized prop type used for interacting with SQL databases. It enables developers to build applications that can:
postgresql-execute-custom-query
snowflake-execute-sql-query
mysql-execute-raw-query
microsoft_sql_server-execute-raw-query
azure_sql-execute-raw-query
turso-execute-query
postgresql
in this example)sql
prop with the following structure:params
array. Different database systems use different placeholder syntax:
$1
, $2
, $3
, etc. for numbered parameters?
for positional parametersconfigureComponent
on the sql
prop to retrieve database schema information:
context.dbInfo
object containing detailed schema information for all tables in the database: