Skip to content

咨询-纯文本消息应该如何转发 #46

@hellofreud

Description

@hellofreud

我使用了一个服务,他默认通过文本形式发送webhook,我目前配置了,但是没有生效,请问应该如何配置环境变量以捕获这种纯文本消息呢?

hook-lark.yaml
- id: lark execute-command: ./send-lark-message.sh command-working-directory: /app include-command-output-in-response: true include-command-out-in-response-on-error: true pass-environment-to-command: - source: url name: text body: TEXT

`#!/bin/sh

if [ -n "$TEXT" ]; then
curl -X POST -H "Content-Type: application/json" --data {"msgtype":"text","text":{"content":"$TEXT"}}
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=***
echo "Send message successfully".
else
echo "TEXT is empty"
fi`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions