Robotic Process Automation (RPA)

 View Only
  • 1.  mail relay

    Posted Mon May 17, 2021 07:18 AM

    Hi,

     

    I don't know if there is IBM RPA Studio have the mail relay feature for customer send mail to relay provider like send in blue or mailchimp etc.  

     

    Thanks.



  • 2.  RE: mail relay

    Posted Wed May 19, 2021 11:40 AM
    Can you elaborate in your question? How mail relay would work? What use case are you trying to accomplish?

    ------------------------------
    Joba Diniz
    ------------------------------



  • 3.  RE: mail relay

    Posted Thu May 20, 2021 11:01 PM
    Hi,

    Thanks, not sure if I can create mail connection with third party mail relay service with API to send mass mailing?.

    ------------------------------
    Sonny Siah
    Infra365 Sdn Bhd
    ------------------------------



  • 4.  RE: mail relay

    Posted Fri May 21, 2021 04:04 AM
    Edited by NIGEL CROWTHER Fri May 21, 2021 04:06 AM
    Hi Sonny,

    Mail chimp uses REST API's, so you can use HTTP request: https://www.ibm.com/docs/en/rpa/20.12?topic=web-http-request

    ------------------------------
    NIGEL CROWTHER
    ------------------------------



  • 5.  RE: mail relay

    Posted Wed June 16, 2021 05:37 AM
    Hi,
     
    Kindly guide me how do I putting the API key string, which field I can used? I got the API key v2 with me.






    ------------------------------
    Sonny Siah
    Infra365 Sdn Bhd
    ------------------------------



  • 6.  RE: mail relay

    Posted Thu June 17, 2021 08:40 AM
    Hi Sonny,

    Here is an example of sending an API Key in HTTP Request:

     defVar --name pdf_directory --type Boolean
    defVar --name file_paths --type List --innertype String
    defVar --name file_path --type String
    defVar --name headers --type StringDictionary --innertype String
    defVar --name contentHeaders --type StringDictionary --innertype String
    defVar --name file_bytes --type List --innertype Byte
    defVar --name http_success --type Boolean
    defVar --name http_response --type String
    defVar --name http_reason --type String
    defVar --name file_base64 --type String
    defVar --name http_status --type Numeric
    defVar --name json_data --type String

    strDictAdd --key "Content-Type" --value "application/x-www-form-urlencoded" --dictionary ${headers}
    strDictAdd --key Accept --value "application/json" --dictionary ${headers}
    strDictAdd --key apiKey --value "YWYwNGE1YjgtOWU3Yi00ZmM2LWE5NDYtYWQ0OGIzZjI4N2QzO2RlbW87ZGVmYXVsdA==" --dictionary ${headers}
    strDictAdd --key Authorization --value "Bearer R4xIxq6rcX7kSzF2cd34Z36RSnniP7Leb9x3r4nM" --dictionary ${headers}

    if --left "${pdf_directory}" --operator "Is_Null" --negate
        getFiles --path "D:\\test\\pdfs" file_paths=value
        foreach --collection "${file_paths}" --variable "${file_path}" --distinct
            logMessage --message "${file_path}" --type "Info"
            fileToBase64 --filepath "${file_path}" file_base64=value
            readAllBytes --filepath "${file_path}" file_bytes=value
            setVar --name "${json_data}" --value "{\r\n    \'file\': {\r\n      \'value\': ${file_base64},\r\n      \'options\': {\r\n        \'filename\': \'d://test/data/card1.jpg\',\r\n        \'contentType\': null\r\n      }\r\n    },\r\n    \'responseType\': \'\"json\"\',\r\n    \'jsonOptions\': \'\"ocr\", \"dc\", \"kvp\",\"sn\",\"mt\",\"hr\",\"th\",\"ds\"\'\r\n  }\r\n}"
            logMessage --message "${json_data}" --type "Info"
            
            strDictAdd --key formData --value "${json_data}" --dictionary ${contentHeaders}
            httpRequest --verb "Post" --url "https://backend.uk-cp4a-deployment.159.8.181.251.nip.io/ca/rest/content/v1/contentAnalyzer" --headers ${headers} --formatter "FormUrlEncoded" --source "${json_data}" --timeout "00:00:10" http_success=success http_response=value http_status=statusCode http_reason=reasonPhrase
            logMessage --message "Status: ${http_status}" --type "Info"
            logMessage --message "response: ${http_response}" --type "Info"
            logMessage --message "Reason: ${http_reason}" --type "Info"
        endFor
    endIf

    ------------------------------
    NIGEL CROWTHER
    ------------------------------



  • 7.  RE: mail relay

    Posted Thu June 17, 2021 09:50 PM
    Hi,

    Noted and thanks, I will try out that.

    ------------------------------
    Sonny Siah
    Infra365 Sdn Bhd
    ------------------------------