Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to send PAYLOAD_FILE in slack pipe

Aliaksandr Prytychanka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2024

pipelines: default:

- step: name: Notify Slack

script: - apt-get update && apt-get install gettext-base

- envsubst < "payload.json.template" > "payload.json"

- pipe: atlassian/slack-notify:2.3.0

variables:

WEBHOOK_URL: $WEBHOOK_URL

PAYLOAD_FILE: payload.json

CHANEEL: '#dev'

 

 

With these variables set and the exact correct payload.json.template of the correct format, the pipe crashes with an error


 

Digest: sha256:b198a727fadf804c850a76adb13e5bb7cc58c56c526dc6425d254cbc860d7ea0
83
Status: Downloaded newer image for bitbucketpipelines/slack-notify:2.3.0
84
INFO: Starting with payload provided in PAYLOAD_FILE...
85
INFO: Sending notification to Slack
86
✖ Notification failed. Pipe has finished with an error: Invalid URL '': No scheme supplied. Perhaps you meant https://?

Could you please advise how to make this work? Normal messages are sent

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 19, 2024

Hi @Aliaksandr Prytychanka . The error you provided points you with Invalid URL '' (empty string). 

Check/update the repository variable $WEBHOOK_URL you used in the pipe.

Regards, Igor

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events