cancel
Showing results for 
Search instead for 
Did you mean: 

Triggered Task respond with plain unformed text (not JSON)

Ish
New Contributor III

Hello,

How can I make a triggered pipeline respond with plain text vs something structured?

e.g., it should return:
My Return Text Here

and not anything like this:
[
{
returnText: “My Return Text Here”
}
]

Thanks!

2 REPLIES 2

tstack
Former Employee

You need to have an unlinked binary output view. With the latest release (4.17) you can change a Mapper’s output view to be binary and then write the string you want to $content. Would probably also be wise to set $['content-type'] to text/plain.

image

Here’s how you change the output view through the ‘Views’ tab in the Mapper settings:

mapper-binary-view

I’m attaching a pipeline that demonstrates this:

PlainTriggered_2019_06_04.slp (2.4 KB)

(If you haven’t upgraded yet, you can use a DocumentToBinary snap in a similar fashion)

patan
New Contributor III

Thank you. This solution works for me as well.