• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

この機械翻訳は、参考として提供されています。

英語版と翻訳版に矛盾がある場合は、英語版が優先されます。詳細については、このページを参照してください。

問題を作成する

Slackメッセージを送信する

|View as Markdown (English)

アクション識別子はnewrelic.notification.sendSlackです。

Destinationsと統合して、チャンネルにSlackメッセージを送信します。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

宛先ID

弦

必須。

New Relicの宛先に関連付けられたDestinationId。宛先を設定してそのIDを取得するには

NerdGraphチュートリアル:アラートの宛先

を、詳細については

宛先

を参照してください。

123e4567-e89b-12d3-a456-426614174000

テキスト

弦

オプション。

送信するテキストメッセージ。

text

または

blocks

のいずれかを指定します。両方を指定することはできません。

Hello from Workflow Automation

blocks

リスト

オプション。

Slack Block Kit要素のJSON配列。

サポートされているブロックタイプ

を参照してください。

text

または

blocks

のいずれかを指定してください。両方を指定することはできません。

[{"type":"section","text":{"type":"mrkdwn","text":"*Hello*"}},{"type":"divider"}]

チャネル

弦

必須。

メッセージを送信するチャネル名。

help-nomad

スレッドT

弦

オプション。

スレッドに返信を投稿するために使用される、親メッセージのタイムスタンプ。

1770206770.789949

selectors

リスト

オプション。

出力から特定のフィールドを抽出するためのセレクター。

[{"name": "success", "expression": ".success"}]

サポートされているブロックタイプ

sendSlack アクションは2つのブロックタイプのみをサポートし、検証時にそれ以外を拒否します。

ブロックタイプ

説明

許可されたキー

例

section

テキストをレンダリングする唯一のブロックタイプです。

text

オブジェクトの

type

は

mrkdwn

または

plain_text

のいずれかである必要があり、

text

は空白以外の文字列である必要があります。

type

,

text

{"type":"section","text":{"type":"mrkdwn","text":"*Service:* checkout-api"}}

divider

視覚的な水平線をレンダリングします。

type

{"type":"divider"}

詳細については、Slack Block KitリファレンスおよびSlack Block Kitビルダーをご覧ください。

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true/false

sessionId

弦

"sessionId": "7fa97f26-3791-492e-a39b-53793163dfb9"

errorMessage

弦

"Channel is a required field in the notification send"

ワークフローの例:テキストメッセージ

name: slack_notification_workflow
description: This is a test workflow to test slack notification send action
steps:
- name: SendMessageUsingSlackChannel
type: action
action: newrelic.notification.sendSlack
version: 1
inputs:
destinationId: xxxx-ed6f-xxxx-bc7d-b7ea982xxxx
text: Hi , Testing notifcation api using slack channel name
channel: test-channel-workflow

ワークフローの例:Block Kitブロック

name: slack_notification_workflow
description: This is a test workflow to test slack notification send action
steps:
- name: sendSlackBlocks
type: action
action: newrelic.notification.sendSlack
version: '1'
inputs:
destinationId: xxxx-ed6f-xxxx-bc7d-b7ea982xxxx
channel: test-channel-workflow
blocks:
- type: section
text:
type: mrkdwn
text: "Investigation complete"
- type: divider
- type: section
text:
type: plain_text
text: "All systems normal"
Copyright © 2026 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.