Power Automate Integration (Microsoft Flow)

Prev Next

Power Automate (formerly known as Microsoft Flow) allows you to connect your forms with hundreds of pre-built systems and activities.

You can implement multi-stage workflows where different logic or integrations are applied, depending on your form data. For example, you may want to pass some of your form data to SharePoint or Salesforce, save data to your database, or even send image data to Azure Blob Storage. Power Automate also offers the ability to add approvals to your submission flow.

Important Notes

  • To use the CivicPlus connector, a Power Automate license is required as well as an Office 365 subscription. You may already have a license with your Office 365 account, if not you can sign up for a trial or paid version from the Power Automate site.

  • If you do not have this integration enabled for your site, please contact your Account Manager.

  • The instructions in this article use the new Power Automate design. You can toggle the new design on or off in the top right corner of Power Automate.Power Automate Design Toggle.

Create Your Power Automate Key

  1. Sign in to your site

  2. Navigate to the Workspace menu and click Settings
    Navigation menu showing 'My Workspace' and 'Settings' options.

  3. Select IntegrationsAdvanced Tools option in the left-hand navigation menu with Integrations highlighted.

  4. Click Setup Integration on the Power Automate cardMailgun and Power Automate integration options with setup instructions highlighted.

  5. Adjust the Name as needed and click Create Power Automate KeyPower Automate integration setup with Mailgun, highlighting API key creation instructions.

  6. Copy your key Power Automate integration interface showing API key creation options and instructions.

    Note:

    If needed, add additional keys by entering a name and clicking Create Power Automate Key.


Create a Trigger

  1. Open the Power Automate site

  2. Navigate to the Connections tab and click New connection
    Power Automate interface showing option to create a new connection.

  3. Select the CivicPlus Transform connector in the list CivicPlus Transform connection details including publisher and type information.

  4. The first time you select the CivicPlus connector, you’ll be asked to enter the Display Name (this can be anything), as well as the API Key you copied above CivicPlus Transform interface showing fields for display name and API key entry.

  5. Enter a Label and select a FormParameters for triggering a form submission in CivicOptimize Productivity interface.

    Note:

    The label will help identify the flow, and selecting the form will ensure that the flow only runs when that form is submitted. If this is not set the flow will run when any form in the account is submitted.

  6. (Optional) Select a Trigger under Advanced parameters (After a user submits a form or After the submission has been approved)Dropdown menu showing form submission triggers for user actions in a web application.

    Note:

    This is applicable for forms that have approval flows.


Add an Action

  1. Open your trigger

  2. Click the plus sign to add a new stepWorkflow step indicating a trigger for form submission actions in automation.

  3. Search for CivicPlus Search bar for 'civicplus' with action options displayed below.

  4. Select Retrieve Form Submission Data to get the data your user has submitted CivicPlus action options with highlighted 'Retrieve Form Submission Data' feature.

    Note:

    This action will bring back an object containing both the form definition and the submission data, allowing you to build out your flow from there.

  5. Fill in the Form ID and Submission ID fields Form submission data retrieval interface with fields for Form Id and Submission Id.

    • Form ID: Search for and select Form ID

    • Submission ID: Search for and select Submission ID

  6. Select + New StepFlowchart showing steps to retrieve form submission data and add new steps.

  7. Within the True column, select Add an actionFlowchart illustrating a condition with true and false branches for form submission data.

  8. Search for and select Parse JSONUser interface showing the action to parse JSON in a data operation tool.

  9. Fill out the Content and Schema fieldsJSON schema displaying pet license total, taxes, total amount due, and payment method.

    Note:

    The Parse JSON action instructs Power Automate to take your data and turn it into dynamic values you can use in further flows. In order to parse the JSON value, you will need access to the form's JSON Schema.

    • Content: Search for Submission Data

    • Schema: Input your form’s JSON schema

      Note:

      If you make updates to your form, such as changing element labels, you will need to update the Schema in Power Automate.

  10. Build out your Flow for your specific use case. Examples:

    • Add a row into a table to send data to an Excel file on SharePoint (database)

    • Send an email (V2) to send an email(s) to specific individuals/groups, or even back to the form submitter if the form collected their email address

    • Create files on SharePoint or OneDrive from form attachments

  11. Click Save at the top of the page The interface shows a highlighted 'Save' button among other options in a toolbar.


Additional CivicPlus Actions

You can use Power Automate to capture and create files from Process Automation and Digital Services form submissions. Creating the files with Power Automate requires access to SharePoint or OneDrive. These Actions may be made after creating the Flow as detailed in the previous steps.

Form Submission Attachments

  1. Select + Add an actionInstruction to insert a new action after a condition in a workflow diagram.

  2. Search for and select Condition
    Interface showing action options with highlighted search and control elements for conditions.

  3. In the first field, click the lightning icon and select [files element name]: attachments
    Condition expression for T-shirt graphic upload in Power Automate interface.

  4. In the comparison operator dropdown, select is not equal to
    Condition expression for T-Shirt graphic upload with "is not equal to" selected in the comparison drop-down.

  5. In the Choose a value field, click the fx expression icon, type null, and click Add
    Condition expression setup for T-shirt graphic upload with string functions highlighted.

  6. Within the True column, select Add an action
    Flowchart illustrating a condition with true and false branches for decision making.

  7. Search for and select CivicPlus and click Retrieve Form Submission Attachment
    Search for CivicPlus actions, highlighting 'Retrieve Form Submission Attachment' option.

  8. Click the lightning bolt icon and select Form ID
    Form submission parameters showing required fields for Form ID and Attachment ID.

  9. Search for and select the result that matches [Files Element Name]: Attachment ID
    Form fields for pet rabies certificate attachment ID submission and related information.

    Note:

    After selecting the [files element name]: Attachment ID, Power Automate will nest the Retrieve Form Submission Attachment into an Apply to each action, because File elements allow more than one file to be attached, so Power Automate will retrieve (loop through) each file that was attached.

  10. Select Add an actionInstruction to insert a new action after a condition in a workflow diagram.

  11. Search for and select Create File for either SharePoint or OneDriveOptions to create files in OneDrive and SharePoint are displayed in the interface.

  12. Complete the fieldsParameters for creating and uploading a T-shirt graphic to SharePoint are displayed.

    • Folder Path: The unique path of the folder.

    • File Name: The file name must include the file’s extension. The simplest way to ensure this is to use the attachment’s filename as the only/last item in the File Name field.

    • File Content: Enter the content of the file.

Generate Form Submission PDF

  1. Select + Add an actionInstruction to insert a new action after a condition in a workflow diagram.

  2. Search for CivicPlus Transform and select Generate Form Submission PDFCivicPlus action options including Generate Form Submission PDF highlighted for selection.

  3. Complete the fields Form submission parameters including Form Id and Submission Id fields highlighted for clarity.

    • Form ID: Select Form ID

    • Submission ID: Select Submission ID

  4. Select Add an action Instruction to insert a new action after a condition in a workflow diagram.

  5. Select Create File for either SharePoint or OneDriveOptions to create files in OneDrive and SharePoint are displayed in the interface.

  6. Complete the fields Form submission parameters including site address, folder path, and file content details.


Resources