web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / HelpDesk App - Flow to...
Power Apps
Unanswered

HelpDesk App - Flow to send email when ticket is created

(0) ShareShare
ReportReport
Posted on by 101

I am using the Help Desk template and hoping the flow will generate an email when the create ticket button is pressed. But it is not working using the HelpDeskFlow code that came with the template. The rest of the flow works when the existing ticket is edited though, so I know the general functionality is working, just not this part of the flow. I just want the ability to email a support mailbox letting them know a ticket is opened/created and needs assigning.

 

Boppersnr_1-1637244577679.png

This is what I hoped happens:

Boppersnr_2-1637244640970.png

But this is what actually happens:

Boppersnr_3-1637244672716.png

So no email gets generated when a ticket is created. 

Would anyone have any ideas what is wrong?

 

 

 

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,581 Most Valuable Professional on at

    The problem is somewhere in the Get Items action.  Both Apply to Each loops run, but both are running on an empty array, since none of the steps inside the loop execute.  That means your Get Items isn't returning any data.  I suspect there is a problem with the OData filter that you are using in the Get Items.  Can you share the details of that step?

  • Boppersnr Profile Picture
    101 on at

    @Pstork1 Is this what you need:

    Boppersnr_0-1637246763278.png

    And here is the result of the flow when it ran.

    Boppersnr_1-1637246823492.png

    It looks like it did find the new ID (150), so not sure why it didn't get the items for that new ID.

  • Pstork1 Profile Picture
    69,581 Most Valuable Professional on at

    Are you sure you are passing in the right value?  Where are you getting the 150 from?  If that is the ID of the ticket then you need to compare it to a different field in customer to find the customer for that ticket.  Check your customer table and make sure a record with ID 150 actually exists.  I suspect it doesn't and you are actually filtering on the wrong value.

  • Boppersnr Profile Picture
    101 on at

    @Pstork1 the ID field seems to be from the CustomerTickets Collection. It doesn't appear in my SharePoint list as a column. I was under the impression that when you press the Create Ticket button, it auto generates the next available ID. and that is what it then uses as a reference ID for that ticket. The HelpDeskFlow that came with the HelpDesk template, had that filter query in it and it seems to work for all tickets that are edited using that ID as the filter. Its just not working for newly created tickets. Hope that gives you more info to help.  

     

    Boppersnr_0-1637250227550.png

     

  • Pstork1 Profile Picture
    69,581 Most Valuable Professional on at

    Can I ask where you got this HelpDesk template?  It doesn't match the one that is available in Power Apps.  That one doesn't use any flows and has no CustomerTickets Collection.  If I can look at the way its put together I can try to figure out what is going wrong.

     

    But in general, the ID in a SharePoint list is assigned by SharePoint and wouldn't match anything in a customer tickets collection unless it was added to the item after the SharePoint item was created.  So an ID created for the Customer tickets collection can't be used to retrieve a SharePoint list item by ID.  If it could be you would use a Get Item action instead of a Get Items action since an ID is unique in SharePoint.

  • Boppersnr Profile Picture
    101 on at

    @Pstork1 I must have used an older version of the helpdesk template than the one current available. I don't recall creating the flow myself as it would be out of my comfort zone.

    What if I exported the helpdesk app to a zip file? would I be able to share that with you to check? if so, do I just attach it to this thread?

  • Pstork1 Profile Picture
    69,581 Most Valuable Professional on at

    That would help.  But does the one you are working with look like this?  If not where did you get it from?

    Set up the Help Desk sample app - Power Apps | Microsoft Docs

  • Boppersnr Profile Picture
    101 on at

    Yes thats the one I am using. 

  • Boppersnr Profile Picture
    101 on at

    @Pstork1 

    I found the package I used, this has the flow included.

    I am going to import it and look again at the fresh configuration to see if there is any differences between my version.

  • Boppersnr Profile Picture
    101 on at

    @Pstork1 I can see now how it was set up from the template.

    It seems the flow is only called when the EditTicketFormScreenUpdateButton is pressed. Any ideas how I can get the flow to run when the CreateTicketFormScreenCreateButton is pressed? Could it be that I need to add a delay timer to delay the flow running so the system has a chance to create the new ID. If so, what code would I put into the button to delay the flow running?

    HelpDeskFlow.Run(SelectedTicket.ID)

     

    I want it to send an email to the admin once a ticket is created. This is so the admin can assigned someone to the ticket.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard