Getting the ID from new company using Make A Request

I’m new to Make and I’m having a little trouble. I’m using an HTTP Make a request and I’m connecting and able to make a company just fine using the following code in the request content. My issue is taht I’m not getting the ID returned from the record I created. Without it I can’t do the rest of the updates I need to do to metafields, contacts, etc. Another option would be if I could query the company with the external ID. This is mostly an issue because none of the Shopify modules have Company in them. As always, thanks for any help anyone can give.

mutation {
companyCreate(
input: {
company: {
name: “{{8.Name}}”
externalId: “{{8.Id}}”
}
}
) {
userErrors {
field
message
code
}
}
}

So if anyone else comes across this issue, I finally resolved it by putting a tool node before I did the search for the ID. I told it to sleep for 30 seconds. (Yes, that’s probably longer than necessary, but timing isn’t really an issue for us, because we require approvals.) Apparently, I was doing it correctly, but it was searching before the write was complete and the data was accessible.

Below is the search, which I just placed on an HTTP node.

companies(first: 10, query: “sortKey:CREATED_AT,reverse: true,externalId:externalId:{{8.Id}}”) { nodes {
id
name
externalId
}
}
}

2 Likes