cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lutzy
Helper I
Helper I

Get and update sharepoint item based on Condition from an Email

Hello everyone,

 

I have a tricky one I hope someone can help with.  I am building a helpdesk ticketing app and using Power automate to handle the email flow internal and external

 

Flow 1 - Create a ticket

When a new email arrives a new Item in a SharePoint list is created.   -  An email is sent to the user with the Subject "A new ticket was created - ( "Ticket ID"  "Subject")

 

Flow 2 - Send email from PowerApps

Form Power apps when a Tech sends a message a new email is sent to the user with the subject "Ticket has been Updated ("Ticket ID"  "Subject"")

 

I have two Sharepoint lists.

 'Helpdesk Tickets' - Main list that contains all of my tickets

"Helpdesk Ticket Comms' - A new list item is created for each communication item.

 

This way I can display a gallery within powerapps, filter by Ticket ID and show all communication between the tech and the user. AN up to this point all is working well.

 

 

Now, here is the tricky part.  What if the user replies to an email?  I dont want a new ticket created.

 

Ok So back to flow 1,  I can make a condition whereby it does not create a new ticket when the email contains one of the above Subject prefixes and send the flow on another branch so I can capture the comms.

 

Is there a way I can create an Item in the 'Helpdesk Ticket Comms" Sharepoint list that will also contain the Ticket ID and how can I map from a condition in the email? 

 

(Bare in mind both SharePoint lists will have a ticket ID field from the existing 2 working flows.)

 

I hope that makes sense.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Lutzy
Helper I
Helper I

Thanks, I have worked out the solution

View solution in original post

4 REPLIES 4
Koen5
Continued Contributor
Continued Contributor

Dear Lutzy,

 

Your explanation is clear un until you state "Is there a way I can create an Item in the 'Helpdesk Ticket Comms" Sharepoint list that will also contain the Ticket ID and how can I map from a condition in the email?".

 

I cannot figure out what you want to do and why. Why you want to create an item in the 'Helpdesk Ticket Comms" Sharepoint if you state previously that this holds the communications from the tech. Why relate this to a reply from a user email? And why you want to map this to the email?

It is not clear how the 2 lists will influence eachother.

 

Kind regards,

Koen

Lutzy
Helper I
Helper I

Thanks for your reply @Koen5 

 

The 'Helpdesk ticket comms' is simply just a log for all emails/ Communications.

There are 5 columns in the list - "Ticket ID" , To", "From", "Subject", "Body

 

All emails outbound to the user are handled within the power app.  With the use of patching, I can patch the data including the Ticket ID across from the 'Helpdesk Tickets' SP list to the 'Helpdesk Ticket comms' SP list.  The "Ticket ID" Feild is important as it allows me to display this comms with filtering within the app.

 

I need help with capturing the user inbound email that contains one of the following two subjects -  "A new ticket was created - ( "Ticket ID"  "Subject") or "Ticket has been Updated ("Ticket ID"  "Subject").   Because the user would simply be replying to an email they had received.  If it does not contain these subjects it would be considered a new ticket.

 

All of this is fairly straight forward and I can easily create this item with the "To", "From", "Subject" and "Body of the email.  I am having trouble populating the "Ticket ID" field from the email that has been received.  

 

 

 

 

 

Koen5
Continued Contributor
Continued Contributor

Dear Lutzy,

Sorry, maybe its the lack of coffee this morning, but I am still not getting your particular problem.

At first I am thinking that you could just take the 'Ticket ID' from the email received with a split() expression in a Compose field ... but seeing that you are already a 'Helper I', I am guessing that you are familiar with this and would have thought about it yourself.

 

I guess that unless you can visualize some stuff to illustrate the problem, I am not suited to dive into this ... sorry, just not able to connect A to B.

 

Happy flowing,

Koen

Lutzy
Helper I
Helper I

Thanks, I have worked out the solution

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,887)