Help installing a package.

rendivussolutions
PROOP

11 days ago

I've been trying to install a package called quill-delta-to-html. I tried to add variables to in my railway dashboard:

NODEFUNCTIONALLOW_EXTERNAL=quill-delta-to-html

but it looks like it doesn't work. The reason I need this package is that ClickUp api is giving me a RichText in quill delta format.

Solved

0 Replies

11 days ago

As answered through DMs, you'll need to install through NPM
https://www.npmjs.com/package/quill-delta-to-html

*I'm guessing that you're using nodejs


rendivussolutions
PROOP

11 days ago

Ye… the problem is that I don't know how to install that…


11 days ago

when opening that page there'll be a install command you can run


rendivussolutions
PROOP

11 days ago

I tried adding the variable and chatgpt/gemini couldn't give me a working guide for that


rendivussolutions
PROOP

11 days ago

I understand, but where do I run this command? 😭


11 days ago

but it is npm install quill-delta-to-html


11 days ago

on your terminal


rendivussolutions
PROOP

11 days ago

how do I get to the terminal

1434223219585454000


11 days ago

oh you're on a n8n environment, sorry for that


11 days ago

so n8n needs that? to parse the quill format


rendivussolutions
PROOP

11 days ago

ye that's what chatgpt is telling me


rendivussolutions
PROOP

11 days ago

I am receiving a quill formatted rich text from clickup


rendivussolutions
PROOP

11 days ago

I've been trying to install it since yeserday


11 days ago

chatgpt is also assuming what I was assuming, that you're on a normal nodejs project with access to the terminal (basically, writing your own code)


rendivussolutions
PROOP

11 days ago

Ye but I told chatgpt I am on railway so it asked me to add some variables which I did but still didn't work


11 days ago

don't trust chatgpt with Railway, it always gives wrong answers


rendivussolutions
PROOP

11 days ago

i figured


rendivussolutions
PROOP

11 days ago

<:kekw:788259314607325204>


11 days ago

unfortunately I don't know how to proceed here as I'm unfamiliar with n8n but I would assume that it has someway of parsing that built-in, if not then you're unlucky here.


11 days ago

I see a way of implementing this: you could create a Railway function (Railway has a built-in AI) where n8n calls that function, the function parses it, and then you process the response in n8n.


11 days ago

The flow would look like:

  1. Create an n8n node to call an external API/endpoint.

  2. Create a function on Railway (https://docs.railway.com/reference/functions).

  3. Use the Railway's AI and tell it to write a code where it uses quill-delta-to-html package to parse an external payload through an API endpoint.

  4. Copy the public endpoint URL from that function and then use it in the first node we created.


rendivussolutions
PROOP

11 days ago

this above is the prompt I should give?


rendivussolutions
PROOP

11 days ago

i guess it worked… idk

1434225676415664400


11 days ago

that's steps you should follow, no AI at the moment can do that automatically.


11 days ago

looks right to me


rendivussolutions
PROOP

11 days ago

Good


rendivussolutions
PROOP

11 days ago

how do I get the API endpoint 🤡


rendivussolutions
PROOP

11 days ago

do I click deploy?

1434226150724599800


11 days ago

There should be the "Apply Changes" popup. Also, make sure that you save the code by clicking the save button.

1434226454975090700


rendivussolutions
PROOP

11 days ago

Okay I did that


rendivussolutions
PROOP

11 days ago

can I change this lame "function-bun" name?


11 days ago

Yeah, feel free to do so


rendivussolutions
PROOP

11 days ago

ight its deployed


rendivussolutions
PROOP

11 days ago

how do I figure the endpoint and which fields its expecting


11 days ago

there should be an URL under the source code editor


rendivussolutions
PROOP

11 days ago

yeah I see it


11 days ago

and from the looks of it, it seems to just accept a JSON payload and parse it or under the property ops


rendivussolutions
PROOP

11 days ago

english pls


rendivussolutions
PROOP

11 days ago

😭


rendivussolutions
PROOP

11 days ago

{ "body": { "test": "test" }, "headers": { "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/;q=0.9, image/;q=0.8, /;q=0.7" }, "method": "POST", "uri": "hidden", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "followAllRedirects": true, "timeout": 300000, "encoding": null, "json": false, "useStream": true }


rendivussolutions
PROOP

11 days ago

1434227842539065300


11 days ago

sorry, it's under the /convert endpoint path


11 days ago

can you get me an example of a quill payload?


rendivussolutions
PROOP

11 days ago

wow


rendivussolutions
PROOP

11 days ago

it worked


rendivussolutions
PROOP

11 days ago

no it didnt


rendivussolutions
PROOP

11 days ago

remove this fire reaction


rendivussolutions
PROOP

11 days ago

1434228177269555500


11 days ago

give me a minute to know how the library works


rendivussolutions
PROOP

11 days ago

how do u feel solving a problem not even geminig and chatgpt could


11 days ago

also, are you able to send me your quill payload + the source code for the function?


rendivussolutions
PROOP

11 days ago

yes… here or dm?


11 days ago

here please


rendivussolutions
PROOP

11 days ago

```import { Hono } from "hono";
import { QuillDeltaToHtmlConverter } from "quill-delta-to-html";

const app = new Hono();

app.post("/convert", async (c) => {
try {
const payload = await c.req.json();
const converter = new QuillDeltaToHtmlConverter(payload.ops || [], {});
const html = converter.convert();

return c.json({
  html: html,
  success: true
});

} catch (error) {
return c.json({
error: error instanceof Error ? error.message : "Unknown error",
success: false
}, 400);
}
});

Bun.serve({
port: Bun.env.PORT ?? 3000,
fetch: app.fetch
});```

1434228755139920013


11 days ago

Ok, I see the issue now


rendivussolutions
PROOP

11 days ago

i dont


11 days ago

what are the options on Specify body?


rendivussolutions
PROOP

11 days ago

u mean this?

1434229420968640800


11 days ago

No, the option input below it


rendivussolutions
PROOP

11 days ago

1434229543471939600


11 days ago

Select the option Using JSON


rendivussolutions
PROOP

11 days ago

1434230065377443800


11 days ago

Then, just pass the n8n template directly e.g. {{ $json.custom_fields <..> }}


rendivussolutions
PROOP

11 days ago

without the .toJsonString() ?


11 days ago

try with the .toJsonString, if it still doesn't work remove it


rendivussolutions
PROOP

11 days ago

I just tried


rendivussolutions
PROOP

11 days ago

in the screenshot above


rendivussolutions
PROOP

11 days ago

and without it it says "JSON parameter needs to be valid JSON"


11 days ago

but then you're passing the "quill-data" and all of that, I meant to only pass the template directly


rendivussolutions
PROOP

11 days ago

whatu mean by template?


11 days ago

by template I mean this: {{ $json.custom_fields[2].value_richtext.toJsonString() }}. Just fill that on the input and nothing else.


rendivussolutions
PROOP

11 days ago

OOOOH


rendivussolutions
PROOP

11 days ago

It worked


rendivussolutions
PROOP

11 days ago

ye working perfectly


rendivussolutions
PROOP

11 days ago

i take back everything I said about LLM taking human programmer jobs


11 days ago

Great to hear that 😅
Anyway, do you've any more questions?


11 days ago

Also, about your DMs, any particular reason why you would be migrating away from Railway?


rendivussolutions
PROOP

11 days ago

pricing


rendivussolutions
PROOP

11 days ago

shit now everyone knows that


rendivussolutions
PROOP

11 days ago

😭


rendivussolutions
PROOP

11 days ago

are you afilliated with railway?


11 days ago

That's not a problem, we would really like to keep you on Railway.


11 days ago

For example, you wouldn't be able to keep the support you had right now as a DigitalOcean customer.


rendivussolutions
PROOP

11 days ago

ok i'll stay just cuz you helped me alot


rendivussolutions
PROOP

11 days ago

I didn't know you were affiliated with railway


11 days ago

Great to hear, let me know if you've any other issues! will be closing this thread


11 days ago

!s


Status changed to Solved passos 11 days ago


Loading...