From 66c48231f947d4a845ede54df637f87a55c898f6 Mon Sep 17 00:00:00 2001 From: Daan Gorsse <110089322+DGorsseRedCross@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:25:01 +0100 Subject: [PATCH] Update README.md Improve the docs on using chatgpt for semi-automatic header creation --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64b5ae2..c47c6ed 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ See below for an example configuration, in which programId was not included as a ## Create headers endpoint -If you need to map a lot of questions, creating the headers manually is cumbersome. The `/create-kobo-headers` endpoint automates this. It expects 4 query parameters: +If you need to map a lot of questions, creating the headers manually is cumbersome. The [`/create-kobo-headers`](https://kobo-connect.azurewebsites.net/docs#/default/create_kobo_headers_create_kobo_headers_post) endpoint automates this. It expects 4 query parameters: - `system`: required, enum (options: 121, espocrm, generic) - `koboassetId`: the asset id of the survey (to be found in the url: https://kobonew.ifrc.org/#/forms/`ASSETID`/summary) - `kobotoken`: the kobo token of the account the survey is available at (Click on 'account' icon top right > Account Settings > Security > API Key shown is the kobotoken) @@ -142,7 +142,16 @@ In the body you can pass all the headers you want to create as key value pairs, } ``` -Tip: When you have the headers (/mapping) for example in an Excel table, you can copy that into ChatGPT and ask it to transform the table to key value pairs. It might save time setting up the body needed. +Tip: When you have the headers (/mapping) for example in an Excel table, you can copy that into ChatGPT and ask it to transform the table to key value pairs. It might save time setting up the body needed. The steps for this are the following: +1. Download the Kobo form in XLS (go to the 'FORM' tab in Kobo -> click the three horizontal dots (settings) -> 'Download XLS' +2. Open the XLS and copy the values from the 'name' column +3. Go to ChatGPT (or other LLM) and prompt the following: + ```` + Make key value pairs with the following keys and values in JSON output. For every value add "." in front. These are the headers: + ```` +4. Copy the output and paste in the ['Request body'](https://kobo-connect.azurewebsites.net/docs#/default/create_kobo_headers_create_kobo_headers_post) +5. Execute the script and confirm that a new REST service in Kobo has been created with the correct headers. + This endpoint assumes the IFRC Kobo server (`https://kobonew.ifrc.org`)