Hey guys first time using n8n. Trying to get clickup comments posted to a slack channel when they have an image in them and words “Ready for design review”
Good news is that I was able to code this with help of chatgpt and the text is posting to the correct slack channel but the image is not appearing.
Since the image is from ClickUp comments maybe it is not publicly available to slack? Even if they are integrated with each other?
The output JSON doesnt appear to have the image URL:
[
{
“ok”: true,
“channel”: “C06EZ70UB41”,
“message”: {
“bot_id”: “B06KP97GG68”,
“type”: “message”,
“text”: “Sending design for review”,
“user”: “UR53NCJUX”,
“ts”: “1708398834.785669”,
“app_id”: “A016X0AT6QL”,
“blocks”: [
{
“type”: “rich_text”,
“block_id”: “FRA”,
“elements”: [
{
“type”: “rich_text_section”,
“elements”: [
{
“type”: “text”,
“text”: “Sending design for review”
}
]
}
]
}
],
“team”: “TR5DX44J2”,
“bot_profile”: {
“id”: “B06KP97GG68”,
“app_id”: “A016X0AT6QL”,
“name”: “n8n.cloud”,
“icons”: {
“image_36”: “https://avatars.slack-edge.com/2020-09-14/1367579227572_66b01b9e837bfefc79ac_36.png”,
“image_48”: “https://avatars.slack-edge.com/2020-09-14/1367579227572_66b01b9e837bfefc79ac_48.png”,
“image_72”: “https://avatars.slack-edge.com/2020-09-14/1367579227572_66b01b9e837bfefc79ac_72.png”
},
“deleted”: false,
“updated”: 1708397176,
“team_id”: “TR5DX44J2”
}
},
“message_timestamp”: “1708398834.785669”
}
]
This is the block code for the slack module pulling the data from prior ClickUp nodule fields
[
{
“type”: “section”,
“text”: {
“type”: “mrkdwn”,
“text”: “{{ $json.history_items[0].comment.comment[1].text }}”
}
},
{
“type”: “image”,
“image_url”: “{{ $json.history_items[0].comment.comment[0].attachment.url }}”,
“alt_text”: “Design Image”
}
]
If so I assume that a work around is needed via downloading the image from Clickup and uploading to slack
" * Fetching Images: If the images are attached to ClickUp comments and not publicly accessible, you’ll need to use the ClickUp API to fetch these images. This might involve downloading the image to a server or cloud function where you can then upload it to Slack.
- Uploading to Slack: After fetching the image, use Slack’s
files.upload
API to upload the image. In n8n, this might require configuring an HTTP Request node to perform the upload operation to Slack, including handling authentication and multipart/form-data encoding for the file."