4. Crafting the Output
Last updated
Last updated
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:
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.
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]".
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.