Skip to main content

A little help with a script to trigger a webhook

  • August 11, 2020
  • 29 replies
  • 454 views

Show first post
This topic has been closed for replies.

29 replies

siliceous
Forum|alt.badge.img+7
  • Inspiring
  • November 14, 2022

Hi @Justin_Barrett

Thanks for this awesome thread. I am trying to get the output on running a script that gets the folder names in Clickup, but I can’t seem to get the output code to work.

The code from Clickup’s API works when tested:

const query = new URLSearchParams({archived: 'false'}).toString();

const spaceId = 'YOUR_space_id_PARAMETER';
const resp = await fetch(
  `https://api.clickup.com/api/v2/space/${spaceId}/folder?${query}`,
  {
    method: 'GET',
    headers: {Authorization: 'test'}
  }
);

const data = await resp.text();
console.log(data);

but the output.set code doesn’t seem to fit in anywhere (red error). I’ve tried variations of the code but it isn’t successful when testing. Does anyone know how I can get the output with the code above?


Justin_Barrett
Forum|alt.badge.img+21

Hi @Justin_Barrett

Thanks for this awesome thread. I am trying to get the output on running a script that gets the folder names in Clickup, but I can’t seem to get the output code to work.

The code from Clickup’s API works when tested:

const query = new URLSearchParams({archived: 'false'}).toString();

const spaceId = 'YOUR_space_id_PARAMETER';
const resp = await fetch(
  `https://api.clickup.com/api/v2/space/${spaceId}/folder?${query}`,
  {
    method: 'GET',
    headers: {Authorization: 'test'}
  }
);

const data = await resp.text();
console.log(data);

but the output.set code doesn’t seem to fit in anywhere (red error). I’ve tried variations of the code but it isn’t successful when testing. Does anyone know how I can get the output with the code above?


Please share an example of what you’ve tried so far. It’s hard to know what to recommend without seeing what you’ve already attempted.


siliceous
Forum|alt.badge.img+7
  • Inspiring
  • November 15, 2022

Please share an example of what you’ve tried so far. It’s hard to know what to recommend without seeing what you’ve already attempted.


Hi Justin,

What I wanted was to do was to output the response of the script and I’ve managed to figure it out. Thanks for taking the time to reply.


Forum|alt.badge.img+2
  • New Participant
  • June 30, 2023

Welcome to the community, @KMU_Project! :grinning_face_with_big_eyes: Did you create a recordID input variable and assign it to be the record ID of the triggering record?


I have this exact same issue, how do I create a recordID input variable for the record ID of the triggered variable?

 

Thanks