How to create contact in mautic from http url which provide json file

First of all I would appreciate mautic, it is a very good marketing automation software. I salute to all the people including founder, developer and community members for their efforts to making it more good day by day.

Your software
My Mautic version is: 2.16.2
My PHP version is: 7.3

Your problem
My problem is:
I would like to create contact in mautic from a URL which return json file. this URL return new data in every 15 minute. (URL and data is given below).

Please help me how to create new contact from such external URL

i got leads from URL like this
http://mapi.indiamart.com/wservce/enquiry/listing/GLUSR_MOBILE/7042445112/GLUSR_MOBILE_KEY/NzA0MjQ0NTExMiMxMDM1OTU4MA==/

and when this url is triggered it return result in json like this:

[
{
“RN”: “1”,
“QUERY_ID”: “1322726407”,
“QTYPE”: “W”,
“SENDERNAME”: “Truhul Mech”,
“SENDEREMAIL”: “www.truhul6@gmail.com”,
“SUBJECT”: “Requirement for Plastic Dianing Table Set”,
“DATE_RE”: “04 May 2020”,
“DATE_R”: “04-May-20”,
“DATE_TIME_RE”: " 04-May-2020 05:07:01 PM",
“GLUSR_USR_COMPANYNAME”: “Good Luck Furniture”,
“READ_STATUS”: null,
“SENDER_GLUSR_USR_ID”: “82861852”,
“MOB”: “+91-8787518822”,
“COUNTRY_FLAG”: “https://1.imimg.com/country-flags/small/in_flag_s.png”,
“QUERY_MODID”: “ASTBUY”,
“LOG_TIME”: “20200504170701”,
“QUERY_MODREFID”: “42094692546”,
“DIR_QUERY_MODREF_TYPE”: “0”,
“ORG_SENDER_GLUSR_ID”: “82861852”,
“ENQ_MESSAGE”: “I want to buy Plastic Dianing Table Set.\n\nKindly send me price and other details.\n\n”,
“ENQ_ADDRESS”: “Purana bazar middle colony, , Dimapur, Nagaland, 797112”,
“ENQ_CALL_DURATION”: null,
“ENQ_RECEIVER_MOB”: null,
“ENQ_CITY”: “Dimapur”,
“ENQ_STATE”: “Nagaland”,
“PRODUCT_NAME”: “Plastic Dianing Table Set”,
“COUNTRY_ISO”: “IN”,
“EMAIL_ALT”: null,
“MOBILE_ALT”: null,
“PHONE”: null,
“PHONE_ALT”: null,
“IM_MEMBER_SINCE”: “Mar-2019”,
“TOTAL_COUNT”: “43”
},
{
“RN”: “2”,
“QUERY_ID”: “1322226582”,
“QTYPE”: “W”,
“SENDERNAME”: “Tabish”,
“SENDEREMAIL”: “tabish.arya@gmail.com”,
“SUBJECT”: “Requirement for Height Adjustable Computer Table”,
“DATE_RE”: “04 May 2020”,
“DATE_R”: “04-May-20”,
“DATE_TIME_RE”: " 04-May-2020 09:34:12 AM",
“GLUSR_USR_COMPANYNAME”: “CMS Solve”,
“READ_STATUS”: null,
“SENDER_GLUSR_USR_ID”: “19441400”,
“MOB”: “+91-8957903300”,
“COUNTRY_FLAG”: “https://1.imimg.com/country-flags/small/in_flag_s.png”,
“QUERY_MODID”: “ASTBUY”,
“LOG_TIME”: “20200504093412”,
“QUERY_MODREFID”: “42114228246”,
“DIR_QUERY_MODREF_TYPE”: “0”,
“ORG_SENDER_GLUSR_ID”: “19441400”,
“ENQ_MESSAGE”: “Height Adjustable Computer Table for Study / Office Work, Warranty: 6 Months\n\n Quantity: 11 piece\n Probable Order Value: Rs. 35,000 - 3,33,000 \n Probable Requirement Type: Business Use \n”,
“ENQ_ADDRESS”: ", Varanasi, Uttar Pradesh, ",
“ENQ_CALL_DURATION”: null,
“ENQ_RECEIVER_MOB”: null,
“ENQ_CITY”: “Varanasi”,
“ENQ_STATE”: “Uttar Pradesh”,
“PRODUCT_NAME”: “Height Adjustable Computer Table”,
“COUNTRY_ISO”: “IN”,
“EMAIL_ALT”: null,
“MOBILE_ALT”: null,
“PHONE”: null,
“PHONE_ALT”: null,
“IM_MEMBER_SINCE”: “Aug-2015”,
“TOTAL_COUNT”: “43”
}
]

Thanks in advance

I’d say you have two option:

a) The proper way: Create a little Mautic plugin to do that for you, as a console command run by cron

b) The non-PHP way: Have some script outside of Mautic and let it fetch the json on a regular basis (= cron), and turn it into CSV. Then use Mautic’s existing CSV importer via cron console command.

Best,
Ekke


Subscribe to the Mautic Podcast at www.Mauticast.com - and let me know what topics or interviews you would like to hear!
(German version at www.Mauticast.de)

Sir,

Thanks for quick reply.

Is there an way to create a script outside of Mautic and let it fetch the json on a regular basis (= cron), and turn it into to update the mautic form.

[ ie HTTP JSON -> Mautic Form -> added in contact]

if yes pls let me know such script.

( Pls Note: i am a normal user not a developer)

I’m afraid no - both options that I laid out involve a bit of development (probably just a couple of hours, but I am not aware of any way around that)…

Thank you so much for your valuable time.

if there is any plugin or other code which can catch webhooks from the above reffered url and create contact.

Currently i am using zapier webhook to create contact from the above reffered URL but since it is a premium service and my free trial expired so i can not use it more.

If possible, pls let me know any alternate way like zapier to catch webhooks and create contact.

Thanks again