This topic was automatically generated from Slack. You can find the original thread here.
Nick Nelson : Happy Sunday! I was looking at formatting a message to send to a discord webhook. I followed the format that you have on the website but I keep getting a 400 error saying it can’t interpret that as a string. I don’t know if it’s maybe because I’m using variable names next to title: and description: but they’re string variables so I would’ve thought that’d be fine. Thanks in advance!
Dylan Sather (Pipedream) : Hi , would you mind sharing your workflow with dylan@pipedream.com? Just click the Share button in the top-right corner. I can take a look to help you troubleshoot
Dylan Sather (Pipedream) : No problem. I believe you’ll need to pass the data in {{steps.generate_message.msg}} to the Embeds parameter, not the Message parameter.
The Message param expects a simple string like “Hello world”. If you want the title / description to be interpreted and displayed in the Discord message, the Embeds param will do that for you.
Go ahead and try removing the Message param and try adding this to Embeds:
Nick Nelson : Actually, follow up since I’ve got you. If you know off the top of your head… the embedded picture isn’t showing. Is that even possible via sending the message the way that I am?
Nick Nelson : One final question (for now). Let’s say I’m looking at two different locations and if the message comes from one location vs the other I want to stop the script and not send the message. I tried using $end in a couple places but it didn’t seem to stop the script. Sorry for the nooby questions. I’ll keep looking through the documentation as well
Dylan Sather (Pipedream) : No worries. $end() should stop the execution of the workflow as soon as that line is run. Could you try adding a console.log message just above the $end to see if that runs? My first guess is that your code may not be hitting that condition, and that’s why $end isn’t getting triggered.