Error when trying to post onto Slack channel by mapping a regex name

:bullseye: What is your goal?

Post a PDF to a Slack channel derived from parsing the name from the PDF filename using regex.

:thinking: What is the problem & what have you tried?

I get the following error: “Error: invalid_arguments (200).[ERROR] input must match regex pattern: [1][A-Z0-9]{8,}$ [json-pointer:/channel_id]” when mapping the name, despite the output from the text parser being correct and matching an already existing channel.

:clipboard: Error messages or input/output bundles

Error: invalid_arguments (200).[ERROR] input must match regex pattern: [2][A-Z0-9]{8,}$ [json-pointer:/channel_id]

:link: Create public scenario page

:camera_with_flash: Screenshots (scenario flow, module settings, errors)


  1. CGDZ ↩︎

  2. CGDZ ↩︎

Hey there,

looks like you mapped the wrong item inside the channel. This field expects a channel ID as input and you have given it the entire JSON output from a Match pattern module.

You will most likely need a switch formula that checks what the channel name is from the match pattern and switches it to the corresponding ID.

Thanks for the reply Stoyan! Unfortunately I have no idea how to do that, so afraid I’ll have to call this one quits :frowning:

You can use a switch module and put the output of the match pattern there. Then put the possible channel names with their corresponding IDs inside.