Help installing a package.
rendivussolutions
FREEOP

a month 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

passos
MODERATOR

a month 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
FREEOP

a month ago

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


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

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


rendivussolutions
FREEOP

a month ago

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


passos
MODERATOR

a month ago

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


passos
MODERATOR

a month ago

on your terminal


rendivussolutions
FREEOP

a month ago

how do I get to the terminal

1434223219585454000


passos
MODERATOR

a month ago

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


passos
MODERATOR

a month ago

so n8n needs that? to parse the quill format


rendivussolutions
FREEOP

a month ago

ye that's what chatgpt is telling me


rendivussolutions
FREEOP

a month ago

I am receiving a quill formatted rich text from clickup


rendivussolutions
FREEOP

a month ago

I've been trying to install it since yeserday


passos
MODERATOR

a month 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
FREEOP

a month 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


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

i figured


rendivussolutions
FREEOP

a month ago

<:kekw:788259314607325204>


passos
MODERATOR

a month 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.


passos
MODERATOR

a month 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.


passos
MODERATOR

a month 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
FREEOP

a month ago

this above is the prompt I should give?


rendivussolutions
FREEOP

a month ago

i guess it worked… idk

1434225676415664400


passos
MODERATOR

a month ago

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


passos
MODERATOR

a month ago

looks right to me


rendivussolutions
FREEOP

a month ago

Good


rendivussolutions
FREEOP

a month ago

how do I get the API endpoint 🤡


rendivussolutions
FREEOP

a month ago

do I click deploy?

1434226150724599800


passos
MODERATOR

a month ago

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

1434226454975090700


rendivussolutions
FREEOP

a month ago

Okay I did that


rendivussolutions
FREEOP

a month ago

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


passos
MODERATOR

a month ago

Yeah, feel free to do so


rendivussolutions
FREEOP

a month ago

ight its deployed


rendivussolutions
FREEOP

a month ago

how do I figure the endpoint and which fields its expecting


passos
MODERATOR

a month ago

there should be an URL under the source code editor


rendivussolutions
FREEOP

a month ago

yeah I see it


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

english pls


rendivussolutions
FREEOP

a month ago

😭


rendivussolutions
FREEOP

a month 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
FREEOP

a month ago

1434227842539065300


passos
MODERATOR

a month ago

sorry, it's under the /convert endpoint path


passos
MODERATOR

a month ago

can you get me an example of a quill payload?


rendivussolutions
FREEOP

a month ago

wow


rendivussolutions
FREEOP

a month ago

it worked


rendivussolutions
FREEOP

a month ago

no it didnt


rendivussolutions
FREEOP

a month ago

remove this fire reaction


rendivussolutions
FREEOP

a month ago

1434228177269555500


passos
MODERATOR

a month ago

give me a minute to know how the library works


rendivussolutions
FREEOP

a month ago

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


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

yes… here or dm?


passos
MODERATOR

a month ago

here please


rendivussolutions
FREEOP

a month 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


passos
MODERATOR

a month ago

Ok, I see the issue now


rendivussolutions
FREEOP

a month ago

i dont


passos
MODERATOR

a month ago

what are the options on Specify body?


rendivussolutions
FREEOP

a month ago

u mean this?

1434229420968640800


passos
MODERATOR

a month ago

No, the option input below it


rendivussolutions
FREEOP

a month ago

1434229543471939600


passos
MODERATOR

a month ago

Select the option Using JSON


rendivussolutions
FREEOP

a month ago

1434230065377443800


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

without the .toJsonString() ?


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

I just tried


rendivussolutions
FREEOP

a month ago

in the screenshot above


rendivussolutions
FREEOP

a month ago

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


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

whatu mean by template?


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

OOOOH


rendivussolutions
FREEOP

a month ago

It worked


rendivussolutions
FREEOP

a month ago

ye working perfectly


rendivussolutions
FREEOP

a month ago

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


passos
MODERATOR

a month ago

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


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

pricing


rendivussolutions
FREEOP

a month ago

shit now everyone knows that


rendivussolutions
FREEOP

a month ago

😭


rendivussolutions
FREEOP

a month ago

are you afilliated with railway?


passos
MODERATOR

a month ago

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


passos
MODERATOR

a month ago

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


rendivussolutions
FREEOP

a month ago

ok i'll stay just cuz you helped me alot


rendivussolutions
FREEOP

a month ago

I didn't know you were affiliated with railway


passos
MODERATOR

a month ago

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


passos
MODERATOR

a month ago

!s


Status changed to Solved passos about 1 month ago


Loading...