MailerSend inbound email timeout

Site: parentsync.app hosted on Netlify

Inbound Emails from MailerSend are being received and processed by a lambda function, however when I return a status 200 after processing the data, there is a timeout, as MailerSend expects a 200 within 3 seconds. But if I then return a status 200 before processing my email data, the rest of my function silently fails. As a result, MailerSend keeps pausing my inbound webhook on their end.

Any advice welcome!

HI, @GeneralE2022. One solution could be using two functions, one normal and the other a background function:

The workflow I’m imagining would look like this:

  • the “normal” function receives the webhook and passes it to background function
  • the normal function can then immediately return the 200 status to MailerSend letting it know it has been received
  • the background function can then process the email asynchronously without delaying the response to MailerSend

Would that workflow work be feasible here?