Clickups API has the option to send Markdown. (‘markdown_description’ instead of ‘description’)
how can i use this option in pipedream?
thanks
(also on a sidenote: how to make line breaks in a field between other variables?) thanks
Clickups API has the option to send Markdown. (‘markdown_description’ instead of ‘description’)
how can i use this option in pipedream?
thanks
(also on a sidenote: how to make line breaks in a field between other variables?) thanks
Hi @arne,
To send Markdown using ClickUp’s API in Pipedream, you can use the markdown_description
field when making an API request. Here’s an example Pipedream component that demonstrates how to send a Markdown description using ClickUp’s API:
import { axios } from "@pipedream/platform";
export default defineComponent({
props: {
clickup: {
type: "app",
app: "clickup",
},
listId: {
type: "string",
label: "List ID",
},
taskName: {
type: "string",
label: "Task Name",
},
markdownDescription: {
type: "string",
label: "Markdown Description",
},
},
async run({ steps, $ }) {
const url = `https://api.clickup.com/api/v2/list/${this.listId}/task`;
const data = {
name: this.taskName,
markdown_description: this.markdownDescription,
};
return await axios($, {
method: "POST",
url,
headers: {
Authorization: this.clickup.$auth.oauth_access_token,
},
data,
});
},
});
For line breaks between variables, you can use the newline character \n
in your string. For example:
const variable1 = "Hello";
const variable2 = "World";
const stringWithLineBreaks = `${variable1}\n\n${variable2}`;
This will create a string with a line break between the two variables.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.