This article explains how to set up Power Automate to be used with OnePlan.
Note
This article does not include instructions on how to create flows in Power Automate. Refer to the documentation from Microsoft for instructions to create flows.
Important Information
Before you begin setting up the OnePlan Connector in Power Automate, there are a couple of items that you need to know:
- Your tenant administrator needs to approve OnePlan integrations for your tenant if they have not already done so. To approve integrations, go to the OnePlan configuration > Integrations. Below the Authentication Key section is a link the tenant admin can follow to make their approvals.
- The person setting up the integration needs Owner permissions for OnePlan.
- The person setting up this integration needs a Power Automate Premium license.
- Keep both OnePlan and Power Automate open in separate tabs in your browser throughout the entire setup process.
Download JSON File
Click here to download the JSON file.
You can also fine the attached JSON file at the bottom of this article.
-
Log in to Power Automate from Microsoft 365.
-
Select Custom connectors from the left navigation bar.
Note
If Custom connectors is not an option in your navigation bar, click Discover, locate Custom connectors from the list of options, and click the Pin icon to add it to your navigation bar.
-
Open the New custom connector menu. Select Import an OpenAPI file. The Create a custom connector form will open.
-
Enter "OnePlan" into the Connector name field.
-
Click Import. Navigate to the saved the JSON file on your computer using the file browser. Then click Open.
-
Click Continue.
After the JSON file is imported into Power Automate, you must finish setting up the OnePlan connector. Once you click Continue, you will be taken to the connector settings.
-
In the General tab, do not input or update any content. Click Security.
Note
The Host URL can be updated for different OnePlan URLs. For example, eu.oneplan.ai.
-
In the Security tab, do not input or update any content. Click Definition.
Note
Editing the fields in Security will break your connector. Do not edit.
-
In the Definition tab, do not input or update any content. Click AI Plugin (Preview).
- In the AI Plugin (Preview) tab, do not input or update any content. Click Code.
-
In the Code tab, do not input or update any content. Click Test.
-
In the Test tab, click Create connector. Once the connector is created, the Test Operation and Operations panels will open. Leave this window open for the next steps.
Note
For these steps, you must have OnePlan Admin pages and Power Automate open in separate tabs in your browser.
- Go to your OnePlan group and click the gear icon to access the OnePlan Configuration.
- Go to Integrations.
- Click Add Key to create a new authentication key. The Add Key form will open.
- Enter the name for the key. Copy the Key Name and save it for later use. Then click Add.
- Copy the new Authentication Key and save it for later use.
Note
The authentication key will be hidden once you navigate away from the page. Once hidden, you cannot retrieve the key again.
-
Return to the Power Automate tab from step 6 of Set Up the Connector In Power Automate.
-
In the Test operation section, in the Connections panel, click New Connection.
-
In the Username field, enter the Key Name you saved from step 4. In the Password field, enter the Authentication Key you saved from step 5. Then click Create connection.
-
Click the Refresh icon in the Connections panel. The Selected connection field will populate.
For this procedure, have OnePlan and Power Automate open in separate tabs in your browser.
-
In OnePlan, go to a project or plan of your choice.
-
Click on the user profile. Click Share With. Locate and select the plan id in the Shareable URL. The id is at the end of the URL following
PlanId=
. Copy the id. -
Go to Power Automate. Then paste the plan id you copied in step 2 into the id field within the Operations section.
-
Use the GetPlan operation to test the connection. Select GetPlan from the Operations list. Then click Test operation. The test is successful if you receive a response and a Status (200).
Create a Flow in Power Automate
Finally, you need to create a test flow in Power Automate to confirm that your configuration is working properly.
-
In Power Automate, go to My Flows.
-
Select New Flow > Instant cloud flow.
The Build an instant cloud flow window will open. Click Skip. -
In the next window, select Add a trigger and search for "OnePlan" in the search bar. Select When a Plan Gets Updated from the search results.
-
Click the + icon > Add an action. The Add an action form will open. Search for "OnePlan" in the search bar. Select Loads a plan and returns built in and custom fields by Plan ID from the results.
-
Click into the Id field. Click on the lightning bolt icon, and select Id from the drop-down.
-
Enter a name for the new flow in the field in the top left of the window. Copy the flow name. Then click Save.
-
Go to OnePlan. Go to the Admin pages > Integration. There should be a new item in Events. If there is not a new item in Events, try refreshing the page.
-
Click the Edit icon next to the new event item. The Edit Event form will open. Update the Edit Event form.
-
In the Strategy field, paste the flow name from step 7.
-
Select the Update from the Triggers drop-down.
Then click Save.
-
-
Go to Power Automate.
-
Click Test > Manually > Test. The flow test will begin. But you need to make an update to your plan for the trigger to fire.
-
Go to OnePlan. Go to the plan you selected in Test the connection. Make a change to any plan field on the Details page, such as the Description field.
Note
You can update any plan-level field in the plan to test out the flow.
-
Confirm that the event functions.
-
Go to OnePlan Admin > Integration > Events. Click the View Log icon next to the appropriate event. There should be a new Success entry in the log.
-
Go to your flow in Power Automate. There should be a message stating "Your flow ran successfully."
-
Triggers
When a Step Changes: Triggers when a Process Step Changes.
When a Plan Gets Updated: Triggers when a Plan Gets Updated.
When a Plan is added: Triggers when a new Plan is added.
Actions
Create a New Plan: Creates a new Plan.
Update a Plan by Plan Id: Updates the Plan Fields by Plan Id.
Get Plan by Plan Id: Returns built in and custom fields by Plan Id.
Add/Update Integration to Plan: Adds or Updates Plan Integration Information.
Lookup Resource Id: Return a Resource Id using Email and Name.
Get Resource By Id: Returns built in and custom Resource fields by Resource Id.
Get Plan Type Id: Return the Plan Type Id by Plan Type Name.
Get Plan Id by Integration Information: Gets Plan Id of the integrated plan based on Flow ID and external Item Id.
Update Process Step by Plan Id: Updates the Plans Process Step by Plan Id.
Approve a Process Step by Plan Id: Approves a process step for a plan.