Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Slack direct message interpolation doesn't work for $ #11990

Open
joscha opened this issue May 16, 2024 · 5 comments
Open

[BUG] Slack direct message interpolation doesn't work for $ #11990

joscha opened this issue May 16, 2024 · 5 comments
Labels
bug Something isn't working question Further information is requested

Comments

@joscha
Copy link
Contributor

joscha commented May 16, 2024

Describe the bug
When using the slack direct message action and using a value from a previous step that has a dollar sign ($) in it, the interpolation doesn't work and it throws an error

To Reproduce
Steps to reproduce the behavior:

  1. Create a workflow
  2. Add a Slack direct message action
  3. add an interpolation to the Text field that contains a $, e.g. {{steps.my_step.$return_value}}
  4. Run it

Expected behavior
It should interpolate and THEN send the message further to the Slack API.

Escaping in any way, e.g. {{steps.my_step.\$return_value}} doesn't seem to make a difference.

I can't actually find the interpolation code in this repository here, it might be closed source as it's part of the product itself.
Given that other interpolations with {{}} work, my assumption is that somewhere it doesn't match $ correctly.

Screenshots

Setup:

scan_-_Build_-_Pipedream

error:

scan_-_Build_-_Pipedream
@joscha joscha added the bug Something isn't working label May 16, 2024
@vunguyenhung
Copy link
Collaborator

@joscha, would you mind sharing the whole text of your Text prop if possible?

I couldn't seem to reproduce your issue (given to reproduce steps that you provide)

image

@vunguyenhung vunguyenhung added the question Further information is requested label May 17, 2024
@joscha
Copy link
Contributor Author

joscha commented May 18, 2024

@vunguyenhung you can see the full text in the screenshot above (except for a sensitive URL which I have masked). Can you try this text? The URL itself without the interpolation containing $ works, so I don't suspect this to be the issue, but if you can still not reproduce it, I can send you the workflow ID via the pipedream support channel.

Update: I also noticed that there is an array access ([0]) in the same interpolation, maybe that makes a difference in combination with the $ and the error message is just not precise?

@vunguyenhung
Copy link
Collaborator

vunguyenhung commented May 18, 2024

@joscha Would escaping the backticks like this works for you?

* 🔎 scan of \`{{steps.code.$return_value}}\` started * - <http://www.example.com|This message *is* a link>

image

@joscha
Copy link
Contributor Author

joscha commented May 18, 2024

@joscha Would escaping the backticks like this works for you?

Oh, I wasn't aware the back ticks needed to be escaped. Apologies I had missed that they could be an issue.
I assumed they'd be sent verbatim as the text block was going to be processed. Escaping is not a problem at all, will the text still show up as inline code in Slack?
And can you make sense of the error message relating to the $? If this error message is constructed by pipedream it might make sense to improve it?

@vunguyenhung
Copy link
Collaborator

vunguyenhung commented May 18, 2024

@joscha the text shown like this in Slack (given my example)
image

And can you make sense of the error message relating to the $? If this error message is constructed by pipedream it might make sense to improve it?

This is related to Pipedream internals. Maybe @ctrlaltdylan has more context.

Hey @ctrlaltdylan, when you have time, could you do a check to see if we can improve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants