Skip to main content

Hi! I have followed the instructions here to allow employees to trigger new incidents from Slack. The title and details fields work, but I cannot get the Priority field to work, and it is essential. This is how I have it configured:

 

The Slack Form in Step 4 has 3 fields:

Title: Short Answer

Details: Short Answer

Priority: Select List with 5 options:
P1

P2

P3

P4

P5

 

And in Step 6.v I map the PD Priority field to the Variable provided by my Form for its Priority field.

However, upon submitting, I receive this error back from PagerDuty:

{"error":{"message":"Invalid Input Provided","code":2001,"errors":""Priority id must be a valid ID."]}}

I am unable to see the specific HTTP payload to examine the data. I have also reached out to Slack support but would love to know the requirements of the PD API in this scenario, and how it is expected to work with the Slack Workflow Builder.

 

Thank you!!

 

Hi ​@jim4r 

I’ve seen this message pop up when an account didn’t have Priorities enabled or defined. Are you currently able to set the priority of your incidents in the webui as well? They’re in a box at the top right of the incident page.

 

If that Priority drop down is missing, your account owner can enable Priorities under Account Settings. More in the docs here.

If you do have that dropdown, the selections you add to your Slack form need to match what shows up in that drop down to be accepted via the API.

Let us know here what you find and we’ll keep looking.

 

HTH,

--mandi


Hi Mandi! Thank you for the quick response!

 

I do have the (default) P1-P5 priorities set up on the PagerDuty service being called, and can set them via the PD Web UI. And I made sure that they matched exactly in the Slack Workflow Builder form (P1, P2, etc)

 

What do you think?


For reference, here are a few pictures of the configuration in PD and Slack:

 

 


@jim4r 

I’ll ask around. I suspect this has to do with the way priorities are stored as objects on the PagerDuty side. Each priority is its own individual object with an object ID, similar to the IDs that services and users have. I’m not sure what the best way to get from “P1” to the ID is, if that’s even possible.

You can see the native format in the API docs https://developer.pagerduty.com/api-reference/a7d81b0e9200f-create-an-incident

Are you looking to do something specific that the native slack app doesn’t do for your PagerDuty users? 


Hi mwalls! Thank you, and I think you might be onto something there!

Per the PagerDuty reference page that I linked to in my original post, I need to allow everyone in my company to Trigger an Incident via Slack, regardless if they have a PD account or not. Therefore I cannot use the Slack PD Integration for this purpose, and followed the instructions in the above guide. It works great for the Title and Details of the Incident, but it is important to allow users to specify the Priority of the Incident.

I suspect that PagerDuty intends to support this, since in the Slack Workflow Builder PagerDuty Trigger step (provided by PD), PD specifically allows the Priority field to be filled out dynamically from a form variable (See the bottom-most screenshot above where it says “Priority (optional): Answer to {Priority}” . Those form variables are where I gather the human-readable priorities such as P1, P2, etc. Having a user choose the underlying Priority ID (such as “P53ZZH5” from your link above) would not work since they wouldn’t know what that meant.

We just subscribed to PD for the year and are really hoping that we can get this essential integration going, so I am really appreciative of your support!


Yeah. what it needs is the label of the option and the value of the option to be different and both configurable by you. I’ve not done that on the Slack side, but it feels like it should be possible? I’m not finding it in their docs though. I don’t see it in the general-purpose forms, which may mean it’s not possible in the builder?? https://api.slack.com/reference/block-kit/block-elements#select

 

With the new version of the slack workflow builder, Slack is now maintaining those, so their support folks or community might have some guidance. Lots of folks here are out for the holidays, so I haven’t heard anything else over here. 


Reply