cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stanford
Frequent Visitor

Expression matching (Error 404)

Hi Guys,

 

I'm building a ticket system for my organisation - I'm 80% complete but I've ran into this issue and because I'm now relying on expressions I am confused on why this is happening. This is how my flow is run:

 

-When an email is sent to a shared mailbox - check to see if there is a Ticket ID in the subject of the email - if yes then put the email into an additional info column. if there is no Ticket ID in the subject column - create a ticket. 

 

If a reply with an existing ticket ID in the subject the flow works great - if I send an email with no Ticket ID it takes the subject of the email, tries to compare it with an ID and fails on a error 404 (not found)  Is there an expression I can use instead?

 

Here's my flow images - The expressions on the second screenshots are in order here:

 

length(outputs('Compose_Get_TicketID'))
int(body('Get_item_2')?['ID'])
int(outputs('compose_get_ticketid'))

 

 

Firstpic.png

 

 

secondpic.png

2 REPLIES 2
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Stanford 

 

Add a condition to checkf if ticket number is empty  form email

 

If Yes - create item

If No - Get Item

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

v-bacao-msft
Community Support
Community Support

Hi @Stanford ,

 

It should be noted that the Id configured in Get item action is list metadata, which is a number type field that is automatically generated by the system and has a unique value instead of the ticket id mentioned here.

 

I speculate that your list should have a specified field to record the ticket id. You need to use Get item-Filter Query to see if the item containing the specified ticket id already exists.

 

Then use the length() function to determine if such an item exists, if so, update the item if it exists, and create a new item if it does not exist.

 

Please check this similar thread and see if it helps:

https://powerusers.microsoft.com/t5/Building-Flows/I-need-a-flow-to-check-if-item-already-exists-in-...

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,606)