slack-github-action icon indicating copy to clipboard operation
slack-github-action copied to clipboard

Technique 1 example slack workflow manifest.json is cannot be to imported to Slack

Open KnightArthurRen opened this issue 9 months ago • 1 comments

Hey guys, as titled I'm trying to implement my take of technique 1 (t1) and I'm having trouble setup the example. I downloaded the example json file here and tried to import it to Slack and it'd result in an error here

Image

I'm using Mac's Slack App Version 4.42.120 5e9f8b1b22b5bcc523270907d32d126099e9a899@1741742249 (Production)

Thank you!

KnightArthurRen avatar Mar 12 '25 21:03 KnightArthurRen

Hey @KnightArthurRen! 👋 Apologies for a late reply and for an unexpected error here-

This isn't clear in these examples at the moment, but the manifest.json linked and related trigger.json file can be used to create an app with the demonstrated workflow, but not be imported which you've found 🐛

While it's possible to use additional tools for this, I might suggest using these inputs and steps as reference when setting up a workflow specific to your team for now 🤖

I think we can use this issue to make some enhancements though:

  • Adding a workflow.json or similar file with an exported version of this workflow seems most interesting! 📚 ✨
  • Adding more details around these sections on the docs also seems like a nice improvement too 🏷

A quick pass at exporting a similar manifest and adjusting some values returned the following for me, but I'm not having much luck importing to other workspaces right now:

builds.workflow.json
{
  "workflow": {
    "title": "Build outputs",
    "description": "Write details of the most recent build",
    "icon": "",
    "input_parameters": {
      "task": {
        "type": "string",
        "name": "task",
        "description": "task",
        "title": "task",
        "is_hidden": false
      },
      "status": {
        "type": "string",
        "name": "status",
        "description": "status",
        "title": "status",
        "is_hidden": false
      },
      "errors": {
        "type": "string",
        "name": "errors",
        "description": "errors",
        "title": "errors",
        "is_hidden": false
      },
      "runner": {
        "type": "string",
        "name": "runner",
        "description": "runner",
        "title": "runner",
        "is_hidden": false
      }
    },
    "steps": [
      {
        "function_id": "Fn0102",
        "inputs": {
          "message": {
            "hidden": false,
            "locked": false,
            "value": [
              {
                "type": "rich_text",
                "elements": [
                  {
                    "type": "rich_text_section",
                    "elements": [
                      {
                        "id": "{{inputs.task}}",
                        "type": "workflowtoken",
                        "property": "",
                        "data_type": "string"
                      },
                      {
                        "text": ": ",
                        "type": "text"
                      },
                      {
                        "id": "{{inputs.status}}",
                        "type": "workflowtoken",
                        "property": "",
                        "data_type": "string"
                      },
                      {
                        "text": "\n",
                        "type": "text"
                      }
                    ]
                  },
                  {
                    "type": "rich_text_quote",
                    "elements": [
                      {
                        "id": "{{inputs.errors}}",
                        "type": "workflowtoken",
                        "property": "",
                        "data_type": "string"
                      },
                      {
                        "text": "\n",
                        "type": "text"
                      },
                      {
                        "name": "robot_face",
                        "type": "emoji",
                        "unicode": "1f916"
                      },
                      {
                        "text": " ",
                        "type": "text"
                      },
                      {
                        "id": "{{inputs.runner}}",
                        "type": "workflowtoken",
                        "property": "",
                        "data_type": "string"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          "channel_id": {
            "hidden": false,
            "locked": false,
            "value": "C0123456789"
          }
        }
      }
    ]
  },
  "triggers": [
    {
      "name": "Build outputs",
      "type": "webhook",
      "inputs": {
        "errors": {
          "value": "{{data.errors}}",
          "locked": false,
          "hidden": false
        },
        "task": {
          "value": "{{data.task}}",
          "locked": false,
          "hidden": false
        },
        "runner": {
          "value": "{{data.runner}}",
          "locked": false,
          "hidden": false
        },
        "status": {
          "value": "{{data.status}}",
          "locked": false,
          "hidden": false
        }
      },
      "webhook": {
        "schema": {
          "errors": {
            "type": "string",
            "title": "errors",
            "name": "errors",
            "is_hidden": false,
            "is_required": false
          },
          "task": {
            "type": "string",
            "title": "task",
            "name": "task",
            "is_hidden": false,
            "is_required": false
          },
          "runner": {
            "type": "string",
            "title": "runner",
            "name": "runner",
            "is_hidden": false,
            "is_required": false
          },
          "status": {
            "type": "string",
            "title": "status",
            "name": "status",
            "is_hidden": false,
            "is_required": false
          }
        }
      }
    }
  ]
}

If you find luck with this or a similar example, I'd love to know! Otherwise more debugging might be in order :saluting_face:

I'm also hoping this are somewhat useful details, but please let me know of strangeness otherwise setting up a workflow or other questions 👾

zimeg avatar Apr 04 '25 01:04 zimeg