# Return value from async function

**URL:** <https://forum.bubble.io/t/return-value-from-async-function/118797>\
**Category:** Plugin builders\
**Created:** [October 30, 2020, 11:03pm UTC](https://forum.bubble.io/t/return-value-from-async-function/118797 "2020-10-30T23:03:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![faqman22](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@faqman22](https://forum.bubble.io/u/faqman22)\
**Post date:** [October 30, 2020, 11:03pm UTC](https://forum.bubble.io/t/return-value-from-async-function/118797/1 "2020-10-30T23:03:42Z")

</div>

Can anyone explain me how i can return string value from async function?

 ![Снимок экрана 2020-10-31 в 1.53.08](https://us1.discourse-cdn.com/bubble/original/3X/7/f/7f7d64d5845a73ccc464b447a53c4716d85ea82f.png)

For now my code is returning null for text field  
 ![Снимок экрана 2020-10-31 в 1.59.57](https://us1.discourse-cdn.com/bubble/original/3X/c/5/c5204a9a55f11d8fec9d3fc0c9792c294405b84e.png)  
I expect to receive {text:“text”}  
Thanks.

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [October 30, 2020, 11:12pm UTC](https://forum.bubble.io/t/return-value-from-async-function/118797/2 "2020-10-30T23:12:08Z")

</div>

Bubble provides a function specifically for that…

> [@Looking for help with writing server-side plugin](http://forum.bubble.io/t/looking-for-help-with-writing-server-side-plugin/53156/15):
>
> And here’s the same thing in async/await syntax instead of “thenable”, which I find a bit more readable… return context.async( async callback =\> { try { let parsed = await simpleParser( email ); callback( undefined, { subject : parsed.subject, to : JSON.stringify( parsed.to.value ), from : JSON.stringify( parsed.from.value ) }); } catch ( err ) { callback( err ); } }); And here’s a “template” example of…

If you click the “show documentation” link that’s cut off from your screenshot, you’ll see it. Or search the forums for `context.async`.
