App Intents and Connections

Make your Apps more discoverable in the Designer with App Intents and Connections.

Use App Intents and Connections to give users more opportunities to find and launch your App in the designer. These features display links to your App in contextual locations like the ‘Element Settings’ panel, creating smoother and more relevant interactions when users are creating and editing elements on their sites.

App Intents make your App discoverable when users create or modify elements. By adding an Intent to your App’s webflow.json file, users will be prompted to use your App for managing element settings directly within their existing workflow. Adding an intent allows your App to stand out as a relevant tool in the Designer.

App Intents

Supported Elements

App Intents and connections currently supports the following elements: Image, FormForm, and FormWrapper.

How App Intents and Connections work

When your App is configured to use App Intents for a supported element, your App will appear in the “Connections” section in an element’s settings panel.

If a user has already installed your App to their site, but aren’t already using connections to manage their elements, they’ll see a “Connections” section in the element settings panel. If they click the ”+” button in this section, they’ll see your App listed in the “Connect an App” section.

Connect an App
App Intents

When your App launches from the element settings panel, your App will receive important context about the element that triggered the launch, which you can access using the getLaunchContext() method.

Use this context to show the most relevant interface for a user’s workflow.

We've configured the API Playground to use App Intents for the Image element. When the API Playground is launched from the Element Settings Panel, the App will show the launch context in an info box and preselect the API Category to 'Elements' and the API Method to `getAltText()` ,

App Connections establish links between supported elements and your App. Using the element.setAppConnection() method, you can create a direct connection that prompts users to manage that element’s settings through your App. For example, you can connect an image element to your App so users choose to manage assets and alt text in your App rather than managing the settings themselves.

App Connections

When your App creates a connection with an element:

  • Webflow adds a button in the element’s settings panel to launch your App
  • Webflow opens your App with context about the specific element

Your App knows exactly which element launched it and can instantly show the most relevant interface for a user’s workflow. Instead of dropping users at your App’s home screen, you can welcome them with the tools and settings they need for that specific element; creating a personalized entrance for every connected element.

App Connection Button

Try App Connections on Your Site

Explore App Connections firsthand. Download and run our example App on your site to see how it integrates directly into your workflow.

Setting up App Intents and Connections

In the steps below, we’ll walk through the following:

With the addition of App Intents and Connections, your webflow.json can now use two additional properties: appIntents and appConnections.

Adding App Intents

In webflow.json, add a new property called appIntents. Create an object with a key for each element type you’d like to support. Each key should have a value of an array of strings, where each string is a unique identifier for an App Intent.

As we improve support for more elements and intents, you’ll be able to add them to your App Intents list.

webflow.json
1{
2 "appIntents": {
3 "image": ["manage"],
4 "form": ["manage"]
5 }
6}

Once this is added to your webflow.json, your App will appear in the “Connections” section of the supported elements’ settings panels.

Adding App Connections

In webflow.json, add a new property called appConnections. Set it to an array of strings, where each string is a unique identifier for an App Connection.

webflow.json
1{
2 "appConnections": ["manageImageElement", "manageFormElement"]
3}

When your App launches from the element settings panel, Webflow will send information about how your App was launched back to your App. To get this information, you’ll need to listen for launch context from the Webflow Designer by calling the getLaunchContext() method.

When your App is launched from an App Intent, getLaunchContext() returns an object with the following structure:

1type LaunchContext = {
2 type: 'AppIntent';
3 value: {
4 image: 'manage'; // Will only be present if the App Intent is for managing images
5 form: 'manage'; // Will only be present if the App Intent is for managing forms
6 };
7};

It’s most appropriate to call getLaunchContext() on the main page of your App, such as the entry point of a React App.

1// Initialize state to store the launch context
2const [launchContext, setLaunchContext] = React.useState(null);
3
4React.useEffect(() => {
5 // Define async function to fetch launch context
6 async function onLoad() {
7
8 // Get context from Webflow Designer when App is launched
9 const context = await webflow.getLaunchContext();
10 setLaunchContext(context); // Update state with the received context
11
12 // Determine which page to show based on launch context
13 if (context?.type === 'AppIntent') {
14 if (context.value?.image === 'manage') {
15 navigate('/image-manager');
16 } else if (context.value?.form === 'manage') {
17 navigate('/form-manager');
18 } else {
19 navigate('/');
20 }
21 } else {
22 navigate('/');
23 }
24 }
25
26 // Call onLoad immediately when component mounts
27 onLoad();
28}, []); // Empty dependency array means this effect runs once on mount

Now that you’ve retrieved the launch context, you can access the details of the element that launched your App. From there, you can create an App Connection to the element so that users are prompted to use your App each time they open that element’s settings panel.

Since an element will always be selected in the Designer when accessing its settings, you can simply call the getSelectedElement() method to get the element that launched your App. Then you can create an App Connection to the element using the identifier you configured in webflow.json.

1// Initialize state to store the launch context and selected element
2const [launchContext, setLaunchContext] = React.useState(null);
3const [selectedElement, setSelectedElement] = React.useState(null);
4
5React.useEffect(() => {
6 // Define async function to fetch launch context and selected element
7 async function onLoad() {
8 // Get context from Webflow Designer when App is launched
9 const context = await webflow.getLaunchContext();
10 setLaunchContext(context); // Update state with the received context
11
12 // Get and set the selected element
13 const element = await webflow.getSelectedElement();
14 setSelectedElement(element);
15
16 // Set the App Connection based on element type and determine which page to show your user
17 if (context?.type === 'AppIntent') {
18 if (context.value?.image === 'manage') {
19 await element.setAppConnection('manageImageElement');
20 navigate('/image-manager');
21 } else if (context.value?.form === 'manage') {
22 await element.setAppConnection('manageFormElement');
23 navigate('/form-manager');
24 } else {
25 navigate('/');
26 }
27 } else {
28 navigate('/');
29 }
30 }
31
32 // Call onLoad immediately when component mounts
33 onLoad();
34}, []); // Empty dependency array means this effect runs once on mount

As with App Intents, when your App is launched from an App Connection, Webflow will send information about how your App was launched back to your App. To get this information, you’ll need to listen for launch context from the Webflow Designer by calling the getLaunchContext() method.

When launched from an App Connection, the LaunchContext object will have the following structure:

1type LaunchContext = {
2 type: 'AppConnection';
3 value: string; // The identifier for the App Connection
4};

Let’s reconfigure our App to listen for launch context from either an App Intent or App Connection.

1// Initialize state to store the launch context and selected element
2const [launchContext, setLaunchContext] = React.useState(null);
3const [selectedElement, setSelectedElement] = React.useState(null);
4
5React.useEffect(() => {
6 // Define async function to fetch launch context and selected element
7 async function onLoad() {
8 // Get context from Webflow Designer when App is launched
9 const context = await webflow.getLaunchContext();
10 setLaunchContext(context); // Update state with the received context
11
12 // Get and set the selected element
13 const element = await webflow.getSelectedElement();
14 setSelectedElement(element);
15
16 // Handle different launch contexts
17 if (context?.type === 'AppIntent') {
18 // Handle App Intent launches
19 if (context.value?.image === 'manage') {
20 await element.setAppConnection('manageImageElement');
21 navigate('/image-manager');
22 } else if (context.value?.form === 'manage') {
23 await element.setAppConnection('manageFormElement');
24 navigate('/form-manager');
25 } else {
26 navigate('/');
27 }
28 } else if (context?.type === 'AppConnection') {
29 // Handle App Connection launches
30 switch (context.value) {
31 case 'manageImageElement':
32 navigate('/image-manager');
33 break;
34 case 'manageFormElement':
35 navigate('/form-manager');
36 break;
37 default:
38 navigate('/');
39 }
40 } else {
41 // Handle direct launches (not from Intent or Connection)
42 navigate('/');
43 }
44 }
45
46 // Call onLoad immediately when component mounts
47 onLoad();
48}, []); // Empty dependency array means this effect runs once on mount

If your App manages multiple resources, you may want to organize and list them in your App for users to reference. You can retrieve a list of all App Connections for a given element using the getAppConnections() method on an individual element.

To do this, let’s get a list of all elements on the page and then retrieve the App Connections for each element.

1async function findConnectedElements() {
2 // Get all elements on the page
3 const elements = await webflow.getAllElements();
4 const connectedElements = [];
5
6 // Iterate through elements and check for connections
7 for (const element of elements) {
8 try {
9 // Check if element supports App Connections
10 if (element.getAppConnections) {
11 const connections = await element.getAppConnections();
12
13 // If element has connections, store it with relevant info
14 if (connections && connections.length > 0) {
15 connectedElements.push({
16 connections,
17 type: element.type,
18 id: element.id
19 });
20 }
21 }
22 } catch (error) {
23 console.error(`Error checking connections for element: ${element.id}`, error);
24 }
25 }
26
27 return connectedElements;
28}
Built with