Connect an Adaptive Form with Microsoft® Power Automate connect-adaptive-form-with-power-automate
You can configure an Adaptive Form to run a Microsoft® 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 Microsoft® Power Automate to build business logics around captured data and automate customer workflows.
Adaptive Forms editor provides the Invoke a Microsoft® 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 Microsoft® 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 Microsoft® Power Automate:
- Microsoft® Power Automate Premium license.
- Microsoft® Power Automate flow 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 Microsoft® 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 Microsoft® Power Automate connect-forms-server-with-power-automate
Perform the following actions to connect your Forms as a Cloud Service instance with Microsoft® Power Automate:
Create Microsoft® Azure Active Directory Application ms-power-automate-application
-
Log in to Azure Portal.
-
Select Azure Active Directory from the left navigation.
-
On the Default directory page, select App registrations from the left panel.
-
On the App registrations page, click New Registrations.
-
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
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 Microsoft® Account depending on your use case -
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)
-
On the API permissions page, click
Add a permission
. -
Under Microsoft® 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)
ClickAdd permissions
to save the permissions.
-
On the API permissions page, click
Add a permission
. Select APIs my organization uses and searchDataVerse
and enableuser_impersonation
ClickAdd
permissions. -
(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.
-
Keep a note of your organization-specific Dynamics environment URL.
Create Microsoft® Power Automate Dataverse Cloud Configuration microsoft-power-automate-dataverse-cloud-configuration
-
On AEM Forms author instance, navigate to Tools > General > Configuration Browser.
-
On the Configuration Browser page, select Create.
-
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.
-
Navigate to Tools > Cloud Services > Microsoft® 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. -
On the configuration page, select Create to create Microsoft® Power Automate Flow Service configuration in AEM Forms.
-
On the Configure Dataverse Service for Microsoft® 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 Microsoft® Azure Active Directory Application you created in the previous section. Use Endpoints option in Microsoft® Azure Active Directory application UI to find OAuth URL
-
Select Connect . If asked, login to your Microsoft® Azure Account. Select Save.
Create Microsoft® Power Automate Flow Service Cloud Configuration create-microsoft-power-automate-flow-cloud-configuration
-
Navigate to Tools > Cloud Services > Microsoft® 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. -
On the configuration page, select Create to create Microsoft® Power Automate Flow Service configuration in AEM Forms.
-
(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. -
On the Configure Dataverse for Microsoft® 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 Microsoft® Azure Active Directory application UI to find OAuth URL. Open the My flows link and select My Flows use the ID listed in URL as Dynamics Environment ID.
-
Select Connect. If asked, log in to your Microsoft® Azure Account. Select Save.
Publish both the Microsoft® Power Automate Dataverse and Microsoft® Power Automate Flow Service Cloud Configurations publish-microsoft-power-automate-dataverse-cloud-configuration
- Navigate to Tools > Cloud Services > Microsoft® Power Automate Dataverse and open the configuration container you created in the previous Create Microsoft® Power Automate Dataverse Cloud Configuration section.
- Select the
dataverse
configuration and select Publish. - 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 Microsoft® Power Automate. You can now send Adaptive Forms data to a Power Automate flow.
Use the Invoke a Microsoft® 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 Microsoft® Power Automate, perform the following action to configure your adaptive form to send captured data to a Microsoft® flow on form submission.
-
Log in to your Author instance, select your Adaptive Form and click Properties.
-
In the Configuration Container, browse and select the container created in section Create Microsoft® Power Automate Dataverse Cloud Configuration, and select Save and Close.
-
Open the Adaptive Form for editing and navigate to Submission section of the Adaptive Form Container properties.
-
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.
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"
}
}
}
}
}
Related Articles
- Send email
- Submit to SharePoint
- Submit using Form Data Model
- Submit to Azure Blob Storage
- Submit to REST endpoint
- Submit to OneDrive
- Invoke an AEM Workflow
- Submit to Power Automate
- Submit to Workfront Fusion
- Connect Adaptive Form to Salesforce application
- Connect an Adaptive Form to Microsoft® Dynamics OData
- Connect an Adaptive Form to Adobe Marketo Engage
- Create custom submit action