You are right, the Common module doesn't have the same email builder, which is odd. What you can do instead is pass the value being checked an input to the common module.
Eg:
If in the email builder you wanted something like:
Click the expression tab and we can see that is the same as:
If(IsSet(EmailAddressDomainPart(Email.Message.from)), Contains(EmailAddressDomainPart(Email.Message.from), "@BadDomain.com"), false)
So you can always create a string variable like EmailAddressDomainPart(Email.Message.from)
Then in the common module have an input string setup like so: (highly recommend you set a default value for edge cases)
Then just do a standard decision action with, Contains(Task.FromAddress, "@BadDomain") for example and away you go, or use a datatable lookup etc.
In the inbound flow when you call the the common module you will have that input
Let me know if you need any further guidance with it.
------------------------------
Anton Vroon
------------------------------
Original Message:
Sent: 02-29-2024 07:42
From: Dale Wylie
Subject: Blocking email domains using "Common Module Flow"
Hi all,
Hope someone could advise me. I was under the impression that I could build a common module flow which contained a "decision" action cell where I could write an expression or use the email builder function to block emails (i.e particular domains or specific addresses) - I would then call on this flow at the beginning of every one of our email flows which should disconnect unwanted emails, therefor creating a single place to add domains and such in the future if needed as opposed to entering into a decision in every flow we have.
I have had a look at this though and there doesn't seem to be the ability to use the email builder within the "Decision" cell in the common module flow? I have ensured that the Inbound Email Flow is selected for the compatible flow type.
Does anyone know if this is possible, or could someone please suggest how I achieve the same outcome at all?
Thanks in advance!Post
#Implementation
#PlatformAdministration
#Unsure/Other
------------------------------
Dale Wylie
Aggregate Industries UK Ltd
------------------------------