community / community.general / 2.5.9 / module / cisco_webex Send a message to a Cisco Webex Teams Room or Individual Authors: Drew Rusell (@drew-russell)community.general.cisco_webex (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Send a message to a Cisco Webex Teams Room or Individual with options to control the formatting.
# Note: The following examples assume a variable file has been imported # that contains the appropriate information. - name: Cisco Webex Teams - Markdown Message to a Room community.general.cisco_webex: recipient_type: roomId recipient_id: "{{ room_id }}" msg_type: markdown personal_token: "{{ token }}" msg: "**Cisco Webex Teams Ansible Module - Room Message in Markdown**"
- name: Cisco Webex Teams - Text Message to a Room community.general.cisco_webex: recipient_type: roomId recipient_id: "{{ room_id }}" msg_type: text personal_token: "{{ token }}" msg: "Cisco Webex Teams Ansible Module - Room Message in Text"
- name: Cisco Webex Teams - Text Message by an Individuals ID community.general.cisco_webex: recipient_type: toPersonId recipient_id: "{{ person_id}}" msg_type: text personal_token: "{{ token }}" msg: "Cisco Webex Teams Ansible Module - Text Message to Individual by ID"
- name: Cisco Webex Teams - Text Message by an Individuals E-Mail Address community.general.cisco_webex: recipient_type: toPersonEmail recipient_id: "{{ person_email }}" msg_type: text personal_token: "{{ token }}" msg: "Cisco Webex Teams Ansible Module - Text Message to Individual by E-Mail"
msg: aliases: - message description: - The message you would like to send. required: true type: str msg_type: aliases: - message_type choices: - text - markdown default: text description: - Specifies how you would like the message formatted. type: str recipient_id: description: - The unique identifier associated with the supplied C(recipient_type). required: true type: str personal_token: aliases: - token description: - Your personal access token required to validate the Webex Teams API. required: true type: str recipient_type: choices: - roomId - toPersonEmail - toPersonId description: - The request parameter you would like to send the message to. - Messages can be sent to either a room or individual (by ID or E-Mail). required: true type: str
message: description: - The Response Message returned by the Webex Teams API. - Full Response Code explanations can be found at U(https://developer.webex.com/docs/api/basics). returned: always sample: OK (585 bytes) type: str status_code: description: - The Response Code returned by the Webex Teams API. - Full Response Code explanations can be found at U(https://developer.webex.com/docs/api/basics). returned: always sample: 200 type: int