# 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="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FQgfIXoZvDrO1LwJZu6nr%2FScreenshot%202024-09-03%20at%2012.17.01%E2%80%AFPM.png?alt=media&#x26;token=c9a714eb-c5e2-4f24-a7ba-7d099ac5db8d" 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.&#x20;

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.**&#x20;

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FzNqx2azpOcoIOtouxr2b%2FScreenshot%202024-09-03%20at%2012.17.30%E2%80%AFPM.png?alt=media&#x26;token=a06abd37-3930-40f5-acf8-31b8d9c00054" alt=""><figcaption></figcaption></figure>

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

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="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FrYERAfUQftbwi13Z9c5Z%2FScreenshot%202024-09-03%20at%2012.18.04%E2%80%AFPM.png?alt=media&#x26;token=64f0450d-8337-4999-9590-aee7d5875923" 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.
