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"
endForendIf------------------------------
NIGEL CROWTHER
------------------------------
Original Message:
Sent: Wed June 16, 2021 05:36 AM
From: Sonny Siah
Subject: mail relay
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
Original Message:
Sent: Fri May 21, 2021 04:04 AM
From: NIGEL CROWTHER
Subject: mail relay
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
Original Message:
Sent: Thu May 20, 2021 11:00 PM
From: Sonny Siah
Subject: mail relay
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
Original Message:
Sent: Wed May 19, 2021 11:39 AM
From: Joba Diniz
Subject: mail relay
Can you elaborate in your question? How mail relay would work? What use case are you trying to accomplish?
------------------------------
Joba Diniz
Original Message:
Sent: Fri May 14, 2021 09:56 PM
From: Sonny Siah
Subject: mail relay
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.