Custom response body for inbound REST endpoint in Flow designer

Andr_s _szi
Tera Contributor

I'm creating an inbound REST endpoint (with POST method) in the flow designer - a flow with REST trigger.

According to the documentation, the default response body is going to be the executionId of the flow.
Is there any way to customize this using the flow designer or you can only do this with the Scripted REST API?

Thanks

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hello Andrew,

 

According to this fellow member, you don't have the same option in FD as you are used to in Scripted REST API.

I'm guessing it's due to the fact that you don't have access to the RESTAPIResponse object in the data pills + that this is async trigger, so the execution ID is only for a kind of "acknowledgement" that it is being put in the queue.

 

You should follow the links he provides and it might lead you to where you want to go:

https://www.servicenow.com/community/developer-forum/scripted-rest-vs-flow-designer-asynch-trigger-f...

 

Best to you,

L

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hello Andrew,

 

According to this fellow member, you don't have the same option in FD as you are used to in Scripted REST API.

I'm guessing it's due to the fact that you don't have access to the RESTAPIResponse object in the data pills + that this is async trigger, so the execution ID is only for a kind of "acknowledgement" that it is being put in the queue.

 

You should follow the links he provides and it might lead you to where you want to go:

https://www.servicenow.com/community/developer-forum/scripted-rest-vs-flow-designer-asynch-trigger-f...

 

Best to you,

L

Thanks for the answer.
It indeed seems like that you cannot set custom responses with the flow designer (there is no response object in the flow). Would be nice though. Well, I'll stick with the scripted rest api then.