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

Notification for MS team Channel Support #457

Closed
Arunk28 opened this issue Sep 24, 2021 · 7 comments
Closed

Notification for MS team Channel Support #457

Arunk28 opened this issue Sep 24, 2021 · 7 comments
Assignees
Labels
feature In-app feature

Comments

@Arunk28
Copy link

Arunk28 commented Sep 24, 2021

Hi I Have seen slack integration and hook integration
but Microsoft team support incoming hooks but it follows some rules
due to that i am getting 400 BAD request

@ImanMahmoudinasab
Copy link
Contributor

@agoldis
To provide more details, here is some info you may found helpful:

Create and send messages

an example of sending a message to the Team:

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "themeColor": "0076D7",
    "summary": "Larry Bryant created a new task",
    "sections": [{
        "activityTitle": "Larry Bryant created a new task",
        "activitySubtitle": "On Project Tango",
        "activityImage": "https://teamsnodesample.azurewebsites.net/static/img/image5.png",
        "facts": [{
            "name": "Assigned to",
            "value": "Unassigned"
        }, {
            "name": "Due date",
            "value": "Mon May 01 2017 17:07:18 GMT-0700 (Pacific Daylight Time)"
        }, {
            "name": "Status",
            "value": "Not started"
        }],
        "markdown": true
    }],
    "potentialAction": [{
        "@type": "ActionCard",
        "name": "Add a comment",
        "inputs": [{
            "@type": "TextInput",
            "id": "comment",
            "isMultiline": false,
            "title": "Add a comment here for this task"
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Add comment",
            "target": "https://docs.microsoft.com/outlook/actionable-messages"
        }]
    }, {
        "@type": "ActionCard",
        "name": "Set due date",
        "inputs": [{
            "@type": "DateInput",
            "id": "dueDate",
            "title": "Enter a due date for this task"
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Save",
            "target": "https://docs.microsoft.com/outlook/actionable-messages"
        }]
    }, {
        "@type": "OpenUri",
        "name": "Learn More",
        "targets": [{
            "os": "default",
            "uri": "https://docs.microsoft.com/outlook/actionable-messages"
        }]
    }, {
        "@type": "ActionCard",
        "name": "Change status",
        "inputs": [{
            "@type": "MultichoiceInput",
            "id": "list",
            "title": "Select a status",
            "isMultiSelect": "false",
            "choices": [{
                "display": "In Progress",
                "value": "1"
            }, {
                "display": "Active",
                "value": "2"
            }, {
                "display": "Closed",
                "value": "3"
            }]
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Save",
            "target": "https://docs.microsoft.com/outlook/actionable-messages"
        }]
    }]
}

will send this message:
ms team message

@agoldis agoldis self-assigned this Sep 24, 2021
@agoldis agoldis added the feature In-app feature label Sep 24, 2021
@scottux
Copy link

scottux commented Oct 4, 2021

Using postman I found that the body must contain a "Text" or "Summary" field. So a generic webhook isn't going to cut it.

@mkonkolowicz
Copy link

Hi @agoldis , what level of priority is this feature set at? Wondering if we should do it our own way, or if it will be added soon?

@scottux
Copy link

scottux commented Oct 5, 2021

I have started to add this feature, starting with the dashboard to be able to edit and update the teams hook. I have a branch with the form and graphql updates. Next step is to make the payload when we trigger the hook. I will make a PR when I get it working fully.

@ImanMahmoudinasab
Copy link
Contributor

@scottux just a side note, please be in contact with @karimould as he may start migrating hooks view to MUI (#401) .
You can join the slack channel to send/get updates.

@scottux
Copy link

scottux commented Oct 5, 2021

Good to know! Thanks @ImanMahmoudinasab I will join the slack channel as soon as I get a chance.

@agoldis
Copy link
Collaborator

agoldis commented Oct 7, 2021

Implemented in #463 . Awesome work @scottux! Thanks a lot!

@agoldis agoldis closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature In-app feature
Projects
None yet
Development

No branches or pull requests

5 participants