Closed manuelap-msft closed 2 years ago
Current thinking is to have the starter data filled similar to how we fill data in IB, with a flow. It can be a recurrent flow and only update the text if its currently empty. This would allow us to add new records / rows over time as emails change.
Q: Should we have one table per solution so that we dont add dependencies back to Core from things like IB that dont currently have dependencies on Core?
This would be awesome!
I've done something similar for a client recently (nothing to do with COE) using a custom table for email/letter templates. It works well.
Inserting dynamic data is a pain with Power Automate as you end up with a huge set of nested Replace statements. Quite nasty. I am interested to see how you would handle this.
Happy to help out and share learnings if your are interested.
We've just had this done for us as part of a bigger CoE setup engagement, and it works as you described it. Think it would definitely be worthwhile to introduce this generally.
Hi @Jenefer-Monroe !
The Tables should be tied to the solutions and one should be fine even if the choice for use is in Teams. The bigger issue will be the format of the content and then how to potentially do Multiple Languages. So many ways to do this whether the content is in the table itself OR the table has a pointer to the content (in a list) OR even the "doc" in dataverse. Did you have a plan here already or are you looking for that?
Here is my current plan of action:
Column Descriptions
Example row in the table
For variables, we are just going to have that embedded in the text as shown here from the example above.
<li><a href="@{parameters('Community URL')}">Our Power Platform Community</a></li>
This allows the flow to remain simple, and just re-uses the products concept of dynamic data embedded in the text.
Yes this would be a big deal. I was just updating our Compliance Detail flow and thinking about managing those layers on updates. It would also be nice to have a chance to decide if you want this to be an email or post a card for the user in Teams.
As a stretch goal, I am considering having all the emails sent to a helper flow which will send the email. It could then be augmented to be teams in a single location. But I am not certain if we can do that as part of this ask. If not, you can add it as a separate ask once we release.
@Jenefer-Monroe I was thinking the same thing when updating the emails about the helper flow. Looking forward to seeing what you do.
Considering also adding a Sent-On-Behalf of column. Though would need to make it clear how to configure this to folks so its not a big ticket generator. Would this be of interest for folks?
So far so good on the plan. Everything making sense so far. A couple of observations:
Unfortunately the technique for variables described above does not seem to work.
As an example, this stored in a multi-line text field in Dataverse:
Some of the Sync Flows in the CoE Starter Kit have failed. See below and navigate to the Flow Instance URL to find out more details: @{outputs('Compose_HTML_Table')}
Then pulled in to body of the email does not evaluate the variable into the html table, it just writes out as text
If anyone here knows how to force Power Automate to evaluate variable again, please let me know. I have a few things to try yet, otherwise I'll just restructure all the emails to have the variables present at the end.
This appears to be the case of the Flow evaluating the variable before it is even ready and you are trying to "ignore" things until there is a value (or a true error) yes? Confirming that the source of the data is dataverse or a passed in parameter or environment variable or something else?
Correct, the data is stored in Dataverse and passed in to flow through the Dataverse connector. I think you are also correct that this it is flow itself doing the evaluation early, as I have tried multiple actions/connectors to try and get around this. I find no settings to change when this occurs. It also will not treat html tags correctly, just places them in as strings.
Ah ha! so another thought. It is email after all (cough cough "outlook") .... Last I saw a flow have to to Rich text manipulation (and I was so hoping that HTML tags worked) had them calling Word and doing the "automation" there and then sending the body in the email. Trying to find the sample but the idea came up awhile back because at least back in 2019 or so it was definitely not possible to use HTML strings in. Quick question is even if it is a "string" for the body, is there not an option for the mail connector for Rich text?
Hi everyone! Jenefer, would it be possible to use Word Templates with properties to generate the text content? And then we can use the Document Converter to get both, HTML or Markdown? I know that we would have to have a document library with the templates, and it would be a template by notification.
How do you see this idea?
In the table row, it would be the same as Jenefer described, but in the body value it would be the URL of the Word template. I really like that there is also a column for "Send as".
Regards!
Hello, word templates would be a good idea to explore. Unfortunately they are not ISV friendly.
In other words, we cannot rely on any of the office actions (Excel, Word, ...) in the toolkit as when you import them into your own tenant, you have to redo the actions, which in the case here would be substantial work each month.
Thanks for helping think outside the box!
It makes sense ... I explained exactly this as to why it was GitHub and Not ADO out of the box for the ALM Piece and also why Excel Reporting was left to the Power BI OOB experience. We don't want to create a custom API that needs Azure for example although on the edge there as we rely on tools like AAD for registrations etc. Logic apps are pay as you go and add an extra burden to the concept of the starter kit which is to be "free" at least for the first 30 days ... hmmmm. Unless we say just like you can get a trial for Power apps you can get one so you can do a Logic app? hmmmmmm .... Just a thought.
So the clue feels like it is in how anyone would use Power Automate to send a Rich Text email at all ... Test that and at least we have something that might be modifiable ?
The case of if we can format it it via a variable that is ... we know there is formatting because we see it now ... right?
I have had the experience of working with word templates and ALM and it was not too hard. The templates are distributed as the CoE Started Kit does with the Dashboard in Power BI. The word template activities can be completed with environment variables to fill the site and library, and then the file name is the column "URL body" of the table designed for Dataverse. There is no need to redo the flows in that case.
However, if we have the original idea of using the text value of a column and record without token to replace, and then we put the dynamic contents at the end concatenated, it would be perfect for the first version!!
mmm... "tokens to replace" ?? If the value of body field in dataverse is: "My message [[MyVariableToReplace]] and more message" and replace [[MyVariableToReplace]] with my dynamic conten by automate expression ??
I don't think we can scale to having custom code at each mail to fill in the variables. If we cannot get the product to interpret them as is, brought in, then I think we will need to just have the variables at the end of each mail.
For now, I am going to go forward with this plan (variables at the end) and cross my fingers that we don't run in to more issues.
If anyone here has a sample solution I can use to test word templates working across tenants, please share. As we have an awesome solution for the CoE we never shipped as we couldn't get this to work
Thanks for the feedback!
time to hunt for that, team! checking the MVP's and the sample repositories to see if there is anything sitting in plain site ... probably need to dig a bit since that very specific action is not in the title of the sample.
local fixed for Dec. Finishing testing. Dec will have only the cloud flows in Core complete. And in future months, with feedback, we will extend into Gov and Nurture
Good start .... anticipating documentation or guidance updates to coincide or should we keep note until then?
Yes the how-to for this will be in the documentation when we release Dec!
@manuelap-msft This has been fixed in the latest release. Please install the latest version of the toolkit following the instructions for installing updates. Note that if you do not remove the unmanaged layers as described there you will not receive updates from us.
Currently users have to edit flows to make the email and adaptive card text their own which leads to unmanaged layers and update issues, it also is difficult to review the email text or even know which flow sends what.
have an email configuration table that we preload with data (maybe not with a dataflow though)
all flows pull info from that table
where we dynamically have text we could use placeholders that we then match (e.g. something like {AppName} that we would replace with the actual app name) OR keep dynamic parts hardcoded at the bottom or start of the email
fail flows if text is not configured