BuildSlackBlocksFromIndex

Extracts the index.zip and filters new packs since the last run. Builds the slack message for new packs.

python · XSOAR Lab Updates

Details

IDBuildSlackBlocksFromIndex
Languagepython
From Version5.0.0
Docker Imagedemisto/unzip:1.0.0.9067966

README

The script is doing the following things:

  1. Extract the index.zip file from the production public bucket - marketplace-dist.
  2. Filter new packs since the given date.
  3. Retrieve data from the marketplace metadata file for each pack.
  4. Build the Slack blocks object.
  5. Stores in context at the following paths:
    • Pack: a list of dicts, each one with subset of the pack’s marketplace metadata file.
    • LastRun: The updated value of the last run, i.e. after new packs calculation.
    • Blocks: The Slack blocks object. In case no new packs were found, stores no new packs.
args:
- description: The entry ID of the index.zip
  name: entry_id
  required: true
- description: The last time the message was sent. Typically one week ago.
  name: last_run_str
  required: true
comment: 'Extracts the index.zip and filters new packs since the last run.

  Builds the slack message for new packs.'
commonfields:
  id: BuildSlackBlocksFromIndex
  version: -1
dockerimage: demisto/unzip:1.0.0.9067966
enabled: true
name: BuildSlackBlocksFromIndex
outputs:
- contextPath: Pack.name
  description: The pack's name
  type: string
- contextPath: Pack.id
  description: The pack's id
  type: string
- contextPath: Pack.author
  description: The pack's author
  type: string
- contextPath: Pack.description
  description: The pack's description
  type: string
- contextPath: Pack.price
  description: The pack's price
  type: string
- contextPath: Pack.support
  description: The pack's support
  type: string
- contextPath: LastRun
  description: The last run
  type: date
- contextPath: Blocks
  description: The Slack Blocks json string
  type: string
runas: DBotWeakRole
script: ''
scripttarget: 0
subtype: python3
tags: []
type: python
fromversion: 5.0.0
tests:
- No tests (auto formatted)