Best answer

Webhook to ClickUp API with dynamic task_id


Hi

I’m trying to automate renaming the tasks with some standard naming convention as they are created. I’m trying to use the ClickUp automation webhooks with Zapier integration.

I tested the ClickUp API with cURL to rename the task with the task_id. How do I automate this POST call with Zapier as I will not know the task_id?.

In short, how do I get the ClickUp task_id as they are created and pass the task_id to the POST call for renaming the task with the help of Zaiper?

 

Thanks in advance!

icon

Best answer by Troy Tessalone 3 June 2021, 21:02

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

10 replies

Userlevel 7
Badge +14

Hi @clickzap 

Are you able to use ClickUp’s native automations to rename the Tasks?

https://docs.clickup.com/en/articles/3904901-automations

Hi @Troy Tessalone

Yes tried, ClickUp doesn’t have this basic function to rename through automation!.

Userlevel 7
Badge +14

@clickzap 

Per ClickUp’s documentation for the Call Webhook Automation Action: https://docs.clickup.com/en/articles/3904933-automation-actions

 

The ID highlighted below is what should be mapped to the Zap step.

 

Call webhook

This lets you connect ClickUp with literally any application.
Simply paste the URL you want called. When a task Triggers an Automation, we'll send task details in the webhook payload.
This lets you easily access data from ClickUp Automations in your own application!

 

Note: The webhook endpoint provided must promptly resolve with a successful HTTP status code.
If the timeout is exceeded on too many occurrences, the automation will be disabled.

 

Below is an example response with all the data available:

{ 
body: {
date: "2020-04-28T17:12:12.408Z",
id: "61826c6c-f5db-4cb8-8227-5ad1a3165883",
payload: {
archived: false,
assignees: [],
checklists: [],
creator: {
id: 123456,
username: "Josh",
color: "#08c7e0",
email: "user@clickup.com",
profilePicture: "https://website.com/Pictures/123456_HHK.jpg"
},
custom_fields: [],
date_closed: null,
date_created: "1588051179885",
date_updated: "1588093930834",
dependencies: [],
description: null,
due_date: null,
folder: {
id: "55200004",
name: "Automations",
hidden: false,
access: true
},
id: "p1u1x0",
linked_tasks: [],
list: {
id: "12345678",
name: "Automation Webhooks",
access: true
},
name: "Webhooks!",
orderindex: "-0.0234354635389856960000000000000000",
parent: null,
priority: null,
project: {
id: "12345678",
name: "Test",
hidden: false,
access: true
},
space: {
id: "12345678"
},
start_date: null,
status: {
status: "active",
color: "#000000",
orderindex: 1,
type: "custom"
},
tags: [],
team_id: "123456",
text_content: null,
time_estimate: null,
url: "https://app.clickup.com/t/p1u1x0",
watchers: []
},
trigger_id: "61826c6c-f5db-4cb8-8227-5ad1a3165883"
}
}

@Troy Tessalone Thanks for replying. Still not exactly sure how to configure at zap. Please look at this, what should I replace this {task_id} with?. This task_id will be generated once the ticket is created.
 

 

Userlevel 7
Badge +14

@clickzap 

You need to map the CU Task ID from the trigger step to replace {task_id}

 

@Troy Tessalone - Yes, at the Zap trigger section, during test, it listed one of the available task_id. If I hard-code this task_id from the trigger in this action for PUT call, won’t it always rename the single task whenever the task is created at ClickUp?

Userlevel 7
Badge +14

@clickzap 

Check out this help article about dynamically mapping variables between Zap steps using the ‘Custom’ option in a field: https://zapier.com/help/create/basics/set-up-your-zap-action#set-up-your-action

 

Userlevel 7
Badge +14

@clickzap 

Here are other Zapier articles about the basics of creating Zaps: https://zapier.com/help/create/basics

@Troy Tessalone Thanks for sharing. I got the zap action success now every time I create a task in ClickUp and ClickUp seems to trigger the webhook link. But not sure why it’s not actually renaming the task. I see the same old task name which was used during task creation.

Here is the zap history,

 

This is how the Automation is in ClickUp,

 

I got it, it’s working now. It’s works with general PUT request but not with Custom Request which I was trying before.

Thanks @Troy Tessalone!