PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.82k stars 5.27k forks source link

[APP] iLovepdf #2438

Open LucBerge opened 2 years ago

LucBerge commented 2 years ago

Name of app / service iLovepdf

Link to developer documentation https://developer.ilovepdf.com/

Is lack of support preventing you from building workflows, or do you have a workaround? No

Are there specific actions, or triggers, you'd like to see for this app? Actions:

dannyroosevelt commented 2 years ago

Thanks for submitting the request, @LucBerge. Unfortunately we don't currently support JWT authentication, so we can't integrate the app at this time.

LucBerge commented 2 years ago

Ok it's sade. While blocked on jwt, I'll use a custom Node.js code with my credentials in params. Thanks

LucBerge commented 1 year ago

Hello @dylburger , I have been able to compress a file using the following code:

import fs from 'fs';
import ILovePDFApi from '@ilovepdf/ilovepdf-nodejs';
import ILovePDFFile from '@ilovepdf/ilovepdf-nodejs/ILovePDFFile.js';

export default defineComponent({
  async run({ steps, $ }) {
    const instance = new ILovePDFApi(
      'project_public',
      'secret_key'
    );

    let task = instance.newTask('compress');    
    await task.start();
    await task.addFile(new ILovePDFFile('/tmp/test.pdf'));
    await task.process({ compression_level: 'extreme' });    
    const data = await task.download();
    await fs.writeFileSync('/tmp/compressed.pdf', data);
  },
})

I don't really understand what makes pipedream blocked on JWT?

If you cannot save the auth token, maybe you can save the public and secret key as a temporary bypass?

dannyroosevelt commented 1 year ago

cc @malexanderlim ^

malexanderlim commented 1 year ago

Hi @LucBerge, I've set up the scaffolding so that you can save your public and secret key for the iLovePDF app.

Can you let me know if this works for you? https://pipedream.com/apps/ilovepdf

LucBerge commented 1 year ago

Can you let me know if this works for you?

@malexanderlim Working perfectly. Thank you.

What makes pipedream block on JWT?