We are trying to set up a workflow where emails from the designer are sent out using an account at Sparkpost. Sparkpost have an api where we can track bounces etc. The api is easily accessible using a GET command which sends a JSON result. I would like to get Workflow to use the results to trigger various events such as send a further email (if opened) or print a postcard (if bounced).
Would I use Run Script in Workflow to access this, or can a simple cUrl command be used somehow?
I have this JavaScript so far… not sure how to proceed!
If it’s a basic HTTP GET request, you can use the HTTP Client Input task in Workflow and simply type the URL in there. The job file for the process will then be whatever the Server returns.
Upon trying to run this in debug, I first got this error: W3730 Error resolving URL: Socket Error #11004
(The URL worked fine in another software)
Then I tried it another time and got this error:
W3730 : Error resolving the URL : Access violation at address 019D7CA9 in module ‘Indy60.bpl’. Read of address 00000020
HTTP Client Input: W1603 : Plugin failed - 09:39:42 (elapsed time: 00:00:00:742)
Try it in Step By Step mode to make sure it works.
If it does (but still does not work in Service mode), then I would suspect the User Credentials used for the service do not allow it to retrieve information from the URL.
If it doesn’t work in Step By Step mode either, then the URL is probably expecting something else than a GET post (or it is expecting extra parameters, or authentication information, etc.). You should double-check with the URL owner.