Welcome to the Intwixt User Guide! You'll find tutorials, reference documentation, and sample project files.
Hello, I have a function that calls calls various promise-returning functions, and would like to avoid nested callbacks. As a result, I'm using async/await, but run into problems with JSDoc. For example: ``` exports.handler = async (event, context) { await waitForPromise(); return ...; } ``` I've tried using 'callback' Lambda input and structuring my JSDoc according to Intwixt documentation, but if I have any await statements the function times out. Apparently according to AWS documentation, using async handlers requires returning Lambda results (which makes sense) instead of using callback. Is there any way to format JSDoc for async handlers (i.e. @return)? Or should I just not use async handler and stick with nested callbacks? Thanks for your help! Vanessa
Posted by Vanessa 8 months ago
Hello, Thanks for reading this. I've been having trouble with writing Lambda JSDoc to return an object that's nested in the callback response. The Intwixt UI shows that string/number output, but not objects, are parsed. Am I missing a step? Here's an example of my JSDoc: /** * @param {object} event * @param {string} event.myParam * @param {myCallback} callback */ exports.handler = async (event, context, callback){ ... callback(null, { blockResult: { blocks: [...] }, myString: 'hello' } } /** * @callback myCallback * @param {string} error * @param {object} response * @param {object} response.blockResult * @param {string} response.myString */ The string 'myString' is parsed as an output, but not the object 'blockResult'. Thanks in advance for your help!
Posted by Vanessa Kha 8 months ago
I have a flow that generates a dynamic list of items, each with an interactive (toggle) button. Which Slack activity do I use to enable an interactive message as per Slack documentation here: https://api.slack.com/interactive-messages#responding_to_message_actions In my flow, I use the "Respond With Ask Choice with Blocks" activity. I receive a (button-pressed) response from this activity, and then the user should get an updated list (overwriting the previous list). My lambda function generates this updated list, but then no more responses are received. (timeout of activity is set to 1200s) So I'm not clear on how to build a flow that has a repeated operation of receiving multiple responses from the user. Please help.
Posted by Asquith about a year ago
hi there, I'm trying to use the 'Ask Choice with Blocks' to render a custom list. I've turned on the "Modify Existing Message" with "Replace Entire Message" option. I'm confused as to how I can specify the required message id, if the message itself is being built by the "Ask Choice with Blocks" ?
Posted by Asquith about a year ago
When calling an HTTP endpoint like _Twilio Studio flow_ via their Executions API and where there doesn't seem to be an OpenAPI spec, how do you do basic auth? One can work around by hard-coding `u:[email protected]` in the URL, but that seems not the proper way.
Posted by Luke Birdeau about a year ago