[{"data":1,"prerenderedAt":1298},["ShallowReactive",2],{"content-query-gXHP9wZuyv":3,"content-query-yP1cWMns5L":1098,"content-query-W4RtfFQaoh":1102,"content-query-M5aWdXgQKx":1127,"content-query-eJ9XWy0CGH":1134,"content-query-UP87PRcOMw":1147,"content-query-7VgBfxLOWV":1151,"content-query-Z6fTkbgt1D":1173,"content-query-9giMhwHrGj":1180,"content-query-j8GGVgf9na":1187,"content-query-G03kJtQzJS":1200,"content-query-1mvwAKmUBq":1219,"content-query-zRSmsuVl55":1242,"content-query-No6iPTj4EO":1246,"content-query-MsdmgXewTK":1256,"content-query-BMhIInEJl2":1263},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"intro":9,"type":10,"layout":11,"tags":12,"body":15,"_type":1091,"_id":1092,"_source":1093,"_file":1094,"_stem":1095,"_extension":1096,"sitemap":1097},"/docs/tutorials/email/slack","email",false,"","Email to Slack","Send any inbound email to a Slack channel — Webhook Relay parses the email to JSON and a transform turns it into a Slack message, automatically.","tutorial","doc",[13,14],"Email","Webhook Forwarding",{"type":16,"children":17,"toc":1085},"root",[18,40,69,91,98,103,123,153,158,531,574,580,590,608,626,644,661,667,695,969,982,1048,1054,1067,1079],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23,26,31,33,38],{"type":24,"value":25},"text","Plenty of useful things still arrive as ",{"type":19,"tag":27,"props":28,"children":29},"strong",{},[30],{"type":24,"value":5},{"type":24,"value":32},": support requests, server alerts, order confirmations, form submissions that only email you, vendor notifications. The trouble is that email is where they go to be missed. You want each of those messages to land in a ",{"type":19,"tag":27,"props":34,"children":35},{},[36],{"type":24,"value":37},"Slack channel",{"type":24,"value":39}," automatically, where your team actually looks.",{"type":19,"tag":20,"props":41,"children":42},{},[43,52,54,60,62,67],{"type":19,"tag":44,"props":45,"children":49},"a",{"href":46,"rel":47},"https://webhookrelay.com",[48],"nofollow",[50],{"type":24,"value":51},"Webhook Relay",{"type":24,"value":53}," can ",{"type":19,"tag":44,"props":55,"children":57},{"href":56},"/docs/email",[58],{"type":24,"value":59},"receive emails as webhooks",{"type":24,"value":61},". You give an inbox a unique address, every message sent to it is parsed into JSON, and a small ",{"type":19,"tag":27,"props":63,"children":64},{},[65],{"type":24,"value":66},"transform",{"type":24,"value":68}," reshapes it into the format Slack expects before delivery — no mail server, no glue code, no polling.",{"type":19,"tag":70,"props":71,"children":72},"blockquote",{},[73],{"type":19,"tag":20,"props":74,"children":75},{},[76,81,83,89],{"type":19,"tag":27,"props":77,"children":78},{},[79],{"type":24,"value":80},"Build the message visually:",{"type":24,"value":82}," the free ",{"type":19,"tag":44,"props":84,"children":86},{"href":85},"/webhook-message-formatter",[87],{"type":24,"value":88},"webhook → Slack/Discord/Teams formatter",{"type":24,"value":90}," lets you template the Slack message from a sample payload and copy the transform.",{"type":19,"tag":92,"props":93,"children":95},"h2",{"id":94},"how-it-works",[96],{"type":24,"value":97},"How it works",{"type":19,"tag":20,"props":99,"children":100},{},[101],{"type":24,"value":102},"The whole path is a single hop with a transform in the middle:",{"type":19,"tag":104,"props":105,"children":108},"pre",{"className":106,"code":107,"language":24,"meta":7,"style":7},"language-text shiki shiki-themes github-dark","inbound email  ──▶  Webhook Relay (parse)  ──▶  transform to Slack { text }  ──▶  Slack channel\n",[109],{"type":19,"tag":110,"props":111,"children":112},"code",{"__ignoreMap":7},[113],{"type":19,"tag":114,"props":115,"children":118},"span",{"class":116,"line":117},"line",1,[119],{"type":19,"tag":114,"props":120,"children":121},{},[122],{"type":24,"value":107},{"type":19,"tag":20,"props":124,"children":125},{},[126,128,135,137,143,145,151],{"type":24,"value":127},"When an email hits your Webhook Relay address, it's parsed into a structured JSON document and POSTed to the bucket's outputs. A Slack ",{"type":19,"tag":44,"props":129,"children":132},{"href":130,"rel":131},"https://api.slack.com/messaging/webhooks",[48],[133],{"type":24,"value":134},"incoming webhook",{"type":24,"value":136}," doesn't understand that shape — it only accepts ",{"type":19,"tag":110,"props":138,"children":140},{"className":139},[],[141],{"type":24,"value":142},"{ \"text\": \"...\" }",{"type":24,"value":144}," or a Block Kit ",{"type":19,"tag":110,"props":146,"children":148},{"className":147},[],[149],{"type":24,"value":150},"blocks",{"type":24,"value":152}," array — so the transform converts one into the other in flight.",{"type":19,"tag":20,"props":154,"children":155},{},[156],{"type":24,"value":157},"The parsed email looks like this:",{"type":19,"tag":104,"props":159,"children":163},{"className":160,"code":161,"language":162,"meta":7,"style":7},"language-json shiki shiki-themes github-dark","{\n  \"from\": \"jon@example.com\",\n  \"from_name\": \"Jon Snow\",\n  \"recipient\": \"\u003Cuuid>@in.webhookrelay-mail.com\",\n  \"subject\": \"Order #4821 confirmed\",\n  \"date\": \"Fri, 26 Jun 2026 11:27:41 +0400\",\n  \"text\": \"plain body\",\n  \"html\": \"\u003Cp>html body\u003C/p>\",\n  \"spf\": \"pass\",\n  \"dkim\": \"pass\",\n  \"dmarc\": \"pass\",\n  \"attachments\": [\n    { \"name\": \"invoice.pdf\", \"content_type\": \"application/pdf\", \"size\": 48213, \"content\": \"\u003Cbase64>\", \"truncated\": false }\n  ]\n}\n","json",[164],{"type":19,"tag":110,"props":165,"children":166},{"__ignoreMap":7},[167,176,202,224,246,268,290,312,334,356,377,398,412,513,522],{"type":19,"tag":114,"props":168,"children":169},{"class":116,"line":117},[170],{"type":19,"tag":114,"props":171,"children":173},{"style":172},"--shiki-default:#E1E4E8",[174],{"type":24,"value":175},"{\n",{"type":19,"tag":114,"props":177,"children":179},{"class":116,"line":178},2,[180,186,191,197],{"type":19,"tag":114,"props":181,"children":183},{"style":182},"--shiki-default:#79B8FF",[184],{"type":24,"value":185},"  \"from\"",{"type":19,"tag":114,"props":187,"children":188},{"style":172},[189],{"type":24,"value":190},": ",{"type":19,"tag":114,"props":192,"children":194},{"style":193},"--shiki-default:#9ECBFF",[195],{"type":24,"value":196},"\"jon@example.com\"",{"type":19,"tag":114,"props":198,"children":199},{"style":172},[200],{"type":24,"value":201},",\n",{"type":19,"tag":114,"props":203,"children":205},{"class":116,"line":204},3,[206,211,215,220],{"type":19,"tag":114,"props":207,"children":208},{"style":182},[209],{"type":24,"value":210},"  \"from_name\"",{"type":19,"tag":114,"props":212,"children":213},{"style":172},[214],{"type":24,"value":190},{"type":19,"tag":114,"props":216,"children":217},{"style":193},[218],{"type":24,"value":219},"\"Jon Snow\"",{"type":19,"tag":114,"props":221,"children":222},{"style":172},[223],{"type":24,"value":201},{"type":19,"tag":114,"props":225,"children":227},{"class":116,"line":226},4,[228,233,237,242],{"type":19,"tag":114,"props":229,"children":230},{"style":182},[231],{"type":24,"value":232},"  \"recipient\"",{"type":19,"tag":114,"props":234,"children":235},{"style":172},[236],{"type":24,"value":190},{"type":19,"tag":114,"props":238,"children":239},{"style":193},[240],{"type":24,"value":241},"\"\u003Cuuid>@in.webhookrelay-mail.com\"",{"type":19,"tag":114,"props":243,"children":244},{"style":172},[245],{"type":24,"value":201},{"type":19,"tag":114,"props":247,"children":249},{"class":116,"line":248},5,[250,255,259,264],{"type":19,"tag":114,"props":251,"children":252},{"style":182},[253],{"type":24,"value":254},"  \"subject\"",{"type":19,"tag":114,"props":256,"children":257},{"style":172},[258],{"type":24,"value":190},{"type":19,"tag":114,"props":260,"children":261},{"style":193},[262],{"type":24,"value":263},"\"Order #4821 confirmed\"",{"type":19,"tag":114,"props":265,"children":266},{"style":172},[267],{"type":24,"value":201},{"type":19,"tag":114,"props":269,"children":271},{"class":116,"line":270},6,[272,277,281,286],{"type":19,"tag":114,"props":273,"children":274},{"style":182},[275],{"type":24,"value":276},"  \"date\"",{"type":19,"tag":114,"props":278,"children":279},{"style":172},[280],{"type":24,"value":190},{"type":19,"tag":114,"props":282,"children":283},{"style":193},[284],{"type":24,"value":285},"\"Fri, 26 Jun 2026 11:27:41 +0400\"",{"type":19,"tag":114,"props":287,"children":288},{"style":172},[289],{"type":24,"value":201},{"type":19,"tag":114,"props":291,"children":293},{"class":116,"line":292},7,[294,299,303,308],{"type":19,"tag":114,"props":295,"children":296},{"style":182},[297],{"type":24,"value":298},"  \"text\"",{"type":19,"tag":114,"props":300,"children":301},{"style":172},[302],{"type":24,"value":190},{"type":19,"tag":114,"props":304,"children":305},{"style":193},[306],{"type":24,"value":307},"\"plain body\"",{"type":19,"tag":114,"props":309,"children":310},{"style":172},[311],{"type":24,"value":201},{"type":19,"tag":114,"props":313,"children":315},{"class":116,"line":314},8,[316,321,325,330],{"type":19,"tag":114,"props":317,"children":318},{"style":182},[319],{"type":24,"value":320},"  \"html\"",{"type":19,"tag":114,"props":322,"children":323},{"style":172},[324],{"type":24,"value":190},{"type":19,"tag":114,"props":326,"children":327},{"style":193},[328],{"type":24,"value":329},"\"\u003Cp>html body\u003C/p>\"",{"type":19,"tag":114,"props":331,"children":332},{"style":172},[333],{"type":24,"value":201},{"type":19,"tag":114,"props":335,"children":337},{"class":116,"line":336},9,[338,343,347,352],{"type":19,"tag":114,"props":339,"children":340},{"style":182},[341],{"type":24,"value":342},"  \"spf\"",{"type":19,"tag":114,"props":344,"children":345},{"style":172},[346],{"type":24,"value":190},{"type":19,"tag":114,"props":348,"children":349},{"style":193},[350],{"type":24,"value":351},"\"pass\"",{"type":19,"tag":114,"props":353,"children":354},{"style":172},[355],{"type":24,"value":201},{"type":19,"tag":114,"props":357,"children":359},{"class":116,"line":358},10,[360,365,369,373],{"type":19,"tag":114,"props":361,"children":362},{"style":182},[363],{"type":24,"value":364},"  \"dkim\"",{"type":19,"tag":114,"props":366,"children":367},{"style":172},[368],{"type":24,"value":190},{"type":19,"tag":114,"props":370,"children":371},{"style":193},[372],{"type":24,"value":351},{"type":19,"tag":114,"props":374,"children":375},{"style":172},[376],{"type":24,"value":201},{"type":19,"tag":114,"props":378,"children":380},{"class":116,"line":379},11,[381,386,390,394],{"type":19,"tag":114,"props":382,"children":383},{"style":182},[384],{"type":24,"value":385},"  \"dmarc\"",{"type":19,"tag":114,"props":387,"children":388},{"style":172},[389],{"type":24,"value":190},{"type":19,"tag":114,"props":391,"children":392},{"style":193},[393],{"type":24,"value":351},{"type":19,"tag":114,"props":395,"children":396},{"style":172},[397],{"type":24,"value":201},{"type":19,"tag":114,"props":399,"children":401},{"class":116,"line":400},12,[402,407],{"type":19,"tag":114,"props":403,"children":404},{"style":182},[405],{"type":24,"value":406},"  \"attachments\"",{"type":19,"tag":114,"props":408,"children":409},{"style":172},[410],{"type":24,"value":411},": [\n",{"type":19,"tag":114,"props":413,"children":415},{"class":116,"line":414},13,[416,421,426,430,435,440,445,449,454,458,463,467,472,476,481,485,490,494,499,503,508],{"type":19,"tag":114,"props":417,"children":418},{"style":172},[419],{"type":24,"value":420},"    { ",{"type":19,"tag":114,"props":422,"children":423},{"style":182},[424],{"type":24,"value":425},"\"name\"",{"type":19,"tag":114,"props":427,"children":428},{"style":172},[429],{"type":24,"value":190},{"type":19,"tag":114,"props":431,"children":432},{"style":193},[433],{"type":24,"value":434},"\"invoice.pdf\"",{"type":19,"tag":114,"props":436,"children":437},{"style":172},[438],{"type":24,"value":439},", ",{"type":19,"tag":114,"props":441,"children":442},{"style":182},[443],{"type":24,"value":444},"\"content_type\"",{"type":19,"tag":114,"props":446,"children":447},{"style":172},[448],{"type":24,"value":190},{"type":19,"tag":114,"props":450,"children":451},{"style":193},[452],{"type":24,"value":453},"\"application/pdf\"",{"type":19,"tag":114,"props":455,"children":456},{"style":172},[457],{"type":24,"value":439},{"type":19,"tag":114,"props":459,"children":460},{"style":182},[461],{"type":24,"value":462},"\"size\"",{"type":19,"tag":114,"props":464,"children":465},{"style":172},[466],{"type":24,"value":190},{"type":19,"tag":114,"props":468,"children":469},{"style":182},[470],{"type":24,"value":471},"48213",{"type":19,"tag":114,"props":473,"children":474},{"style":172},[475],{"type":24,"value":439},{"type":19,"tag":114,"props":477,"children":478},{"style":182},[479],{"type":24,"value":480},"\"content\"",{"type":19,"tag":114,"props":482,"children":483},{"style":172},[484],{"type":24,"value":190},{"type":19,"tag":114,"props":486,"children":487},{"style":193},[488],{"type":24,"value":489},"\"\u003Cbase64>\"",{"type":19,"tag":114,"props":491,"children":492},{"style":172},[493],{"type":24,"value":439},{"type":19,"tag":114,"props":495,"children":496},{"style":182},[497],{"type":24,"value":498},"\"truncated\"",{"type":19,"tag":114,"props":500,"children":501},{"style":172},[502],{"type":24,"value":190},{"type":19,"tag":114,"props":504,"children":505},{"style":182},[506],{"type":24,"value":507},"false",{"type":19,"tag":114,"props":509,"children":510},{"style":172},[511],{"type":24,"value":512}," }\n",{"type":19,"tag":114,"props":514,"children":516},{"class":116,"line":515},14,[517],{"type":19,"tag":114,"props":518,"children":519},{"style":172},[520],{"type":24,"value":521},"  ]\n",{"type":19,"tag":114,"props":523,"children":525},{"class":116,"line":524},15,[526],{"type":19,"tag":114,"props":527,"children":528},{"style":172},[529],{"type":24,"value":530},"}\n",{"type":19,"tag":20,"props":532,"children":533},{},[534,536,542,544,550,551,557,558,564,566,572],{"type":24,"value":535},"See the full ",{"type":19,"tag":44,"props":537,"children":539},{"href":538},"/docs/email/payload",[540],{"type":24,"value":541},"payload reference",{"type":24,"value":543}," for every field, including ",{"type":19,"tag":110,"props":545,"children":547},{"className":546},[],[548],{"type":24,"value":549},"to",{"type":24,"value":439},{"type":19,"tag":110,"props":552,"children":554},{"className":553},[],[555],{"type":24,"value":556},"cc",{"type":24,"value":439},{"type":19,"tag":110,"props":559,"children":561},{"className":560},[],[562],{"type":24,"value":563},"message_id",{"type":24,"value":565}," and the raw ",{"type":19,"tag":110,"props":567,"children":569},{"className":568},[],[570],{"type":24,"value":571},"headers",{"type":24,"value":573}," map.",{"type":19,"tag":92,"props":575,"children":577},{"id":576},"setup",[578],{"type":24,"value":579},"Setup",{"type":19,"tag":20,"props":581,"children":582},{},[583,588],{"type":19,"tag":27,"props":584,"children":585},{},[586],{"type":24,"value":587},"1. Create a bucket.",{"type":24,"value":589}," This is the container that ties an input to its outputs.",{"type":19,"tag":20,"props":591,"children":592},{},[593,598,600,606],{"type":19,"tag":27,"props":594,"children":595},{},[596],{"type":24,"value":597},"2. Add an email input.",{"type":24,"value":599}," Webhook Relay gives you back a unique address of the form ",{"type":19,"tag":110,"props":601,"children":603},{"className":602},[],[604],{"type":24,"value":605},"\u003Cuuid>@in.webhookrelay-mail.com",{"type":24,"value":607},". Anything sent there is parsed and forwarded to the bucket's outputs.",{"type":19,"tag":20,"props":609,"children":610},{},[611,616,618,624],{"type":19,"tag":27,"props":612,"children":613},{},[614],{"type":24,"value":615},"3. Add a Slack output.",{"type":24,"value":617}," Create a Slack incoming webhook URL (",{"type":19,"tag":110,"props":619,"children":621},{"className":620},[],[622],{"type":24,"value":623},"https://hooks.slack.com/services/T0000/B0000/XXXXXXXX",{"type":24,"value":625},") for the channel you want to post to, and add it as the bucket's output destination. Each Slack incoming webhook is bound to one channel.",{"type":19,"tag":20,"props":627,"children":628},{},[629,634,636,642],{"type":19,"tag":27,"props":630,"children":631},{},[632],{"type":24,"value":633},"4. Attach the transform.",{"type":24,"value":635}," Add the ",{"type":19,"tag":44,"props":637,"children":639},{"href":638},"/docs/webhooks/functions",[640],{"type":24,"value":641},"transform function",{"type":24,"value":643}," below so the parsed email is reshaped into Slack's format before it's delivered.",{"type":19,"tag":20,"props":645,"children":646},{},[647,652,654,659],{"type":19,"tag":27,"props":648,"children":649},{},[650],{"type":24,"value":651},"5. Send a test email.",{"type":24,"value":653}," Email your ",{"type":19,"tag":110,"props":655,"children":657},{"className":656},[],[658],{"type":24,"value":605},{"type":24,"value":660}," address from any client. Within a second or two the message appears in your Slack channel. If it doesn't, open the request log in your dashboard to see exactly what was received and delivered.",{"type":19,"tag":92,"props":662,"children":664},{"id":663},"the-transform",[665],{"type":24,"value":666},"The transform",{"type":19,"tag":20,"props":668,"children":669},{},[670,672,677,679,685,687,693],{"type":24,"value":671},"Webhook Relay ",{"type":19,"tag":44,"props":673,"children":674},{"href":638},[675],{"type":24,"value":676},"functions",{"type":24,"value":678}," hand you the incoming request body as a string in ",{"type":19,"tag":110,"props":680,"children":682},{"className":681},[],[683],{"type":24,"value":684},"r.body",{"type":24,"value":686},". Parse it, build the Slack payload, and write it back with ",{"type":19,"tag":110,"props":688,"children":690},{"className":689},[],[691],{"type":24,"value":692},"r.setBody",{"type":24,"value":694},":",{"type":19,"tag":104,"props":696,"children":700},{"className":697,"code":698,"language":699,"meta":7,"style":7},"language-js shiki shiki-themes github-dark","const email = JSON.parse(r.body);\n\nconst slack = {\n  text: `:email: *${email.subject}*\\nFrom: ${email.from_name || email.from}\\n\\n${email.text}`,\n};\n\nr.setBody(JSON.stringify(slack));\nr.setHeader(\"Content-Type\", \"application/json\");\n","js",[701],{"type":19,"tag":110,"props":702,"children":703},{"__ignoreMap":7},[704,744,753,774,882,890,897,934],{"type":19,"tag":114,"props":705,"children":706},{"class":116,"line":117},[707,713,718,723,728,733,739],{"type":19,"tag":114,"props":708,"children":710},{"style":709},"--shiki-default:#F97583",[711],{"type":24,"value":712},"const",{"type":19,"tag":114,"props":714,"children":715},{"style":182},[716],{"type":24,"value":717}," email",{"type":19,"tag":114,"props":719,"children":720},{"style":709},[721],{"type":24,"value":722}," =",{"type":19,"tag":114,"props":724,"children":725},{"style":182},[726],{"type":24,"value":727}," JSON",{"type":19,"tag":114,"props":729,"children":730},{"style":172},[731],{"type":24,"value":732},".",{"type":19,"tag":114,"props":734,"children":736},{"style":735},"--shiki-default:#B392F0",[737],{"type":24,"value":738},"parse",{"type":19,"tag":114,"props":740,"children":741},{"style":172},[742],{"type":24,"value":743},"(r.body);\n",{"type":19,"tag":114,"props":745,"children":746},{"class":116,"line":178},[747],{"type":19,"tag":114,"props":748,"children":750},{"emptyLinePlaceholder":749},true,[751],{"type":24,"value":752},"\n",{"type":19,"tag":114,"props":754,"children":755},{"class":116,"line":204},[756,760,765,769],{"type":19,"tag":114,"props":757,"children":758},{"style":709},[759],{"type":24,"value":712},{"type":19,"tag":114,"props":761,"children":762},{"style":182},[763],{"type":24,"value":764}," slack",{"type":19,"tag":114,"props":766,"children":767},{"style":709},[768],{"type":24,"value":722},{"type":19,"tag":114,"props":770,"children":771},{"style":172},[772],{"type":24,"value":773}," {\n",{"type":19,"tag":114,"props":775,"children":776},{"class":116,"line":226},[777,782,787,791,795,800,805,810,815,819,823,828,833,837,841,846,851,856,861,865,869,873,878],{"type":19,"tag":114,"props":778,"children":779},{"style":172},[780],{"type":24,"value":781},"  text: ",{"type":19,"tag":114,"props":783,"children":784},{"style":193},[785],{"type":24,"value":786},"`:email: *${",{"type":19,"tag":114,"props":788,"children":789},{"style":172},[790],{"type":24,"value":5},{"type":19,"tag":114,"props":792,"children":793},{"style":193},[794],{"type":24,"value":732},{"type":19,"tag":114,"props":796,"children":797},{"style":172},[798],{"type":24,"value":799},"subject",{"type":19,"tag":114,"props":801,"children":802},{"style":193},[803],{"type":24,"value":804},"}*",{"type":19,"tag":114,"props":806,"children":807},{"style":182},[808],{"type":24,"value":809},"\\n",{"type":19,"tag":114,"props":811,"children":812},{"style":193},[813],{"type":24,"value":814},"From: ${",{"type":19,"tag":114,"props":816,"children":817},{"style":172},[818],{"type":24,"value":5},{"type":19,"tag":114,"props":820,"children":821},{"style":193},[822],{"type":24,"value":732},{"type":19,"tag":114,"props":824,"children":825},{"style":172},[826],{"type":24,"value":827},"from_name",{"type":19,"tag":114,"props":829,"children":830},{"style":709},[831],{"type":24,"value":832}," ||",{"type":19,"tag":114,"props":834,"children":835},{"style":172},[836],{"type":24,"value":717},{"type":19,"tag":114,"props":838,"children":839},{"style":193},[840],{"type":24,"value":732},{"type":19,"tag":114,"props":842,"children":843},{"style":172},[844],{"type":24,"value":845},"from",{"type":19,"tag":114,"props":847,"children":848},{"style":193},[849],{"type":24,"value":850},"}",{"type":19,"tag":114,"props":852,"children":853},{"style":182},[854],{"type":24,"value":855},"\\n\\n",{"type":19,"tag":114,"props":857,"children":858},{"style":193},[859],{"type":24,"value":860},"${",{"type":19,"tag":114,"props":862,"children":863},{"style":172},[864],{"type":24,"value":5},{"type":19,"tag":114,"props":866,"children":867},{"style":193},[868],{"type":24,"value":732},{"type":19,"tag":114,"props":870,"children":871},{"style":172},[872],{"type":24,"value":24},{"type":19,"tag":114,"props":874,"children":875},{"style":193},[876],{"type":24,"value":877},"}`",{"type":19,"tag":114,"props":879,"children":880},{"style":172},[881],{"type":24,"value":201},{"type":19,"tag":114,"props":883,"children":884},{"class":116,"line":248},[885],{"type":19,"tag":114,"props":886,"children":887},{"style":172},[888],{"type":24,"value":889},"};\n",{"type":19,"tag":114,"props":891,"children":892},{"class":116,"line":270},[893],{"type":19,"tag":114,"props":894,"children":895},{"emptyLinePlaceholder":749},[896],{"type":24,"value":752},{"type":19,"tag":114,"props":898,"children":899},{"class":116,"line":292},[900,905,910,915,920,924,929],{"type":19,"tag":114,"props":901,"children":902},{"style":172},[903],{"type":24,"value":904},"r.",{"type":19,"tag":114,"props":906,"children":907},{"style":735},[908],{"type":24,"value":909},"setBody",{"type":19,"tag":114,"props":911,"children":912},{"style":172},[913],{"type":24,"value":914},"(",{"type":19,"tag":114,"props":916,"children":917},{"style":182},[918],{"type":24,"value":919},"JSON",{"type":19,"tag":114,"props":921,"children":922},{"style":172},[923],{"type":24,"value":732},{"type":19,"tag":114,"props":925,"children":926},{"style":735},[927],{"type":24,"value":928},"stringify",{"type":19,"tag":114,"props":930,"children":931},{"style":172},[932],{"type":24,"value":933},"(slack));\n",{"type":19,"tag":114,"props":935,"children":936},{"class":116,"line":314},[937,941,946,950,955,959,964],{"type":19,"tag":114,"props":938,"children":939},{"style":172},[940],{"type":24,"value":904},{"type":19,"tag":114,"props":942,"children":943},{"style":735},[944],{"type":24,"value":945},"setHeader",{"type":19,"tag":114,"props":947,"children":948},{"style":172},[949],{"type":24,"value":914},{"type":19,"tag":114,"props":951,"children":952},{"style":193},[953],{"type":24,"value":954},"\"Content-Type\"",{"type":19,"tag":114,"props":956,"children":957},{"style":172},[958],{"type":24,"value":439},{"type":19,"tag":114,"props":960,"children":961},{"style":193},[962],{"type":24,"value":963},"\"application/json\"",{"type":19,"tag":114,"props":965,"children":966},{"style":172},[967],{"type":24,"value":968},");\n",{"type":19,"tag":20,"props":970,"children":971},{},[972,974,980],{"type":24,"value":973},"That's the complete bridge: the email's subject becomes the headline, the sender is attributed, and the plain-text body follows. Slack accepts the ",{"type":19,"tag":110,"props":975,"children":977},{"className":976},[],[978],{"type":24,"value":979},"{ text }",{"type":24,"value":981}," body and posts it.",{"type":19,"tag":20,"props":983,"children":984},{},[985,987,992,994,999,1001,1006,1008,1014,1016,1022,1024,1030,1032,1038,1040,1046],{"type":24,"value":986},"From here the function is where the real power is. Swap the flat string for a Slack ",{"type":19,"tag":27,"props":988,"children":989},{},[990],{"type":24,"value":991},"Block Kit",{"type":24,"value":993}," ",{"type":19,"tag":110,"props":995,"children":997},{"className":996},[],[998],{"type":24,"value":150},{"type":24,"value":1000}," array to render the subject, sender and body as a formatted message with fields, dividers and buttons. You can also fan out to ",{"type":19,"tag":27,"props":1002,"children":1003},{},[1004],{"type":24,"value":1005},"multiple channels",{"type":24,"value":1007}," by adding more outputs — one Slack incoming webhook per channel, or Slack ",{"type":19,"tag":1009,"props":1010,"children":1011},"em",{},[1012],{"type":24,"value":1013},"and",{"type":24,"value":1015}," Discord at once — and shape the payload differently for each. To keep noise down, restrict who can email the address with the ",{"type":19,"tag":44,"props":1017,"children":1019},{"href":1018},"/docs/email/filtering-and-policy",[1020],{"type":24,"value":1021},"From-address allowlist",{"type":24,"value":1023},", or inspect ",{"type":19,"tag":110,"props":1025,"children":1027},{"className":1026},[],[1028],{"type":24,"value":1029},"email.from",{"type":24,"value":1031}," / ",{"type":19,"tag":110,"props":1033,"children":1035},{"className":1034},[],[1036],{"type":24,"value":1037},"email.spf",{"type":24,"value":1039}," inside the function and ",{"type":19,"tag":110,"props":1041,"children":1043},{"className":1042},[],[1044],{"type":24,"value":1045},"return",{"type":24,"value":1047}," early to drop anything you don't want forwarded.",{"type":19,"tag":92,"props":1049,"children":1051},{"id":1050},"get-started",[1052],{"type":24,"value":1053},"Get started",{"type":19,"tag":20,"props":1055,"children":1056},{},[1057,1059,1065],{"type":24,"value":1058},"Turning inbound mail into Slack messages is one case of a broader pattern: ",{"type":19,"tag":44,"props":1060,"children":1062},{"href":1061},"/email-to-webhook",[1063],{"type":24,"value":1064},"Email to Webhook",{"type":24,"value":1066},". Once an email is JSON, you can route it anywhere a webhook can go.",{"type":19,"tag":20,"props":1068,"children":1069},{},[1070,1077],{"type":19,"tag":44,"props":1071,"children":1074},{"href":1072,"rel":1073},"https://my.webhookrelay.com/register",[48],[1075],{"type":24,"value":1076},"Create a free Webhook Relay account",{"type":24,"value":1078},", add an email input, and have support requests, alerts and confirmations flowing into Slack in a few minutes.",{"type":19,"tag":1080,"props":1081,"children":1082},"style",{},[1083],{"type":24,"value":1084},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":204,"depth":204,"links":1086},[1087,1088,1089,1090],{"id":94,"depth":178,"text":97},{"id":576,"depth":178,"text":579},{"id":663,"depth":178,"text":666},{"id":1050,"depth":178,"text":1053},"markdown","content:docs:tutorials:email:slack.md","content","docs/tutorials/email/slack.md","docs/tutorials/email/slack","md",{"loc":4},[1099],{"_path":1100,"title":1101},"/docs/webhooks/internal/localhost","Receiving webhooks on localhost",[1103,1106,1109,1112,1115,1118,1121,1124],{"_path":1104,"title":1105},"/docs/installation/cli","CLI",{"_path":1107,"title":1108},"/docs/installation/docker","Docker container",{"_path":1110,"title":1111},"/docs/installation/docker-compose","Docker Compose",{"_path":1113,"title":1114},"/docs/installation/kubernetes","Kubernetes",{"_path":1116,"title":1117},"/docs/installation/autostart-windows","Autostart (Windows)",{"_path":1119,"title":1120},"/docs/installation/autostart-linux","Autostart (Linux)",{"_path":1122,"title":1123},"/docs/installation/autostart-macos","Autostart (MacOS)",{"_path":1125,"title":1126},"/docs/installation/behind-proxy","HTTP proxy configuration",[1128,1131],{"_path":1129,"title":1130},"/docs/webhooks/public/public-destination","Forward to public URL",{"_path":1132,"title":1133},"/docs/webhooks/public/multiple-destination-urls","Multiple destinations",[1135,1138,1141,1144],{"_path":1136,"title":1137},"/docs/webhooks/auth/username-password","Username and password",{"_path":1139,"title":1140},"/docs/webhooks/auth/hmac","HMAC",{"_path":1142,"title":1143},"/docs/webhooks/auth/jwt","JWT authentication",{"_path":1145,"title":1146},"/docs/webhooks/auth/http-method","Auth using request method",[1148],{"_path":1149,"title":1150},"/docs/webhooks/cron/using-cron-webhooks","Schedule recurring webhooks",[1152,1155,1158,1161,1164,1167,1170],{"_path":1153,"title":1154},"/docs/service-connections","Service Connections",{"_path":1156,"title":1157},"/docs/service-connections/aws_s3","AWS S3",{"_path":1159,"title":1160},"/docs/service-connections/aws_sns","AWS SNS",{"_path":1162,"title":1163},"/docs/service-connections/aws_sqs","AWS SQS",{"_path":1165,"title":1166},"/docs/service-connections/azure","Azure",{"_path":1168,"title":1169},"/docs/service-connections/gcp_gcs","GCP Cloud Storage",{"_path":1171,"title":1172},"/docs/service-connections/gcp_pubsub","GCP Pub/Sub",[1174,1176,1178],{"_path":56,"title":1175},"Receive emails as webhooks",{"_path":538,"title":1177},"Email webhook payload",{"_path":1018,"title":1179},"Sender filtering & policy",[1181,1184],{"_path":1182,"title":1183},"/docs/tunnels/demoing-your-website","Demoing your website",{"_path":1185,"title":1186},"/docs/tunnels/regions","Regions",[1188,1191,1194,1197],{"_path":1189,"title":1190},"/docs/account/account-management","Account management",{"_path":1192,"title":1193},"/docs/account/mfa","Multi-factor authentication (MFA)",{"_path":1195,"title":1196},"/docs/account/team","Teams and sub-accounts",{"_path":1198,"title":1199},"/docs/account/billing-and-subscriptions","Billing & subscriptions",[1201,1204,1207,1210,1213,1216],{"_path":1202,"title":1203},"/docs/tutorials/cicd/jenkins-bitbucket","Jenkins and Bitbucket",{"_path":1205,"title":1206},"/docs/tutorials/cicd/jenkins-github","Jenkins and GitHub",{"_path":1208,"title":1209},"/docs/tutorials/cicd/jenkins-plugin","Jenkins Plugin",{"_path":1211,"title":1212},"/docs/tutorials/cicd/kubernetes-operator","Kubernetes Operator",{"_path":1214,"title":1215},"/docs/tutorials/cicd/terraform-atlantis","Terraform Atlantis",{"_path":1217,"title":1218},"/docs/tutorials/cicd/webhook-exec","Execute scripts on webhook",[1220,1223,1226,1229,1232,1235,1238,1241],{"_path":1221,"title":1222},"/docs/tutorials/email/airtable","Email to Airtable",{"_path":1224,"title":1225},"/docs/tutorials/email/api","Email to API",{"_path":1227,"title":1228},"/docs/tutorials/email/database","Email to Database",{"_path":1230,"title":1231},"/docs/tutorials/email/discord","Email to Discord",{"_path":1233,"title":1234},"/docs/tutorials/email/google-sheets","Email to Google Sheets",{"_path":1236,"title":1237},"/docs/tutorials/email/microsoft-teams","Email to Microsoft Teams",{"_path":1239,"title":1240},"/docs/tutorials/email/notion","Email to Notion",{"_path":4,"title":8},[1243],{"_path":1244,"title":1245},"/docs/tutorials/warehouse/bigquery","GCP BigQuery",[1247,1250,1253],{"_path":1248,"title":1249},"/docs/tutorials/edge/home-assistant","Home Assistant",{"_path":1251,"title":1252},"/docs/tutorials/edge/javascript-app","JavaScript app",{"_path":1254,"title":1255},"/docs/tutorials/edge/node-red","Node-RED",[1257,1260],{"_path":1258,"title":1259},"/docs/tutorials/transform/docker-to-slack","DockerHub webhook to Slack notification",{"_path":1261,"title":1262},"/docs/tutorials/transform/enrich-webhooks","Enrich webhooks from APIs",[1264,1267,1270,1273,1276,1279,1282,1285,1288,1291,1293,1296],{"_path":1265,"title":1266},"/docs/webhooks/functions/manipulating-json","JSON encoding",{"_path":1268,"title":1269},"/docs/webhooks/functions/make-http-request","Make HTTP request",{"_path":1271,"title":1272},"/docs/webhooks/functions/modify-request","Read, write request data",{"_path":1274,"title":1275},"/docs/webhooks/functions/multipart-form-data","Multipart form to JSON",{"_path":1277,"title":1278},"/docs/webhooks/functions/url-encoded-data","URL Encoded Form",{"_path":1280,"title":1281},"/docs/webhooks/functions/working-with-time","Working with time",{"_path":1283,"title":1284},"/docs/webhooks/functions/send-emails","Sending emails",{"_path":1286,"title":1287},"/docs/webhooks/functions/crypto-functions","Base64, encryption",{"_path":1289,"title":1290},"/docs/webhooks/functions/integrate-into-cicd","Integrating into CI/CD",{"_path":1292,"title":1245},"/docs/webhooks/functions/big-query",{"_path":1294,"title":1295},"/docs/webhooks/functions/accessing-metadata","Accessing metadata",{"_path":638,"title":1297},"Functions",1782718125899]