{"flow":{"id":52,"summary":"Send Slack or Email to user based on their choice","versions":[202],"created_by":"henri186","created_at":"2023-12-28T14:16:06.430Z","votes":0,"approved":false,"apps":["slack,","gmail"],"value":{"modules":[{"id":"a","value":{"type":"branchone","default":[{"id":"d","value":{"tag":"","lock":"{\n  \"version\": \"3\",\n  \"remote\": {}\n}\n","type":"rawscript","content":"export async function main() {\n  throw new Error(\"No email or method has been chosen\");\n}\n","language":"deno","input_transforms":{}}}],"branches":[{"expr":"flow_input.method === \"Email\"","modules":[{"id":"b","value":{"path":"hub/1408/gmail/_send_email","type":"script","input_transforms":{"message":{"type":"static","value":"Hi! It's a test"},"subject":{"type":"static","value":"Test"},"user_id":{"type":"static","value":"me"},"to_email":{"expr":"flow_input.email","type":"javascript"},"gmail_auth":{"type":"static","value":null}}},"summary":" Send Email (gmail)"}],"summary":""},{"expr":"flow_input.method === \"Slack\"","modules":[{"id":"c","value":{"path":"hub/1407/slack/send_direct_message","type":"script","input_transforms":{"text":{"type":"static","value":"Hi there! Just testing :)"},"slack":{"type":"static","value":null},"user_email":{"expr":"flow_input.email","type":"javascript"}}},"summary":"Send direct message (slack)"}],"summary":""}]},"summary":""}]},"schema":{"type":"object","order":["email","method"],"$schema":"https://json-schema.org/draft/2020-12/schema","required":[],"properties":{"email":{"type":"string","format":"","default":"","description":""},"method":{"type":"string","format":"","default":"","description":""}}},"description":"Used in tutorial: https://www.youtube.com/watch?v=MTGZTO1AduM","recording":null,"vcreated_at":"2023-12-28T14:16:06.430Z","vcreated_by":"henri186","comments":[]}}