Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for using an input JSON file #288

Open
atc0005 opened this issue Mar 14, 2023 · 1 comment
Open

Add support for using an input JSON file #288

atc0005 opened this issue Mar 14, 2023 · 1 comment
Assignees
Labels
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Mar 14, 2023

Potential scenarios:

  1. Use the input file as an attachment array entry.
{
    "type": "message",
    "attachments": [
        {
            // input file content here
        }
    ]
}
  1. Use the input file as-is.
@atc0005 atc0005 added enhancement New feature or request command-line config labels Mar 14, 2023
@atc0005 atc0005 added this to the Future milestone Mar 14, 2023
@atc0005 atc0005 self-assigned this Mar 14, 2023
@atc0005
Copy link
Owner Author

atc0005 commented Mar 14, 2023

Using this feature, we would effectively have the equivalent of:

#!/bin/bash

webhook_url="https://outlook.office365.com/webhook/a1269812-6d10-44b1-abc5-b84f93580ba0@9e7b80c7-d1eb-4b52-8582-76f921e416d9/IncomingWebhook/3fdd6767bae44ac58e5995547d66a4e4/f332c8d9-3397-4ac5-957b-b8e3fc465a8c"

curl \
    -X POST \
    -H "Content-type: application/json" \
    -d @/tmp/teams-message.json \
    "${webhook_url}"

I borrowed the sample webhook connector URL for illustration purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant