ÃÛ¶¹ÊÓƵ

Connect an Adaptive Form with ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate connect-adaptive-form-with-power-automate

You can configure an Adaptive Form to run a ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Cloud Flow on submission. The configured Adaptive Form sends captured data, attachments, and Document Of Record to Power Automate Cloud Flow for processing. It helps you build custom data capture experience while harnessing the power of ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate to build business logics around captured data and automate customer workflows.

Adaptive Forms editor provides the Invoke a ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate flow submit action to send adaptive forms data, attachments, and Document Of Record are sent to Power Automate Cloud Flow.

AEM as a Cloud Service offers various out of the box submit actions for handling form submissions. You can learn more about these options in the Adaptive Form Submit Action article.

Advantages

Here are a few examples of what you can do after integrating an Adaptive Form with ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate:

  • Use Adaptive Forms data in a Power Automate business processes
  • Use Power Automate to send captured data to more than 500 data sources or any publicly available API
  • Perform complex calculations on captured data
  • Save Adaptive Forms data to storage systems at a predefined schedule

Prerequisites

The following are required to connect an Adaptive Form with ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate:

  • ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Premium license.
  • ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® with the When an HTTP request is received trigger to accept Adaptive Form submit data.
  • An Experience Manager user with Forms Author and Forms Admin privileges
  • Account used to connect to ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate is owner of the Power Automate flow configured to receive data from Adaptive Form

Connect your Forms as a Cloud Service instance with ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate connect-forms-server-with-power-automate

Perform the following actions to connect your Forms as a Cloud Service instance with ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate:

Create ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Azure Active Directory Application ms-power-automate-application

  1. Log in to .

  2. Select Azure Active Directory from the left navigation.

  3. On the Default directory page, select App registrations from the left panel.

  4. On the App registrations page, click New Registrations.

  5. Specify Name, Supported account types, and Redirect URI on the page. In the Redirect URI, specify the following and click Save.

    • https://[Forms as a Cloud Service Server]/libs/fd/powerautomate/content/dataverse/config.html
    • https://[Forms as a Cloud Service Server]/libs/fd/powerautomate/content/flowservice/config.html

    Register a Azure Active Directory Application

    note note
    NOTE
    You can also specify additional Redirect URIs, if necessary, from the Authentication page.
    For supported account types, select single tenant, multiple tenants, or personal ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Account depending on your use case
  6. On the Authentication page, enable the following options, and click Save.

    • Access tokens (used for implicit flows)
    • ID tokens (used for implicit and hybrid flows)
  7. On the API permissions page, click Add a permission.

  8. Under ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® APIs, select the Power Automate, and select the following permissions.

    • Flows.Manage.All
    • Flows.Read.All
    • GCC permission (Optional if you want to connect to a GCC (Government Cloud Computing) tenant)
      Click Add permissions to save the permissions.
  9. On the API permissions page, click Add a permission. Select APIs my organization uses and search DataVerse and enable user_impersonation Click Add permissions.

  10. (Optional) On the Certificates & secrets page, click New client secret. On the Add a Client Secret screen, provide a description and time period for the secret to expire, and click Add. A secret string is generated.

  11. Keep a note of your organization-specific .

Create ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Dataverse Cloud Configuration microsoft-power-automate-dataverse-cloud-configuration

  1. On AEM Forms author instance, navigate to Tools hammer > General > Configuration Browser.

  2. On the Configuration Browser page, select Create.

  3. In the Create Configuration dialog, specify a Title for the configuration, enable Cloud Configurations, and select Create. It creates a configuration container to store Cloud Services. Ensure that the folder name does not contain any space.

  4. Navigate to Tools hammer > Cloud Services > ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Dataverse and open the configuration container you created in the previous step.

    note note
    NOTE
    When you create an Adaptive Form, specify the container name in the Configuration Container field.
  5. On the configuration page, select Create to create ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Flow Service configuration in AEM Forms.

  6. On the Configure Dataverse Service for ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate page, Specify the Client ID (also referred to as Application ID), Client Secret, OAuth URL and Dynamic Environment URL. Use the Client ID, Client Secret, OAuth URL, and Dynamic Environment URL of ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Azure Active Directory Application you created in the previous section. Use Endpoints option in ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Azure Active Directory application UI to find OAuth URL

    Use Endpoints option in Microsoft Power Automate application UI to find OAuth URL

  7. Select Connect . If asked, login to your ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Azure Account. Select Save.

Create ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Flow Service Cloud Configuration create-microsoft-power-automate-flow-cloud-configuration

  1. Navigate to Tools hammer > Cloud Services > ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Flow Service and open the configuration container you created in the previous section.

    note note
    NOTE
    When you create an Adaptive Form, specify the container name in the Configuration Container field.
  2. On the configuration page, select Create to create ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Flow Service configuration in AEM Forms.

  3. (Optional) Select the Connect to Microsoft GCC checkbox to connect to the GCC tenant.

    note note
    NOTE
    In case you want to connect to a GCC (Government Cloud Computing) tenant, select the GCC permission in Microsoft Azure Portal.

    Power Automate Cloud Configuration

  4. On the Configure Dataverse for ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate page, Specify the Client ID (also referred to as Application ID), Client Secret, OAuth URL and Dynamic Environment URL. Use the Client ID, Client Secret, OAuth URL, and Dynamics Environment ID. Use Endpoints option in ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Azure Active Directory application UI to find OAuth URL. Open the link and select My Flows use the ID listed in URL as Dynamics Environment ID.

  5. Select Connect. If asked, log in to your ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Azure Account. Select Save.

Publish both the ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Dataverse and ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Flow Service Cloud Configurations publish-microsoft-power-automate-dataverse-cloud-configuration

  1. Navigate to Tools hammer > Cloud Services > ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Dataverse and open the configuration container you created in the previous Create ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Dataverse Cloud Configuration section.
  2. Select the dataverse configuration and select Publish.
  3. On the Publish page, select All Configurations and select Publish. Publish both Power Automate Dataverse and Power Automate Flow Service Cloud Configurations.

Your Forms as a Cloud Service instance is now connected with ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate. You can now send Adaptive Forms data to a Power Automate flow.

Use the Invoke a ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate flow submit action to send data to a Power Automate Flow use-the-invoke-microsoft-power-automate-flow-submit-action

After you Connect your Forms as a Cloud Service instance with ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate, perform the following action to configure your adaptive form to send captured data to a ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® flow on form submission.

  1. Log in to your Author instance, select your Adaptive Form and click Properties.

  2. In the Configuration Container, browse and select the container created in section Create ²Ñ¾±³¦°ù´Ç²õ´Ç´Ú³Ù® Power Automate Dataverse Cloud Configuration, and select Save and Close.

  3. Open the Adaptive Form for editing and navigate to Submission section of the Adaptive Form Container properties.

  4. In the properties container, for Submit Actions select the Invoke a Power Automate flow option and select a Power Automate flow. Select the required flow and Adaptive Forms data is submitted to it on submission.

    Configure Submit Action

NOTE
Before submitting the Adaptive Form, ensure that the When an HTTP Request is received trigger with below JSON Schema is added to your Power Automate flow.

        {
            "type": "object",
            "properties": {
                "attachments": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "filename": {
                                "type": "string"
                            },
                            "data": {
                                "type": "string"
                            },
                            "contentType": {
                                "type": "string"
                            },
                            "size": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "filename",
                            "data",
                            "contentType",
                            "size"
                        ]
                    }
                },
                "templateId": {
                    "type": "string"
                },
                "templateType": {
                    "type": "string"
                },
                "data": {
                    "type": "string"
                },
                "document": {
                    "type": "object",
                    "properties": {
                        "filename": {
                            "type": "string"
                        },
                        "data": {
                            "type": "string"
                        },
                        "contentType": {
                            "type": "string"
                        },
                        "size": {
                            "type": "integer"
                        }
                    }
                }
            }
        }
recommendation-more-help
fbcff2a9-b6fe-4574-b04a-21e75df764ab