Hello,
I'm using the MS list template to capture and log IT tickets. I noticed that when I reply to the recipient it creates a new list item instead of updating the existing item. I searched for a resolution to resolve this, but I'm completely out of ideas. Below is the flow with the error message I'm running into.
I'm using the following to split the title and subject in the email to update it, but it doesn't work.
last(split(triggerOutputs()?['bodyPreview/E_x002d_subject'],';'))
Does anyone have any insight into this?
Hi @katkins ,
In Compose2 there are only blank values "" output, so in Get item action the Id the value is blank as well, which made it fail.
Conclusively, you have to follow the steps in the thread you post:
1. Compose:
split(triggerOutputs()?['body/subject'],';')
2. Compose2: (if the format of email subjects is like AAA;123;title)
{
"id": 'outputs('Compose')?[1]',
"Title": 'outputs('Compose')?[2]'
}
then you will get the output:
{
"id": "123",
"Title": "title"
}
3. Get item: Id parameter:
int(body('Parse JSON')?['id'])
Best regards,
@v-jefferni Thanks, I removed the last function, and it was able to go through. Now I ran into the original problem, which is shown below. I'm not sure why it is saying the id parameter needs to be an integer/64. When I edit the JSON properties and changed the id type from string to integer it still gives me issues. As you can see I'm using the list ID default column which I'm assuming is an integer column but changing the properties doesn't help either.
Error with ID= string
Error with ID= integer
What do you think might be the issue?
Best,
Hi @katkins ,
In that post, the solution is using split alone and output an array that divided by semicolon. For example, an income Email with subject A;B;C;D, the output of split(triggerOutputs()?['body/subject'],';') is
["A","B","C","D"]
and output of last(split(triggerOutputs()?['body/subject'],';')) is "D", which cannot be selected by using [1] or [2] in expression, outputs('Compose')[1] means to get the SECOND item from output of Compose.
If you want to get the array, don't use last function in that expression. Or you can share one subject and what you want to get, I would help you out with the expression.
Best regards,
@v-jefferni thanks for pointing this out, I was trying to update my MS list item for our helpdesk, when a reply is sent via email. I found this with the community, but it doesn't seem to work on my end.
The goal is to keep all communication within the same list for a specific email request from staff.
Hi @katkins ,
Output of Compose is of type string, which is the last part of subject that divided by semicolons. You can find it was a "test" in Compose in the run history. I don't understand what you would like to get from Compose.
Best regards,
@v-jefferni thank you, that helped, question my flow keeps failing giving me the following error message below:
The goal is when a ticket request comes in and added to MS list, I would like to reply to the same email chain and have that be updated as well to the item created for this request. I created the following flow to do that with some instructions online. However, I might be missing a step to this.
These are the expressions in "composed 2" inputs:
Do you have any idea if this flow will help accomplish my goal? I'd appreciate your insight to this.
Best
Hi @katkins ,
The issue is triggerOutputs()?['bodyPreview/E_x002d_subject'] is blank, which is odd. please try and use below expression instead:
last(split(triggerOutputs()?['body/subject'],';'))
Best regards,
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional