First off, welcome to the Pipedream community. Happy to have you!
To return data to the next steps and solve the issue SyntaxError: 'return' outside of function. (55:0), you need to put the return statement to the run() prop in the default export function, for example:
// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
async run({ steps, $ }) {
// Return data to use it in future steps
return { todos: getTodos() }
},
})
Hello @lippiece, I believe the error Error: EISDIR: illegal operation on a directory is not really related to Pipedream platform. For me to help further, could you explain the logic behind your code, as well as the sample input and expected output?
It takes a string as input (my Obsidian note with tasks), then it finds specific start and endpoints with regex and returns an array of strings (current tasks) each consisting of everything between a start and an endpoint.
Input:
blah blah blah
- [x] Wash dishes
- [] Find the vault chip
- [] Kill boss
blah blah
@lippiece thanks for the information. I see that your code refer to the Workflow tmp dir to get the original notes, would you mind explaining how you upload your Obsidian notes with task to the workflow tmp dir?
I had the same question. It is possible that both use same product for managing community forum. Even then, there are so many similarities between n8n and pipedream.
Overall I liked pipedream better. Though would not say to no graphical workflow visualiser in n8n.
With respect to your other question on debugging. You can use print or console.log statements to debug. At leas thats what I do
Those statements will appear in the Logs section in your code step. They’re very useful for watching the state of variables as they change through your code step’s flow.
Didn’t mean to accuse of anything in the first question. I’m just taking my first steps into programming and didn’t know about the Discourse.
If this is appropriate, it would be a great pleasure to have code editors integration or at least formatting support (please tell if I missed it). Often I found myself just logging a sample of data my workflow is working with and copying it to the editor I’m using, writing the code there, then copying it back into Pipedream. The interface here is indeed supportive of it and the copy buttons near the logs are very handy, although lack of formatting options leaves the sense of something unfinished.
Yes, we’re working on the ability to serialize workflows into code, so that way you can sync Pipedream workflows with Github and edit in your own IDE of choice.
That will be a huge announcement when it’s ready so stay tuned!