MattermostAskUser

Ask a user a question on Mattermost and expect a response. The response can also close a task (might be conditional) in a playbook.

python · Mattermost

Details

IDMattermostAskUser
Languagepython
From Version5.0.0
Docker Imagedemisto/python3:3.12.13.10116658
Tagsmattermost

README

Ask a user a question on Mattermost and expect a response. The response can also close a task (might be conditional) in a playbook.

Script Data


Name Description
Script Type python3
Tags mattermost
Cortex XSOAR Version 5.0.0

Dependencies


This script uses the following commands and scripts.

  • send-notification

Inputs


Argument Name Description
user The Mattermost user to ask. Can be either an email or Mattermost username.
message The message to ask the user.
option1 First option for a user reply. “yes” is the default.
option2 Second option for the user reply. “no” is the default.
task Which task should we close with the reply. If none, then no playbook tasks will be closed.
replyEntriesTag Tag to add on email reply entries.
persistent Indicates whether to use one-time entitlement or a persistent one.
reply The reply to send to the user. Use the templates {user} and {response} to incorporate these in the reply. (i.e., “Thank you **{user}**. You have answered **{response}**.”).
lifetime Time until the question expires. For example - 1 day. When it expires, a default response is sent. Default value is 1 day.
defaultResponse Default response in case the question expires.

Outputs


There are no outputs for this script.

commonfields:
  id: MattermostAskUser
  version: -1
name: MattermostAskUser
type: python
subtype: python3
script: ''
tags:
- mattermost
comment: Ask a user a question on Mattermost and expect a response. The response can also close a task (might be conditional) in a playbook.
enabled: true
args:
- name: user
  required: true
  default: true
  description: The mattermost user to ask - can be either email or mattermost username.
- name: message
  required: true
  description: The message ask the user.
- name: option1
  description: First option for a user reply. "yes" is the default.
- name: option2
  description: Second option for the user reply. "no" is the default.
- name: task
  description: Which task should we close with the reply. If none then no playbook tasks will be closed.
- name: replyEntriesTag
  description: Tag to add on email reply entries.
- name: persistent
  auto: PREDEFINED
  predefined:
  - "true"
  - "false"
  description: Indicates whether to use one-time entitlement or a persistent one.
  defaultValue: "false"
- defaultValue: Thank you **{user}**. You have answered **{response}** .
  description: The reply to send to the user. Use the templates {user} and {response} to incorporate these in the reply. (i.e., "Thank you **{user}**. You have answered **{response}**.").
  name: reply
- defaultValue: 1 day
  description: Time until the question expires. For example - 1 day. When it expires, a default response defined under the 'default_response' argument is sent.
  name: lifetime
- description: Default response in case the question expires.
  name: default_response
  defaultValue: No response was received from the user.
scripttarget: 0
fromversion: 5.0.0
dockerimage: demisto/python3:3.12.13.10116658
tests:
- MattermostAskUser_testplaybook