Make an HTTP POST request to this workflow to analyze the sentiment of any text using NPM's sentiment package (https://www.npmjs.com/package/sentiment), AFINN-based sentiment analysis for Node.js.
Fork this workflow into your account to activate and run it, then click SEND TEST EVENT
Make an HTTP POST request to the endpoint URL (generated by Pipedream when you fork) with the following JSON body:
{
"text": "YOUR-TEXT-HERE"
}
To return the sentiment score in the response to the client, append ?pipedream_response=1
to your endpoint URL (e.g., https://xxxxx.m.pipedream.net?pipedream_response=1
).
Go to the SQL tab and run a query (sample SQL queries are provided below)
Select the last 10 workflow events
SELECT *
FROM sentimenttest
LIMIT 10
Select the text and sentiment score for the last 10 workflow events
SELECT text, sentiment.score
FROM sentimenttest
LIMIT 10