Product/components used and version/fix level are you on:
webMethods cloud version
Detailed explanation of the problem:
I have data coming in from a json webhook, which is being used to query salesforce records in my salesforce instance. When running the execution manually during testing, my workflow executes with no issues (including successfully accessing Salesforce with my credentials, querying records, and creating new records in a later step within the workflow). However, when I activate my workflow; I get the following error message:
Error messages / full error message screenshot / log fileL
“message”:“Error while parsing response data” type Status Report Message Unauthorized Description http.401
Is your question related to the free trial, or to a production (customer) instance?
free trial
Have you installed all the latest fixes for the products and systems you are using?
Can you please explain by activating workflow means are you trying to invoke workflow post that which resulted in error or while saving workflow are you getting errors ?
Kindly share the screenshot of the flow and error ?
Apologies for not clarifying. Activate is not the appropriate term to use here.
What I meant is that when I invoke the Salesforce REST CRM Flow step through manual execution during testing, I am able to successfully authenticate and query/create records using the workflow.
However, when I invoke the workflow and the associated workflow steps through a webhook submission to my endpoint url, which is what my trigger is firing off of, I get a 401 “error while parsing response data”. I’ve attached screenshots of my flow and the associated error message.
The flow is failing at the queryContacts flowstep with the following error. Not sure if this is relevant, but the json comes in as an array of records, so these steps are inside of a loop flowstep.
{
"message": "Error while parsing response data",
"data": "<html><head><title> - null</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 401 – Unauthorized</h1><HR size=\"1\" noshade=\"noshade\"><p><b>type</b> Status Report</p><p><b>Message</b> <u>Unauthorized</u></p><p><b>Description</b> <u>http.401</u></p><HR size=\"1\" noshade=\"noshade\"><h3></h3></body></html>"
}
Thank you for testing. It seems like the issue might be in how I set up the connector. When you set up the Salesforce API, did you do it through an authorization code flow or a JWT flow? Also did you need to do anything on the Salesforce side like set up a new remote site setting?