Legacy Dev Forum Posts

 View Only

Sign Up

HTML Formatted Automatic Email Reply

  • 1.  HTML Formatted Automatic Email Reply

    Posted 06-05-2025 19:14

    mostafaawad | 2023-03-06 13:40:22 UTC | #1

    Dears,

    Is there a possibility to send an HTML formatted email from the Architect as an automatic reply to inbound emails and if yes how could this be achieved?


    jacobshaw | 2023-03-06 14:44:30 UTC | #2

    Hi @mostafaawad The API does provide POST /api/v2/conversations/emails/agentless for sending agentless outbound emails, and for HTML formatted emails you can use the htmlBody request field. You should be able to set up a data action with a client credentials grant that calls this endpoint to accomplish this.


    mostafaawad | 2023-03-16 14:37:50 UTC | #3

    Hi Jacob,

    I tried this API endpoint from Postman and it's giving the below response:

    {

    "message": "The outbound domain does not exist",

    "code": "postino.error.not.found",

    "status": 404,

    "messageWithParams": "The outbound domain does not exist",

    "messageParams": {},

    "contextId": "e9c40f88-c5ce-45b2-8a05-f0976dea901b",

    "details": [],

    "errors": []

    }

    The use case here is that I'm trying to send a well HTML formatted auto response from the Architect and the canned responses can't help in this case so I started to use the below endpoints:

    1- POST /api/v2/conversations/emails - to create an email interaction on behalf of the queue. 2- POST /api/v2/conversations/emails/{conversationId}/messages - to send the reply created from the above endpoint.

    And the issue here is that it should be handled by agent/user as long as this is a created interaction on behalf of the queue.

    So what I need to know is which endpoint actually can simulate the Send Auto Response action in Architect with the option to add the HTML body of the email.

    Thanks.


    jacobshaw | 2023-03-16 21:42:01 UTC | #4

    @mostafaawad

    You will need to provision an outbound email domain with Genesys Cloud, and use that for the from address in your API call. Here's a tutorial for doing that: https://help.mypurecloud.com/articles/set-up-a-domain-for-outbound-email-campaigns/

    The other two API resources you mentioned require a user context, so they can't be called from a data action which uses client credentials. The agentless resource will work with a data action, however.


    mostafaawad | 2023-03-19 09:41:34 UTC | #5

    Hi @jacobshaw ,

    I really appreciate your response. So in this case no other way to simulate the Send Response action in architect from an API unless I use the agentless?


    jacobshaw | 2023-03-22 12:24:23 UTC | #6

    @mostafaawad This is the method I'm most familiar with. This forum is geared toward the Genesys Cloud API, so that's where my skill level is highest. However, I just did a test with an inbound email flow using the "Send Auto Reply" action, and it actually worked for me with an HTML body for the reply like this:

    I must say this is an easier method than what I first suggested.


    jacobshaw | 2023-03-22 12:30:10 UTC | #7

    If you go for the "Send Auto Reply" method, you wont need the "Campaign/Agentless" domain, just the "Genesys Cloud" type domain you use to route emails to your Inbound email flow.


    mostafaawad | 2023-03-22 12:53:32 UTC | #8

    @jacobshaw

    That's really great! Honestly, I didn't test that and didn't expect that this can be done. Thank you!


    system | 2023-04-22 12:53:13 UTC | #9

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 18747