Hi,
I am trying to create an API in Runtime, and call it in ACS.
Javascript action's is :
function main(params) {
for (var i=0; i < params.count; i++) {
return new Promise (function (resolve, reject) {
var resp = {
statusCode: 200,
headers: {
'Content-Type': 'application/json'
},
body: {msg: 'Hello' + params.firstname}
};
resolve(resp);
});
}
}
In ACS, I have a workflow and I target 10 contacts.
For theses contacts, I would like call my API, and recover "Hello <firstname>" as result.
![aurélienh561651_1-1604602883896.png aurélienh561651_1-1604602883896.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/28012iC80A24C818D97233/image-size/medium/is-moderation-mode/true?v=v2&px=400)
![aurélienh561651_2-1604602946584.png aurélienh561651_2-1604602946584.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/28013iA2E3373D45B365FA/image-dimensions/632x300/is-moderation-mode/true?v=v2)
![aurélienh561651_3-1604603010919.png aurélienh561651_3-1604603010919.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/28014i99961D60CD0917BB/image-dimensions/632x327/is-moderation-mode/true?v=v2)
This workflow fail, and I got the error below (but no more details....) :
![aurélienh561651_4-1604603124652.png aurélienh561651_4-1604603124652.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/28015i380BB4A9524D78AA/image-dimensions/665x188/is-moderation-mode/true?v=v2)
What is wrong ? Can you help me on this subject ?
Thank you,
Regards,
Aurélien