KazuAlex / openpollslack

Open source poll slack app
69 stars 20 forks source link

Feature Request - Allow poll from workflow #49

Open mohammed-bamatraf opened 1 year ago

mohammed-bamatraf commented 1 year ago

Hi!

Thanks for this great tool! If you have the time to implement a feature to post polls from workflow I would highly appreciate it.

Thanks a lot!

illusional commented 1 year ago

Would be great, I tried hacking around the SimplePoll example template here, but not really sure what the field names should be for workflow.blueprint.steps[0]:

This steps snippet returns me the "OpenPoll" bit, but "This step is no longer available"

image
{
    "type": "extension_step",
    "id": "a6499bf3-6b1a-4421-a647-1c1fe13b315f",
    "config":
    {
        "app_action":
        {
            "name": "Create poll",
            "type": "workflow_step_edit",
            "payload": null,
            "action_id": "Aa01CGV1RJKB",
            "api_app_id": "A0162QE8600",
            "callback_id": "workflow_step_create_poll"
        },
        "app_defined_config":
        {
            "inputs":
            {
                "title":
                {
                    "value": "\"Are you thinking yes, or no?\" \"Yes!\" \"No\""
                },
                "channel_id":
                {
                    "value": "CBZHKH14N" // this doesn't matter, slack will reask you later
                }
            },
            "outputs":
            [
                {
                    "name": "poll_uuid",
                    "type": "text",
                    "label": "Poll UUID"
                },
                {
                    "name": "channel",
                    "type": "channel",
                    "label": "Channel"
                }
            ]
        }
    }
}
yeralin commented 4 months ago

Tried using "Send a message" with "/poll" command, but Slack does not recognize it.