Can I call a custom API once the ticket is automatically created through email

I would like to implement the following workflow.

  1. User sends an email with the support query to an email address.
  2. Email and attachments are automatically ingested and a support ticket is created.
  3. A custom API is called with the ticket content and attachments.
  4. Custom API automatically provides ticket resolution or next steps that automatically gets to the user through email.

I know #1, #2 can be performed through the Frappe framework but I could not find screens to link a custom API as in #3 and #4.

Can you please help?

Hi @AmitKumar:

  1. Use controller method (.py file / server script) for your “ticket” doctype. There, write the logic to call your custom API

https://frappeframework.com/docs/user/en/basics/doctypes/controllers#controller-methods
https://frappeframework.com/docs/user/en/desk/scripting/server-script

  1. Write your server method to provide resolution and notify customer. It could be done with .py file or server script or even using notification system.
    Notification

Hope this helps.

Thank you so much @avc. I’ll try this and post here if there are challenges.