Skip to main content

Part 2: Integrating Unibuddy with your CRM using Power Automate — Checking, creating and updating prospects in your CRM

In this article, you'll decide what Power Automate should do with that data when it arrives.

Written by Cindy

Before you start:

You should already have:

  • Created your Power Automate flow.

  • Added When an HTTP request is received.

  • Added Parse JSON.

  • Added the Unibuddy data schema to Parse JSON.

  • Saved your flow.

  • Copied your HTTP POST URL.

  • Sent your HTTP POST URL and required date format to Unibuddy Support.

You don't need to create a new Power Automate flow for Part 2. You'll continue building the same flow you created in Part 1.

📝 Note: This guide uses Microsoft Dynamics / Dataverse as an example, but Power Automate can also be used with other compatible CRM systems.

The actions and terminology you see may differ depending on your CRM. If you're using another CRM, use the equivalent search, create and update actions available through your CRM's Power Automate connector.


What you'll do across this guide series

The full setup is split into three stages:

Part 1 — Receive Unibuddy data in Power Automate
Create your flow, configure the HTTP trigger, add Parse JSON and the Unibuddy data schema, and send your HTTP POST URL to Unibuddy.

Part 2 — Check, create and update prospects in your CRM ← You are here
Configure Power Automate to identify existing prospects and determine whether to update an existing CRM record or create a new one.

Part 3 — Map Unibuddy data to your CRM
Choose which Unibuddy data you want to store and map it to the appropriate fields in your CRM.

Part 4 — Test your integration and go live
Test the complete integration, verify the data received by your CRM, troubleshoot any issues and work with Unibuddy to move your integration to your live university environment.

This article covers Part 2.


Step 1: Open the flow you created in Part 1

Open the flow you created in Part 1.

You should already have:

When an HTTP request is received → Parse JSON

Don't create a new flow. You'll continue building the same flow.


Step 2: Add the Data variable

First, we'll store the data processed by Parse JSON in a Power Automate variable.

  1. Under Parse JSON, select +.

  2. Select Add an action.

  3. Search for Initialize variable and select it.

  4. In Name, enter: Data

  5. For Type, select: Object

  6. Select the Value field.

  7. From the available data, select the Body output from your Parse JSON action.

  8. Save your flow.

📝 Why are we doing this?
The Data variable stores the prospect information processed by Parse JSON. This allows us to reference individual Unibuddy fields in the mapping steps below using expressions such as variables('Data')?['first_name'].


Step 3: Decide how your CRM will identify an existing prospect

Before your flow creates a new CRM record, it needs to check whether that prospect has already been added to your CRM.

This is important because the same prospect may be sent to your Power Automate flow again when their information is updated. If your flow creates a new record every time, this could result in duplicate prospect records in your CRM.

Your flow therefore needs to follow this logic:

Prospect received from Unibuddy

Look for an existing prospect

Does a matching prospect already exist?

Yes → Update the existing CRM record

No → Create a new CRM record


How does Power Automate know it's the same prospect?

Unibuddy provides an id for each prospect.

In the Power Automate setup we're using in this guide, you can access that ID using:

variables('Data')?['id']

This gives you a value that can be used to identify the Unibuddy prospect when your flow processes their data.

To determine whether that prospect already has a corresponding record in your CRM, your flow needs a way to associate the Unibuddy ID with the appropriate CRM record.

There are two ways this could be handled depending on your setup:

  • Store the Unibuddy ID in your CRM: If your CRM has a field for the Unibuddy ID, your flow can search your CRM for a record containing that ID.

  • Keep a separate ID mapping: You can maintain a separate record showing which Unibuddy ID belongs to which CRM ID. The existing Unibuddy Power Automate setup uses a Google Sheet as an example of this approach.

For example:

Unibuddy ID

CRM ID

abc123

CRM-456789

This tells Power Automate that Unibuddy prospect abc123 corresponds to CRM record CRM-456789.

When that prospect is sent through the integration again, the flow can use this relationship to find the existing CRM record and update it instead of creating another one.

📝 Note: Google Sheets is used as an example in the existing Unibuddy setup. Depending on your CRM and technical setup, you may use another method to store or look up this relationship.


What happens when the prospect is new?

If no matching Unibuddy ID is found, Power Automate can create a new CRM record.

Once that record has been created, your flow needs to retain the relationship between:

Unibuddy ID ↔ CRM ID

so that the same CRM record can be found the next time Unibuddy sends information about that prospect.

We'll configure this lookup and the Create / Update paths in the next steps.


Step 4: Set up your Unibuddy ID lookup

Now that you've decided how existing prospects will be identified, you need to configure Power Automate to check whether the incoming Unibuddy ID already exists in your ID mapping.

In this example, we're using the same Google Sheets approach as the existing Unibuddy setup.

Your Google Sheet should contain:

UnibuddyId

CrmId

abc123

CRM-456789

The UnibuddyId identifies the prospect in Unibuddy, while the CrmId identifies the corresponding record in your CRM.

Add the Google Sheets lookup:

  1. Return to the Power Automate flow you've been building.

  2. Under Initialize variable, select + New Step to add another step.

  3. Search for Google Sheets.

  4. Select Get Rows.

  5. If prompted, sign in to the Google account containing your mapping spreadsheet.

  6. Select the spreadsheet containing your UnibuddyId and CrmId columns.

  7. Select the relevant worksheet.

Next, we'll add a Condition to perform that comparison.

Note: This guide uses Google Sheets because this is the approach used in the existing Unibuddy Power Automate setup. If your organisation uses another method to store the relationship between Unibuddy and CRM IDs, the actions required may differ.

Your CRM administrator or technical team can help you adapt these steps where needed.


Step 5: Check whether the Unibuddy ID already exists

Now that Power Automate can retrieve the existing ID mappings, you need to compare them with the ID of the prospect received from Unibuddy.

We'll do this by adding a Condition.

Add the Condition

  1. Select + New Step to add another step.

  2. Search for Condition.

  3. Select Condition (under "Actions").

  4. In the first value of the Condition, select UnibuddyId from the Google Sheets data.

5. You may notice an "Apply to each" step appear automatically.

This is expected. Get Rows can return multiple rows from your Google Sheet, so when you select UnibuddyId from those results, Power Automate automatically adds Apply to each so it can check each returned row.

6. Click on Condition again to continue setting up the workflow.


7. For the condition, select: is equal to
8. Select the second Choose a value field.
9. In the Dynamic content panel, scroll until you find When a HTTP request is received.


10. Under When a HTTP request is received, select id.

What have I just done?

You've configured Power Automate to compare the UnibuddyId retrieved from your Google Sheet with the id of the prospect received from Unibuddy.

Power Automate now has the information it needs to determine which path to follow when processing the prospect.

In the next step, we'll configure what should happen when the IDs match.


Step 6: Configure the Yes path — update an existing prospect

We'll start with the Yes branch.

This branch runs when your lookup finds an existing relationship between the incoming Unibuddy ID and a CRM record.

Power Automate can use the corresponding CRM ID to identify which record needs to be updated.

If you're using Microsoft Dynamics / Dataverse

  1. In the If Yes branch, select Add an action.

  2. Search for Microsoft Dataverse (or the connector for your CRM).

    PLEASE NOTE: Dynamics 365 connector is no longer available for selection so you would need to select the alternative which is Microsoft Dataverse connector

  3. Select the appropriate action for updating a row.

  4. Select the table where your prospect or lead records are stored.

  5. For the record/row identifier, use the CRM ID returned by your lookup.

  6. You can then begin mapping the Unibuddy information you want to update.

If you're using another CRM
Search for the equivalent "update a row/record" action for your system. The principle is the same: use the CRM ID returned by your lookup to identify which record to update.


Step 7: Configure the No path — create a new prospect

Now configure what should happen when no matching Unibuddy ID is found.

In this case, Power Automate needs to create a new record in your CRM.

If you're using Microsoft Dynamics / Dataverse

  1. In the If No branch, select Add an action.

  2. Search for Microsoft Dataverse (or the connector for your CRM).

  3. Select the action for creating a new record.

  4. Select the appropriate record type, table or object for your prospects.

  5. Map the Unibuddy data from the incoming request to the corresponding fields in your CRM.

Important: Your CRM may require certain fields before a new record can be created. These requirements depend on your CRM configuration. If you're unsure which fields are mandatory, check with your CRM administrator.

Once the new prospect has been created, your CRM returns an ID for that new record. We need to store that CRM ID alongside the prospect's Unibuddy ID. This allows your flow to recognise the prospect if Unibuddy sends their information again in the future.


6. Under the Create person action, select Add an action.


7. Search for Google Sheets.


8. Select Insert row.


9. Select the same spreadsheet and worksheet you used earlier to store your ID mappings.


10. In the UnibuddyId column, select the incoming prospect's id from When a HTTP request is received.

11. In the CRMId column, select the ID returned by your Create record action.

📝 Note: This example uses Google Sheets because that's where the ID mapping is being stored in this setup. If you're using another storage method, select the appropriate action for your setup instead.

Did this answer your question?