> For the complete documentation index, see [llms.txt](https://glyue.docs.sandboxbanking.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glyue.docs.sandboxbanking.com/tutorials/building-a-single-step-integration/4.-crafting-the-output.md).

# 4. Crafting the Output

**Generate an Output**

In the previous step, we saw the response from `randomuser.me`. Now, we will extract and format data from that response, and display it in the output of the integration.

Return to the **Build page**, and open the service request of your integration by right-clicking it and selecting *Go To > Service Requests.*

Find the *After Execute Request Success Hook* (this may require scrolling to the right) and open the code editor by clicking on the expand icon in the cell. A code editor will appear on the bottom half of your screen.

In the code editor, enter the following Python code:

```python
first_name = request_users.response.payload.results[0].name.first
summary = f"The new user's name is {first_name}."
output.payload = summary
```

<figure><img src="/files/lEJBWL5X20p2GQaikLjE" alt=""><figcaption><p>Code written in the <em>After Execute Request Success Hook</em></p></figcaption></figure>

Save your changes.

**Re-run the Integration**

Return to the **Run History** page using the navigation sidebar on the left.

In the entry list on the left, hover over the entry with the name of our integration. You will see the entry highlight, and a circular arrow icon appear on the right side. Click on the rerun icon, which will open the **Integration Runner.**

<figure><img src="/files/IcZ9EmkyFYASjqmWaMiL" alt=""><figcaption></figcaption></figure>

Leave all fields empty and click *Execute* on the bottom-left. A new entry will appear on the **Run History.**

Close the **Integration Runner** and open the new entry. Open the *Step* labeled `OUTPUT` and now see the message we wrote in the payload. It should read "The new user's name is \[name]".

<figure><img src="/files/5azDRmOblcriiagPAS5J" alt=""><figcaption><p>Updated Output message</p></figcaption></figure>

***

Congratulations! 🎉 You've finished building a simple integration that makes an API call to a third-party system, parses the response, and returns a message using the information in the response.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://glyue.docs.sandboxbanking.com/tutorials/building-a-single-step-integration/4.-crafting-the-output.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
