You can even fetch sheet values to the DigiXport addon by using the “<<>>” placeholder.
So if you’re fetching sheet value from say sheet named “Data” and cell “A1”. You can enter : <<Data!A1>>
For fetching sheet range you can use: <<Data!A1:A10>>
The placeholders can be used in
Let’s take an example
Sheet Values in API Url
If you want to fetch data from say cell A2 and sheet named “Sheet”, you can use: <<Sheet!A2>>
If you want to fetch multiple URL, you can simply input the range. In the below example, the request would be sent for the URLs from A2 to A4. For EG: <<Sheet!A2:A4>>
If you want to fetch (parameter or path) value from the sheet to an existing URL, you can input it as : URL?api_key=<<Sheet!A1>>
EG: www.example.com?api_key=<<Sheet!A1>> Or www.example.com/<<Sheet!A1>>
If you use range values in the API Url, then it will concatenate it as a string. So For Eg: www.example.com?fields=<<Sheet!A1:A4>> will be converted to www.example.com?fields=id,name,date
Sheet Values in Headers
To fetch a single sheet value in headers, you can use the format as mentioned above. For Eg: “<<Sheet!A1>>“.
If you use sheet ranges as “<<Sheet!A1:A4>>” in the headers, it will simply concatenate the data fetched from the sheet cell A1, A2, A3, A4.
Sheet Values in Request Body/Payload
The functioning of the fetching of the sheet values in request payload is similar to the ones in the headers.
In the below example, you can paste the JSON payload in the sheet cell and fetch it using <<Sheet!A2>>
If you have JSON across multiple cells, you can even input the range. In the below case, you can see the JSON is in the cell A2 and A3. You can enter range as: <<Sheet!A2:A3>>
NOTE: If the JSON if formatted incorrectly, you will receive an error.
Use Cases
- Some APIs require you to use dates as parameters. So you can simply input the date in the sheet and fetch it via the placeholders.
EG: https://www.example.com?start_date=<<Sheet!A1>>&end_date=<<Sheet!B1>>