Hey there 🙂
We used to have Google Services in our company, but got converted to Office 365 😄
My boss, the department manager for maintenance, had built a script himself, that scanned defined Hangouts-Chats on a regular schedule and entered the messages in a spreadsheet. It was basically our logbook for the machines and the spreadsheet was also our task-list.
After our "GO365"-campaign, as our management staff called it, this solution was gone. I found out about Power Automate recently and tried to replicate this with Teams and Excel. It works with "when I am mentioned in a channel message" and an "add row to table".
My problem:
is it possible to split the message body, so that I get a nice looking spreadsheet?
On the Google solution, the message was filtered for a vertical stroke. Every vertical stroke means a new column. That way we got: Plant ID|Machine ID|Machine name|problem type|problem|solution|status|person, the task is assigned to.
Can you help me with that?
Thanks in advance!
I am not sure I understand your problem. There is a split function in that can be used on a separator You are probably aware of it.
Another way to do it in a good way, is to use adaptive cards in teams.
Thanks for the quick response!
As I wrote above, I learned to know Power Automate just recently and only dipped my toes there.
My problem is: I have a dynamic content (message body), that needs to be separated into multiple parts to be written in several columns in excel.
I hope, that makes the question a little bit better understandable 😄 To make things even worse: I am a native german speaker and, for no reason, my company decided to set our Office 365 language to German and lock the language settings for us mortal users :') That makes things a little bit harder to try out. But never mind, your help is very well appreciated!
I tried the split function, but probably the dynamic content has to be written in a string variable beforehand, am I right?
@TheAlf you can configure the actions in flow as below screenshot
1. Add Initialize Variable action, provide a name to the variable, select type as Array, and use following expression in the value property
split(triggerOutputs()?['body/body/content'],'|')
2. Add apply to each action, select the Array variable from dynamic content
3. Add "Add a row into a table" action inside apply to each action, and select Current item (apply to each) from dynamic content to get the split data value.
@annajhaveri
I tried your solution, but it is not working yet.
I get a "Bad Request" Error on the initialisation, when I test this setup. It says, that the variable with the type Array cannot be initialised or actualised with a value of type string.
@TheAlf you need to provide the expression from dynamic content -> Expressions, please see screenshot below
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
25 | |
23 | |
23 | |
23 | |
17 |
User | Count |
---|---|
57 | |
39 | |
37 | |
29 | |
28 |