Help installing a package.
rendivussolutions
FREEOP

10 months ago

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

NODE_FUNCTION_ALLOW_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

87 Replies

10 months 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

10 months ago

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


10 months ago

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


rendivussolutions
FREEOP

10 months ago

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


rendivussolutions
FREEOP

10 months ago

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


10 months ago

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


10 months ago

on your terminal


rendivussolutions
FREEOP

10 months ago

how do I get to the terminal

1434223219585454140


10 months ago

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


10 months ago

so n8n needs that? to parse the quill format


rendivussolutions
FREEOP

10 months ago

ye that's what chatgpt is telling me


rendivussolutions
FREEOP

10 months ago

I am receiving a quill formatted rich text from clickup


rendivussolutions
FREEOP

10 months ago

I've been trying to install it since yeserday


10 months 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

10 months 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


10 months ago

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


rendivussolutions
FREEOP

10 months ago

i figured


rendivussolutions
FREEOP

10 months ago

<:kekw:788259314607325204>


10 months 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.


10 months 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.


10 months 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

10 months ago

this above is the prompt I should give?


rendivussolutions
FREEOP

10 months ago

i guess it worked... idk

1434225676415664259


10 months ago

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


10 months ago

looks right to me


rendivussolutions
FREEOP

10 months ago

Good


rendivussolutions
FREEOP

10 months ago

how do I get the API endpoint 🤡


rendivussolutions
FREEOP

10 months ago

do I click deploy?

1434226150724599929


10 months ago

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

1434226454975090778


rendivussolutions
FREEOP

10 months ago

Okay I did that


rendivussolutions
FREEOP

10 months ago

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


10 months ago

Yeah, feel free to do so


rendivussolutions
FREEOP

10 months ago

ight its deployed


rendivussolutions
FREEOP

10 months ago

how do I figure the endpoint and which fields its expecting


10 months ago

there should be an URL under the source code editor


rendivussolutions
FREEOP

10 months ago

yeah I see it


10 months 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

10 months ago

english pls


rendivussolutions
FREEOP

10 months ago

😭


rendivussolutions
FREEOP

10 months 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

10 months ago

1434227842539065344


10 months ago

sorry, it's under the /convert endpoint path


10 months ago

can you get me an example of a quill payload?


rendivussolutions
FREEOP

10 months ago

wow


rendivussolutions
FREEOP

10 months ago

it worked


rendivussolutions
FREEOP

10 months ago

no it didnt


rendivussolutions
FREEOP

10 months ago

remove this fire reaction


rendivussolutions
FREEOP

10 months ago

1434228177269555471


10 months ago

give me a minute to know how the library works


rendivussolutions
FREEOP

10 months ago

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


10 months ago

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


rendivussolutions
FREEOP

10 months ago

yes... here or dm?


10 months ago

here please


rendivussolutions
FREEOP

10 months ago

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](https://media.discordapp.net/attachments/1434221933309722624/1434228755139920013/message.txt?ex=6907911d&is=69063f9d&hm=7d2b6d59316998d1ff763b503ef40b3b4505b9f94652da58e6c119289ca378d5&)

10 months ago

Ok, I see the issue now


rendivussolutions
FREEOP

10 months ago

i dont


10 months ago

what are the options on Specify body?


rendivussolutions
FREEOP

10 months ago

u mean this?

1434229420968640673


10 months ago

No, the option input below it


rendivussolutions
FREEOP

10 months ago

1434229543471939685


10 months ago

Select the option Using JSON


rendivussolutions
FREEOP

10 months ago

1434230065377443931


10 months ago

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


rendivussolutions
FREEOP

10 months ago

without the .toJsonString() ?


10 months ago

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


rendivussolutions
FREEOP

10 months ago

I just tried


rendivussolutions
FREEOP

10 months ago

in the screenshot above


rendivussolutions
FREEOP

10 months ago

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


10 months ago

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


rendivussolutions
FREEOP

10 months ago

whatu mean by template?


10 months ago

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


rendivussolutions
FREEOP

10 months ago

OOOOH


rendivussolutions
FREEOP

10 months ago

It worked


rendivussolutions
FREEOP

10 months ago

ye working perfectly


rendivussolutions
FREEOP

10 months ago

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


10 months ago

Great to hear that 😅

Anyway, do you've any more questions?


10 months ago

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


rendivussolutions
FREEOP

10 months ago

pricing


rendivussolutions
FREEOP

10 months ago

shit now everyone knows that


rendivussolutions
FREEOP

10 months ago

😭


rendivussolutions
FREEOP

10 months ago

are you afilliated with railway?


10 months ago

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


10 months ago

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


rendivussolutions
FREEOP

10 months ago

ok i'll stay just cuz you helped me alot


rendivussolutions
FREEOP

10 months ago

I didn't know you were affiliated with railway


10 months ago

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


10 months ago

!s


Status changed to Solved passos 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...