Skip to content

Instantly share code, notes, and snippets.

@anniethiessen
Last active June 11, 2021 19:02
Show Gist options
  • Select an option

  • Save anniethiessen/035aebed822cde3f10fced6b9620f9a0 to your computer and use it in GitHub Desktop.

Select an option

Save anniethiessen/035aebed822cde3f10fced6b9620f9a0 to your computer and use it in GitHub Desktop.
Airtable automation to create record on Shopify Webhook
// trigger: When webhook received
// action: run script
let env = input.config();
// TODO: verify webhook
// python ex
// hmac.compare_digest(
// base64.b64encode(
// hmac.new(
// env.shopifyWebhookSignature,
// request.get_data().encode('utf-8'),
// hashlib.sha256
// ).digest()
// ),
// request.headers.get('X-Shopify-Hmac-SHA256').encode('utf-8')
// )
var tableName = 'Orders';
let table = base.getTable(tableName);
await table.createRecordAsync({
'ID': env.orderId,
'Order Number': env.orderNumber
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment