Connection Templates
A Connection Template allows you to pre-fill a connection's input fields with default values. A template can be referenced by an integration you build, or by an integration your customers build using embedded workflow designer. Connection templates are useful for a few reasons:
- If several of your integrations require the same connection input fields (for example, an OAuth 2.0 client ID and secret), you can create a template that contains those fields and reference it in each integration.
- If you want to provide a template for your customers to use in their own integrations, you can create a template and share it with them. They can then reference the template in their own integrations, but will not be able to view or change the template's input fields (so, they can't access your client secret).
- If you store your integrations' YAML definitions in source control, your YAML will be cleaner if you reference a template instead of including the connection's input fields directly in the YAML. By referencing a template that contains a client ID and client secret, you can avoid committing sensitive information to source control.
Creating a connection template
To create a connection template, first click on your organization's name in the bottom left corner of the screen. Then, open the Connection Templates tab.
Click +Add Connection Template to create a new connection template.
Give your template a name, select the component that the template is for, and then add input fields that you would like to pre-fill to the template. Fields that you omit will be configurable by an integration builder (either an organization member or a customer using embedded designer).
Referencing a connection template in an integration
- Low-Code
- Code-Native
To reference a connection template in an integration, add a new connection to the integration. Then, select the template you created from the Connection Template dropdown menu.
You will now only see fields that were not included in the template.
Connection templates can be used if you reference an existing component's connection in your code-native integration.
You can do this by adding a template
property to your connection reference.
connectionConfigVar({
stableKey: "my-salesforce-connection",
dataType: "connection",
connection: {
component: "salesforce",
key: "oauth2",
values: {},
template: "My Salesforce Connection",
},
});
A connection template's input values can be updated until a version of an integration that uses the template has been published. If an integration that uses the template has been published, the template's input values cannot be updated.
To update a connection template's input values, create a new connection template with your updated values and update your integration to reference the new connection template.
Your deployed instances (perhaps on v10
of your integration) will continue to reference the old connection template, but new instances (perhaps on v11
of your integration) will reference the new connection template and its values.