Add to a Marketing List from a Journey in Customer Insights

Marketing lists will never die and sometimes you just need a static list of contact/leads. In this post I will show you how we can use the new ‘Create a record’ journey action, and a simple flow. To trigger a contact or lead in a journey to be added to a marketing list, with full power to the journey builder to decide which list and when.

Create a new table ‘Marketing List Request’

  • Static Marketing List - Lookup (Marketing List)

  • Request Type - Choice (Add, Remove)

  • Lead - Lookup (Lead)

  • Contact - Lookup (Contact)

Update the security role ‘Create Record Role Extensible’

Add the below permissions

  • Full create/read/write/append permissions for the new table ‘Marketing List Request‘ you created

  • Read/Append permissions for the table ‘Marketing List‘

Create a flow to process the ‘Marketing List Request’

Step 1: Trigger - Marketing List Request Created

The flow starts when a new record is added to the Marketing List Requests table. The trigger runs at the organization level whenever a request is submitted.

Dataverse - When a row is added, modified or deleted
Change type: Added
Table name: Marketing List Requests
Scope: Organization

Step 2: Retrieve Request Details

  1. The flow retrieves the Marketing List Request record and expands related information required for subsequent processing:

    • Marketing List

    • Lead

    • Contact

    • List Type

    • List Source (Created From)

    Dataverse - Get a row by ID (GetRequestExpand)
    Table name: Marketing List Requests
    Row ID: triggerOutputs()?['body/amey_marketinglistrequestid']
    Expand Query: amey_MarketingList($select=createdfromcode,type,listname),amey_Lead($select=leadid,subject),amey_Contact($select=contactid,fullname)

Step 3: Update Request Name

The request record is updated with a meaningful name combining Contact or Lead name + Marketing List name. This makes requests easier to identify and audit.

Dataverse - Update a row (SetName)
Table name: Marketing List Requests
Row ID: @{triggerOutputs()?['body/amey_marketinglistrequestid']}
Name: @{outputs('GetRequestExpand')?['body/_amey_lead_value@OData.Community.Display.V1.FormattedValue']}@{outputs('GetRequestExpand')?['body/_amey_contact_value@OData.Community.Display.V1.FormattedValue']} - @{outputs('GetRequestExpand')?['body/amey_marketinglist/listname']}

Step 4: Validate Marketing List

The flow checks whether the selected Marketing List is eligible for processing. The following conditions must be met:

  • Marketing List Target is Lead or Contact

  • List Type is Static.

If all conditions are met, processing continues. If any condition fails, the flow is immediately terminated and no updates are made.

Control - Condition (List Eligible)
outputs('GetRequestExpand')?['body/amey_marketinglist/createdfromcode'] is equal to 2 OR outputs('GetRequestExpand')?['body/amey_marketinglist/createdfromcode'] is equal to 4
AND outputs('GetRequestExpand')?['body/amey_marketinglist/type'] is equal to false

Step 4a: Marketing List Not Eligible

If the above conditions are not met, the flow run is cancelled. You cannot add contacts/leads to dynamic marketing lists.

Control - Terminate (Terminate)
Step 4: Validate Marketing List (List Eligible)

Step 5: Determine Relationship Configuration

The flow prepares relationship metadata used later to associate or disassociate records from the Marketing List. Including the relationship pathway and the oData reference.

Data Operation - Compose (ActionInputs)
Inputs:

{
  "LeadRelationship": "listlead_association",
  "LeadOdata": "@{outputs('GetRequestExpand')?['body/amey_lead/@odata.id']}",
  "ContactRelationship": "listcontact_association",
  "ContactOdata": "@{outputs('GetRequestExpand')?['body/amey_contact/@odata.id']}"
}

Step 6: Identify Target Record Type

The flow determines whether the Marketing List is a Lead or Contact based marketing List. This value is converted to lowercase and used to dynamically select the correct relationship during processing.

Data Operation - Compose (ListTarget)
Inputs: toLower(outputs('GetRequestExpand')?['body/amey_marketinglist/createdfromcode@OData.Community.Display.V1.FormattedValue'])

Step 7: Check Request Type - Add

The flow evaluates the Request Type field, if Request Type = 1 (Add)

Control - Condition (Add)
triggerOutputs()?['body/amey_requesttype'] is equal to 1

If true, the request is processed as an Add operation.

Step 7a: Add to Marketing List

The flow associates the Lead or Contact with the selected Marketing List using the appropriate relationship. Member is added to the Marketing List.

Dataverse - Relate rows (AddToList)
Table name: Marketing Lists
Row ID: outputs('GetRequestExpand')?['body/_amey_marketinglist_value']
Relationship: outputs('ActionInputs')?[concat(outputs('ListTarget'),'Relationship')]
Relate with: outputs('ActionInputs')?[concat(outputs('ListTarget'),'Odata')]

Step 8: Check Request Type - Remove

The flow evaluates the Request Type field, if Request Type = 2 (Remove)

Control - Condition (Remove)
triggerOutputs()?['body/amey_requesttype'] is equal to 2

If true, the request is processed as an Remove operation.

Step 8a: Remove from Marketing List (RemoveFromList)

The flow disassociates the Lead or Contact with the selected Marketing List using the appropriate relationship. Member is removed from the Marketing List.

Dataverse - Unrelate rows (RemoveFromList)
Table name: Marketing Lists
Row ID: outputs('GetRequestExpand')?['body/_amey_marketinglist_value']
Relationship: outputs('ActionInputs')?[concat(outputs('ListTarget'),'Relationship')]
Relate with: outputs('ActionInputs')?[concat(outputs('ListTarget'),'Odata')]

Step 9: Deactivate Request

After a successful removal, the Marketing List Request record is updated to indicate the request has been processed and prevents further action.

Dataverse - Update a row (Deactivate)
Table name: Marketing List Requests
Row ID: triggerOutputs()?['body/amey_marketinglistrequestid']
Status: Inactive
Status Reason: Inactive

Create a record from a journey - to update a marketing list

Once you have the table/flow set up - you can use the action from any journey and any time. Ass the action ‘Create a record’.

Note: you may need to enable the ‘Record creation’ feature to see this option.

Look for the record type ‘Marketing List Request’ (or whatever you named the table above)

Map the values for Request Type, Static Marketing List and Lead/Contact.

Request type is a static value - Add or Remove

Static Marketing list is a static value, and should be a static marketing list.

Ensure you add either Lead or Contact under the ‘More information’ section. You can use the Audience lead/contact here.

Marketing lists will never die

And that's it! Your journeys can now add people to a marketing list, or take them off one, without anyone having to update the list by hand. The journey only creates a Marketing List Request record, and one Power Automate flow handles the rest. That means you can reuse the same pattern across as many journeys and lists as you like. It also links real-time journeys to anything that still relies on marketing lists.

Next
Next

Sync Text Message Replies STOP and START with Contact Point Consent in Customer Insights - Journeys