This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Alteryx provides many built-in data connectors and there are additional ones available for download from the Gallery. This list currently includes tools such as Google Sheets, Salesforce, Marketo, and others. If you require a connection to an API or web service that Alteryx does not already provide a tool for, this knowledge base article will serve as a reference guide for you to build a connector using Alteryx. This series will focus on utilizing Alteryxmacros to build a tool that is a connector to a datasource, so these terms will be used interchangably throught the guide.
When working with a new API or web service, breaking the documentation down into a digestible format can be difficult. A good way to get started is to look at the required authentication method for the API and determine if the method can be implemented in Alteryx. A more detailed view of authentication in Alteryx can be viewed here.
Once you have determined the method of authentication needed by the service, and implemented the process to authorize, the next step is to generate and execute the actual request to the service. Examine the available endpoints that the API provides, and try to answer the following questions:
What data can I access with this API?
Will I need the response of one API request to construct the request for a subsequent API request?
Will I be sending data to the service for upload (a POST request) or do I simply want to download information from this service (a GET request)?
The answers to these questions can be used to lay out the flow of the next section of your macro. More information on constructing the request can be seenhere.
To build a robust connector, it is most likely desirable to parse the response that was received as a result of your request. This includes sending and downloading data. If you were attempting to upload data, it is good to read the response so that you know if your request was received and valid, and provide this information to the user of your connector. If the connector is built for downloading data, you will want to output a nicely parsed table of data. A detailed explanation of parsing the API response is here.
While interacting with an API, you will receive error messages from time to time. The ability to handle these errors and stop processing, as well as alert the user to the issue that was encountered, are additions you can make to your connector that will make using it a more seamless experience.Read more on error handling here.
Once you have a workflow constructed that handles authentication, executes the API request, and parses the output data, you can turn the workflow into a reusable macro. This includes creating the macro interface that updates the options that you want parameterized as part of your connector. More about designing the macro interface can be read here.